IBM Support

Rollforward Fails using Netbackup after restoring database A into B

Troubleshooting


Problem

When doing a redirect restore from one database into another. If the logs are kept on Netbackup, the rollforward will fail because Netbackup can't find the logs.

Diagnosing The Problem

1.) Run a redirect restore:


db2 restore db sample load /usr/test/netbackup/bin/nbdb2.so64 taken at 20170708200102 into sampledev redirect

2.) The rollforward will fail:

db2inst1]$ db2 rollforward db sampledev to end of backup
SQL1273N An operation reading the logs on database "sampledev" cannot continue
because of a missing log file "S0434164.LOG" on database partition "0" and log stream "0".

3.) The db2diag.log will show:

2017-07-11-10.25.13.588064-240 I2677814E543 LEVEL: Error
PID : 42689 TID : 140639387772672 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : sampledev
HOSTNAME: test
EDUID : 1258 EDUNAME: db2lfr.0 (sampledev) 0
FUNCTION: DB2 UDB, data protection services, sqlpgOpenLogExtent,
probe:10000
MESSAGE : ZRC=0x860F000A=-2045837302=SQLO_FNEX "File not found."
DIA8411C A file "" could not be found.
DATA #1 : <preformatted>
Error opening database log extent 434164.

2017-07-11-10.25.20.371717-240 I2678358E489 LEVEL: Error
PID : 42689 TID : 140642252482304 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : sampledev
HOSTNAME: test
EDUID : 1255 EDUNAME: db2logmgr (sampledev) 0
FUNCTION: DB2 UDB, data protection services,
sqlpSearchForLogArchiveOnVendor, probe:8200
MESSAGE : ZRC=0x860F000A=-2045837302=SQLO_FNEX "File not found."
DIA8411C A file "" could not be found.

2017-07-11-10.25.20.372590-240 I2678848E576 LEVEL: Warning
PID : 42689 TID : 140642252482304 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : sampledev
HOSTNAME: test
EDUID : 1255 EDUNAME: db2logmgr (sampledev) 0
FUNCTION: DB2 UDB, data protection services,
sqpLogMgrEdu::sqlpgRetrieveLogFile, probe:4070
MESSAGE : ZRC=0x860F000A=-2045837302=SQLO_FNEX "File not found."
DIA8411C A file "" could not be found.
DATA #1 : String, 54 bytes
search on vendor failed, skip retrieve for this method

2017-07-11-10.25.20.604479-240 I2679425E497 LEVEL: Warning
PID : 42689 TID : 140639387772672 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : sampledev
HOSTNAME: test
EDUID : 1258 EDUNAME: db2lfr.0 (sampledev) 0
FUNCTION: DB2 UDB, recovery manager, sqlplfrFMReadLog, probe:5120
DATA #1 : <preformatted>
LFR Scan Num = 1
LFR Scan Caller's EDUID = 53
Return code for LFR opening file S0434164.LOG was -2146434659

Resolving The Problem

This is due to the fact that Netbackup can't find the correct log it needs to give back to DB2, so DB2 can complete rollforward. It has been recommended to use these setting:

OBJECTTYPE ALTERNATE


DATABASE sample
SRCINST db2inst1
SRCALIAS sample
DESTINST db2inst1
DESTALIAS db2
ENDOPER

within the db2.conf file for Netbackup, so that it can find the log file it needs.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Restore","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1;10.5;11.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg22006099