468,306 Members | 1,252 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Error SQL1265N

Hi all,

I'm trying to setup a standby server using log shipping.
The live database has a user exit in place, which archives the closed
logs and ships them to the standby server.

The standby server, checks for new logs, and, if any, simply
rollforward to the end of logs.

Most of the time everything looks fine with the only weird thing that
if i do a rollforward query status i see something like:

Input database alias = abc
Number of nodes have returned status = 1

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000530.LOG
Log files processed = S0000462.LOG - S0000528.LOG
Last committed transaction = 2004-12-08-00.27.36.000000

As you can see the last file processed is S0000528.LOG
and Next log file to be read is S0000530.LOG. Where is S000529.LOG ?

Next time the rollforward happens you would see something like:
Input database alias = abc
Number of nodes have returned status = 1

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000531.LOG
Log files processed = S0000462.LOG - S0000529.LOG
Last committed transaction = 2004-12-08-00.28.40.000000

But since everything works i'm not so worry about.

The real problem i have is sometimes on a rollforward i get an error
like:

QL1265N The archive log file "S0000536.LOG" is not associated with the

current log sequence for database "ADOPT" on node "0".

At this point there is nothing i can do, it simply stops with this
error.

The query status looks like:

Input database alias = abc
Number of nodes have returned status = 1

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000536.LOG
Log files processed = S0000462.LOG - S0000535.LOG
Last committed transaction = 2004-12-08-11.10.04.000000
And I don't know if it's a coincidence but the next log file to be read
is really 1 after the last log processed (the way it's supposed to be).
Any idea ??

I'm running db2 V 8.1 with fixpak 7a (which takes it the 8.2) on linux
x86 32 bit.
I'm running out of ideas. Any help will be greatly appriciated.
Thanks in advance

Fabrizio

Nov 12 '05 #1
2 5401
Hi,

This may answer your doubts:

IY46859: SLOW DATABASE ACTIVATION, ROLLFORWARD FAILS WITH SQL1265 , OR
DATABASE CRASHES AND IS NON-RECOVERABLE

APAR status
Closed as program error.
Error description
This problem exists only on the following DB2 levels:
version 7.2, Fixpaks 9 and 10
version 8.1, Fixpak 2
If you have LOGRETAIN or USEREXIT set to ON and more than 4GB of
log space configured,
(( LOGPRIMARY + LOGSECOND ) * LOGFILSIZ * 4KB )
you may experience one or more of the following conditions:
- Database activation takes longer than expected. This will
occur every time the database is activated or connected to for
the first time. If the database is consistent at the time of
activation, DB2 will reallocate log files causing database
activation to be slow. When this occurs, an entry will be
created in the db2diag.log file as follows:

2003-04-29-09.02.25.259200 Instance:db2inst1 Node:000
PID:36348(db2loggr (SAMPLE)) Appid:none
data_protection sqlpgilt Probe:484
firstlsn 0003B616D000 does not match expected
firstlsn of 0002B616D000 for extent 59.

- Rollforward fails and returns SQL1265 Archive log file is
not associated with the current log sequence . When log files
are reallocated the new log file may not be created in proper
sequence with the previous one. A rollforward operation fails
when trying to process the new log file. When this occurs, an
entry will be created in the db2diag.log file as follows:

2003-07-21-15.33.39.044501 Instance:db2inst1 Node:000
PID:4341870(db2loggr (SAMPLE) 0) Appid:none
data_protection sqlpgarl Probe:580:1 Appid:none
Problem with log file S0038566.LOG, Index 5,
PId 1058669249, 38565 1058501042
Log file S0038566.LOG is not chaining with log file
S0038565.LOG.

- A database crashes and attempts to recover it fail. This may
occur when a very large transaction is running requiring more
than 4GB of active log space. This results in an incorrect log
sequence number being written to the transaction logs on disk.
This will also cause crash recovery to fail. When this occurs,
entries will be created in the db2diag.log file as follows:

2003-07-30-19.22.03.807234 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
DIA3826C A fatal error occurred in data protection services.
ZRC=0xFFFFF51D

2003-07-30-19.22.03.869349 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
Transaction Entry first lsn: 009c febd 8043

2003-07-30-19.22.03.876264 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
Max lsn first lsn: 009d 12aa 77ae
Local fix
Reduce the database's total log space ((LOGPRIMARY + LOGSECOND)
* LOGFILSIZ * 4096) to be less than 4GB.
Problem summary
Users having more than 4 GB of active log space
are exposed to this problem. The following symptoms have been
seen so far :
..
- Db activation takes a long time with sqlpgilt,probe:484 in
the db2diag.log
- Rollforward db cmd fails with SQL1265N
- Database crash with subsequent crash recovery failing

SKC

Nov 12 '05 #2
It does not look like that this is my problem because
1) i'm running 8.1 fixpak 7a
2) (( LOGPRIMARY + LOGSECOND ) * LOGFILSIZ * 4KB ) = ((20 + 8) + 5000
*4KB) =
546MB < 4GB

Thanks for you help anyway.

Fabrizio

cs****@gmail.com wrote:
Hi,

This may answer your doubts:

IY46859: SLOW DATABASE ACTIVATION, ROLLFORWARD FAILS WITH SQL1265 , OR DATABASE CRASHES AND IS NON-RECOVERABLE

APAR status
Closed as program error.
Error description
This problem exists only on the following DB2 levels:
version 7.2, Fixpaks 9 and 10
version 8.1, Fixpak 2
If you have LOGRETAIN or USEREXIT set to ON and more than 4GB of
log space configured,
(( LOGPRIMARY + LOGSECOND ) * LOGFILSIZ * 4KB )
you may experience one or more of the following conditions:
- Database activation takes longer than expected. This will
occur every time the database is activated or connected to for
the first time. If the database is consistent at the time of
activation, DB2 will reallocate log files causing database
activation to be slow. When this occurs, an entry will be
created in the db2diag.log file as follows:

2003-04-29-09.02.25.259200 Instance:db2inst1 Node:000
PID:36348(db2loggr (SAMPLE)) Appid:none
data_protection sqlpgilt Probe:484
firstlsn 0003B616D000 does not match expected
firstlsn of 0002B616D000 for extent 59.

- Rollforward fails and returns SQL1265 Archive log file is
not associated with the current log sequence . When log files
are reallocated the new log file may not be created in proper
sequence with the previous one. A rollforward operation fails
when trying to process the new log file. When this occurs, an
entry will be created in the db2diag.log file as follows:

2003-07-21-15.33.39.044501 Instance:db2inst1 Node:000
PID:4341870(db2loggr (SAMPLE) 0) Appid:none
data_protection sqlpgarl Probe:580:1 Appid:none
Problem with log file S0038566.LOG, Index 5,
PId 1058669249, 38565 1058501042
Log file S0038566.LOG is not chaining with log file
S0038565.LOG.

- A database crashes and attempts to recover it fail. This may
occur when a very large transaction is running requiring more
than 4GB of active log space. This results in an incorrect log
sequence number being written to the transaction logs on disk.
This will also cause crash recovery to fail. When this occurs,
entries will be created in the db2diag.log file as follows:

2003-07-30-19.22.03.807234 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
DIA3826C A fatal error occurred in data protection services.
ZRC=0xFFFFF51D

2003-07-30-19.22.03.869349 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
Transaction Entry first lsn: 009c febd 8043

2003-07-30-19.22.03.876264 Instance:db2inst1 Node:008
PID:23879810(db2agent (SAMPLE) 8) Appid:*N8.db2bpr.0307310222
data_protection sqlpWriteToLog Probe:10 Database:SAMPLE
Max lsn first lsn: 009d 12aa 77ae
Local fix
Reduce the database's total log space ((LOGPRIMARY + LOGSECOND)
* LOGFILSIZ * 4096) to be less than 4GB.
Problem summary
Users having more than 4 GB of active log space
are exposed to this problem. The following symptoms have been
seen so far :
.
- Db activation takes a long time with sqlpgilt,probe:484 in
the db2diag.log
- Rollforward db cmd fails with SQL1265N
- Database crash with subsequent crash recovery failing

SKC


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tony Wright | last post: by
1 post views Thread by Aravind | last post: by
1 post views Thread by yanwan | last post: by
5 posts views Thread by Enos Meroka | last post: by
7 posts views Thread by p | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.