DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095

Oleg Dayneko

DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095

Hi!

I'm run BACKUP SYSTEM on SSID:DSN1 ZOS1.

Then I try to restore DSN1 on ZOS2 + logapply  from archlogs that created on ZOS1(SSID:DSN1).

My steps:

1. BACKUP SYSTEM on ZOS1.

2. Copy all backup volumes into ZOS2.

3. DELETE all BSDS, LOGCOPY in ZOS2.

4.CREATE BSDS,LOGCOPY + PREFORMAT EACH ACTIVE LOG.

5. REPRO last archive B* into BSDS.

6.Add info about LOGCOPY into BSDS.Then run DSNJU004 and show LOG status: NEW, REUSABLE

7.Add entry A* into BSDS about last archlog(START RBA,END RBA).

8.On ZPARM I don't correct SYSPARM RESTART to DEFER:

...

DSN6SPRM  RESTART,       X
                      ALL,                 X
                      ABEXP=YES,  X
                      ABIND=YES,   X
...

9.run DSNJU004 and check that in BSDS all needed archlogs is added. SRARTRBA,ENDRBA is exist.

10.RUN DSNJU03 to setup RBA(ENDRBA+1byte):

    CRESTART CREATE,STARTRBA=004F34300000,ENDRBA=004F50500000

11. /#START DB2

See SYSLOG:

...

*22 DSNJ245I X# CONDITIONAL RESTART RECORD INDICATES TRUNCATION AT RBA
004F50500000. REPLY Y TO CONTINUE, N TO CANCEL
R 22,Y
IEE600I REPLY TO 22 IS;Y

DSNY024I X# DSNYASCP DIST INITIALIZATION IS STARTING
DSNR001I X# RESTART INITIATED
DSNR003I X# RESTART...PRIOR CHECKPOINT RBA=004F50172000
DSNR004I X# RESTART...UR STATUS COUNTS 813
IN COMMIT=0, INDOUBT=0, INFLIGHT=2, IN ABORT=0, POSTPONED ABORT=0
DSNR007I X# RESTART...STATUS TABLE 814
T CON-ID CORR-ID AUTHID PLAN S URID DAY TIME
- -------- ------------ -------- -------- - ------------ --- --------
I SERVER db2jcc_appli SYSADM DISTSERV F 004F4365A51F 282 10:54:19
I SERVER db2jcc_appli SYSADM DISTSERV F 004F43ED14C8 282 10:54:21
DSNB250E X# DSNIBMOC A PAGE RANGE WAS ADDED TO THE 815
LOGICAL PAGE LIST
DATABASE NAME=TESTDB2#
SPACE NAME=TESTT2RI
INSTANCE=1
DATA SET NUMBER=1
PAGE RANGE X'00000000' TO X'FFFFFFFF'
START LRSN=X'004F5050008C'
END LRSN=X'004F5050008C'
START RBA=X'004F5050008C'
LPL TRACE ID=00000001
LPL REASON TYPE=LOGAPPLY

DSNI001I X# RESTART HAS BEEN DEFERRED 816
REASON 00C90095
TYPE 00000201
NAME TESTDB2#.TESTT2RI

...

 

REASON 00C90095  means:

00C90095 Explanation: An attempt was made during DB2 restart to access a page in order to apply a log record but DB2 was unable to access the page. This abend reason code appears as the reason code in message DSNI001I.

Why unable to access the page?...

From ZOS2 I see all archlogs that created on ZOS1. I connect UCAT from ZOS1 to ZOS2. 

Really, tables TESTT2 in TESTDB2#.TESTT2 from ZOS1 to have 800000 rows. 

But on ZOS2 after restore only 300000 rows, because logapply is failed.

Tablespace DDL:

CREATE TABLESPACE TEST#2
IN TESTDB2#
USING STOGROUP SYSDEFLT
PRIQTY -1 SECQTY -1
ERASE NO
FREEPAGE 0 PCTFREE 5
GBPCACHE CHANGED
TRACKMOD YES
LOGGED
SEGSIZE 4
BUFFERPOOL BP2
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE NO
COMPRESS NO
CCSID ASCII
DEFINE YES
MAXROWS 255;
COMMIT;

Any help would be appreciated!

Charles Brown

DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095
(in response to Oleg Dayneko)
Hello Oleg, …have you made some attempts to contact support for their assistance with such a serious problem – just wondering? Mind you, z/OS is a licensed product. Hope this helps.

Thx!



Charles/b

NZ DBA



From: Oleg Dayneko <[login to unmask email]>
Sent: Wednesday, October 9, 2019 6:03 AM
To: [login to unmask email]
Subject: [DB2-L] - DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095



Hi!

I'm run BACKUP SYSTEM on SSID:DSN1 ZOS1.

Then I try to restore DSN1 on ZOS2 + logapply from archlogs that created on ZOS1(SSID:DSN1).

My steps:

1. BACKUP SYSTEM on ZOS1.

2. Copy all backup volumes into ZOS2.

3. DELETE all BSDS, LOGCOPY in ZOS2.

4.CREATE BSDS,LOGCOPY + PREFORMAT EACH ACTIVE LOG.

5. REPRO last archive B* into BSDS.

6.Add info about LOGCOPY into BSDS.Then run DSNJU004 and show LOG status: NEW, REUSABLE

7.Add entry A* into BSDS about last archlog(START RBA,END RBA).

8.On ZPARM I don't correct SYSPARM RESTART to DEFER:

...

DSN6SPRM RESTART, X
ALL, X
ABEXP=YES, X
ABIND=YES, X
...

9.run DSNJU004 and check that in BSDS all needed archlogs is added. SRARTRBA,ENDRBA is exist.

10.RUN DSNJU03 to setup RBA(ENDRBA+1byte):

CRESTART CREATE,STARTRBA=004F34300000,ENDRBA=004F50500000

11. /#START DB2

See SYSLOG:

...

*22 DSNJ245I X# CONDITIONAL RESTART RECORD INDICATES TRUNCATION AT RBA
004F50500000. REPLY Y TO CONTINUE, N TO CANCEL
R 22,Y
IEE600I REPLY TO 22 IS;Y

DSNY024I X# DSNYASCP DIST INITIALIZATION IS STARTING
DSNR001I X# RESTART INITIATED
DSNR003I X# RESTART...PRIOR CHECKPOINT RBA=004F50172000
DSNR004I X# RESTART...UR STATUS COUNTS 813
IN COMMIT=0, INDOUBT=0, INFLIGHT=2, IN ABORT=0, POSTPONED ABORT=0
DSNR007I X# RESTART...STATUS TABLE 814
T CON-ID CORR-ID AUTHID PLAN S URID DAY TIME
- -------- ------------ -------- -------- - ------------ --- --------
I SERVER db2jcc_appli SYSADM DISTSERV F 004F4365A51F 282 10:54:19
I SERVER db2jcc_appli SYSADM DISTSERV F 004F43ED14C8 282 10:54:21
DSNB250E X# DSNIBMOC A PAGE RANGE WAS ADDED TO THE 815
LOGICAL PAGE LIST
DATABASE NAME=TESTDB2#
SPACE NAME=TESTT2RI
INSTANCE=1
DATA SET NUMBER=1
PAGE RANGE X'00000000' TO X'FFFFFFFF'
START LRSN=X'004F5050008C'
END LRSN=X'004F5050008C'
START RBA=X'004F5050008C'
LPL TRACE ID=00000001
LPL REASON TYPE=LOGAPPLY

DSNI001I X# RESTART HAS BEEN DEFERRED 816
REASON 00C90095
TYPE 00000201
NAME TESTDB2#.TESTT2RI

...



REASON 00C90095 means:

00C90095 Explanation: An attempt was made during DB2 restart to access a page in order to apply a log record but DB2 was unable to access the page. This abend reason code appears as the reason code in message DSNI001I.

Why unable to access the page?...

From ZOS2 I see all archlogs that created on ZOS1. I connect UCAT from ZOS1 to ZOS2.

Really, tables TESTT2 in TESTDB2#.TESTT2 from ZOS1 to have 800000 rows.

But on ZOS2 after restore only 300000 rows, because logapply is failed.

Tablespace DDL:

CREATE TABLESPACE TEST#2
IN TESTDB2#
USING STOGROUP SYSDEFLT
PRIQTY -1 SECQTY -1
ERASE NO
FREEPAGE 0 PCTFREE 5
GBPCACHE CHANGED
TRACKMOD YES
LOGGED
SEGSIZE 4
BUFFERPOOL BP2
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE NO
COMPRESS NO
CCSID ASCII
DEFINE YES
MAXROWS 255;
COMMIT;

Any help would be appreciated!



-----End Original Message-----

Gabriel Pelly

RE: DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095
(in response to Oleg Dayneko)

Hi Oleg,

It appears that you are using the disaster recovery method to restore your DB2.

I assume that you are using ‘tape’ (or VTS) restore (ie not replicated disk).

 

Have you first restored the DB2 directory/catalog as listed in:

https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/ugref/src/tpc/db2z_recovercatalogdirectoryobjects.html

before you worry about the application DB(s)?   ie get DB2 directory and catalog correct, then restore application DBs.

Cheers

Gabriel Pelly

Oleg Dayneko

RE: DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095
(in response to Gabriel Pelly)

For restore DB2 I usage volumes from SMS SG TYPE: COPY POOL BACKUP.

Then this volumes I copied into new volumes usage PGM=ADRDSSU with param:DUMPCONDITIONING.

Before RESTORE DB2 I don't recover catalog and directory objects.I think this should not be done in my case,because when I run BACKUP SYSTEM don't connect applications. 

Maybe I'm wrong and I need to restore system objects anyway? 

David Baldon

DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095
(in response to Oleg Dayneko)
Have you read the Utility Guide and Reference for the version of DB2 you’re working with related to the BACKUP SYSTEM and RESTORE SYSTEM commands? It describes the process and what you need to do to be successful. Worth taking time to read if you haven’t already.

...David

From: Oleg Dayneko <[login to unmask email]>
Sent: Friday, October 11, 2019 12:09 AM
To: [login to unmask email]
Subject: [EXTERNAL] [DB2-L] - RE: DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095


For restore DB2 I usage volumes from SMS SG TYPE: COPY POOL BACKUP.

Then this volumes I copied into new volumes usage PGM=ADRDSSU with param:DUMPCONDITIONING.

Before RESTORE DB2 I don't recover catalog and directory objects.I think this should not be done in my case,because when I run BACKUP SYSTEM don't connect applications.

Maybe I'm wrong and I need to restore system objects anyway?

-----End Original Message-----

Neil Price

DB2 v10 for ZOS. Restore BACKUP but LOGAPPLY failed with rc=00C90095
(in response to David Baldon)
The Redbook SG24-6370 "Disaster Recovery with DB2 UDB for z/OS" from 2004
also covers the BACKUP SYSTEM and RESTORE SYSTEM utilities and the required
SMS setup in detail. AFAIK not much has changed in the meantime apart from
provision for multiple backup pools, so it could be useful.

HTH
Neil

On Fri, 11 Oct 2019 at 15:09, Baldon, David <[login to unmask email]> wrote:

> Have you read the Utility Guide and Reference for the version of DB2
> you’re working with related to the BACKUP SYSTEM and RESTORE SYSTEM
> commands? It describes the process and what you need to do to be
> successful. Worth taking time to read if you haven’t already.
>
>
>
> ...David
>
>
>
> *From:* Oleg Dayneko <[login to unmask email]>
> *Sent:* Friday, October 11, 2019 12:09 AM
> *To:* [login to unmask email]
> *Subject:* [EXTERNAL] [DB2-L] - RE: DB2 v10 for ZOS. Restore BACKUP but
> LOGAPPLY failed with rc=00C90095
>
>
>
> For restore DB2 I usage volumes from SMS SG TYPE: COPY POOL BACKUP.
>
> Then this volumes I copied into new volumes usage PGM=ADRDSSU with
> param:DUMPCONDITIONING.
>
> Before RESTORE DB2 I don't recover catalog and directory objects.I think
> this should not be done in my case,because when I run BACKUP SYSTEM don't
> connect applications.
>
> Maybe I'm wrong and I need to restore system objects anyway?
>
>
> -----End Original Message-----
>
> -----End Original Message-----
>