Redirected Restore with REPLACE EXISTING fails with SQL5099N and RC=4 when NEWLOGPATH=default log path of the database

Technote (troubleshooting)


Problem(Abstract)

This technote explains how to resolve the SQL5099N error with RC=4 got during a REDIRECT RESTORE operation with the REPLACE EXISTING clause when NEWLOGPATH=default log path of the database.

Symptom

Restore command:

*****************************
$ db2 restore db sample from /home/vinny_95/olbackup taken at 20100112102514 on /home/vinny_95 into mizzou newlogpath /home/vinny_95/vinny_95/NODE0000/SQL00001/SQLOGDIR/ replace existing redirect without prompting
SQL5099N The value "/home/vinny_95/vinny_95/NODE0000/SQL00001/SQLOGDIR/"
indicated by the database configuration parameter "NEWLOGPATH" is not valid,
reason code "4". SQLSTATE=08004



Cause

Note: The NEWLOGPATH specified above is the same as the default log path of the already existing database and hence this path contains some log files.


db2diag.log entries:
******************************

2010-01-15-10.48.24.434255-360 I343257G502 LEVEL: Event
PID : 3292 TID : 3066031008 PROC : db2sysc 0
INSTANCE: vinny_95 NODE : 000 DB : MIZZOU
APPHDL : 0-26 APPID: *LOCAL.vinny_95.123456789012
AUTHID : VINNY_95
EDUID : 49 EDUNAME: db2agent (MIZZOU) 0
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:20
CHANGE : CFG DB MIZZOU : "Database_memory" From: "29520" <computed> To: "28256" <computed>

2010-01-15-10.48.24.536625-360 E343760G490 LEVEL: Info
PID : 3292 TID : 3066031008 PROC : db2sysc 0
INSTANCE: vinny_95 NODE : 000 DB : MIZZOU
APPHDL : 0-26 APPID: *LOCAL.vinny_95.123456789012
AUTHID : VINNY_95
EDUID : 49 EDUNAME: db2agent (MIZZOU) 0
FUNCTION: DB2 UDB, database utilities, sqluxGetDegreeParallelism, probe:507
DATA #1 : <preformatted>
Autonomic backup/restore - using parallelism = 2.

2010-01-15-10.48.24.552644-360 I344251G450 LEVEL: Severe
PID : 3292 TID : 3066031008 PROC : db2sysc 0
INSTANCE: vinny_95 NODE : 000 DB : MIZZOU
APPHDL : 0-26 APPID: *LOCAL.vinny_95.123456789012
AUTHID : VINNY_95
EDUID : 49 EDUNAME: db2agent (MIZZOU) 0
FUNCTION: DB2 UDB, data protection services, sqlpIsLogPathValid, probe:50
MESSAGE : Path contains log files.

2010-01-15-10.48.24.552812-360 I344702G452 LEVEL: Error
PID : 3292 TID : 3066031008 PROC : db2sysc 0
INSTANCE: vinny_95 NODE : 000 DB : MIZZOU
APPHDL : 0-26 APPID: *LOCAL.vinny_95.123456789012
AUTHID : VINNY_95
EDUID : 49 EDUNAME: db2agent (MIZZOU) 0
FUNCTION: DB2 UDB, database utilities, sqludMRResponse, probe:990
MESSAGE : NEWLOGPATH specified is not usable.

2010-01-15-10.48.24.562462-360 E345155G430 LEVEL: Severe
PID : 3292 TID : 3066031008 PROC : db2sysc 0
INSTANCE: vinny_95 NODE : 000 DB : MIZZOU
APPHDL : 0-26 APPID: *LOCAL.vinny_95.123456789012
AUTHID : VINNY_95
EDUID : 49 EDUNAME: db2agent (MIZZOU) 0
FUNCTION: DB2 UDB, database utilities, sqludrsa, probe:781
MESSAGE : Restore Terminated.

Diagnosing the problem

In the above example, it appears that db2 tries to validate the newlogpath and marks it invalid as the path contains log files. This logic seems right, given that the newlogpath might already belong to another database's logpath. However, DB2 does not perform another logic check to see if the newlogpath=default log path. If this was done, DB2 could proceed with the replace existing clause in the redirect restore command to overwrite the log path and thus prevent the error message. DB2 does this and the restore command completes successfully when the newlogpath is not used in the above command:


$ db2 restore db sample from /home/vinny_95/olbackup taken at 20100112102514 on /home/vinny_95 into mizzou replace existing redirect without prompting
SQL1277W A redirected restore operation is being performed. Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.

Resolving the problem

It's only in very rare cases that the NEWLOGPATH might be the same as the default log path. It is redundant and not recommended to use the same path, even though DB2 doesn't check the logic to see "if NEWLOGPATH=default log path". Therefore, this behavior is still working as designed,

Related information

RESTORE DATABASE
Redirected Restore Examples

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for Linux, UNIX and Windows
Recovery - Restore

Software version:

9.1, 9.5, 9.7

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Software edition:

Enterprise Server

Reference #:

1418632

Modified date:

2010-11-12

Translate my page

Machine Translation

Content navigation