If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > restore terminate

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-07, 09:02
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
restore terminate

Hello.

On my production site i have DB2 9.1.2 database configured for archiving logs and making backup through
TSM Data Protection for DB2 UDB
The LOGARCHMETH1 parameter is set to LOGARCHMETH1=VENDOR:/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

I make an online backup with include logs to servers local disk and then tranfer backup image to my test box for backup validate.
I'm use next command to restore database on test box :

db2 => restore db NPD from /db2data/backup taken at 20070925163139 on /db2data/database/NPD dbpath on /db2data/database/NPD into NPD

but on last phase it is fail with message :

SQL2071N An error occurred while accessing the shared library
"/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a". Reason code: "2".

Next i'm create on my test box file /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a and run restore again, but the result is still the same.

I'm very strange for "Reason code : "2"" of SQL2071N because both production and test servers are on the same platform (DB2 9.1.2 64-bit on AIX 5.3 64-bit)

How can i prevent restore process to use TSM library and make datatabase available for rollfirward with logs extracted from backup image ??

Thank's

On db2diag.log listen next messages :

2007-09-26-08.08.40.638307-300 E423372A567 LEVEL: Error (OS)
PID : 643322 TID : 1 PROC : db2logmgr (NPD) 0
INSTANCE: db2npd NODE : 000
FUNCTION: DB2 UDB, oper system services, sqloLoadModule, probe:130
CALLED : OS, -, dlopen
OSERR : ENOEXEC (8) "Exec format error"
MESSAGE : Attempt to load specified library failed.
DATA #1 : Library name or path, 42 bytes
/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a
DATA #2 : shared library load flags, PD_TYPE_LOAD_FLAGS, 4 bytes
2
DATA #3 : String, 18 bytes
File name too long

2007-09-26-08.08.40.675160-300 E423940A874 LEVEL: Error (OS)
PID : 643322 TID : 1 PROC : db2logmgr (NPD) 0
INSTANCE: db2npd NODE : 000
FUNCTION: DB2 UDB, oper system services, sqloLoadModule, probe:140
CALLED : OS, -, dlopen
OSERR : ENOEXEC (8) "Exec format error"
MESSAGE : Attempt to load specified library augmented with object name failed.
DATA #1 : Library name or path, 52 bytes
/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a(shr_64.o)
DATA #2 : shared library load flags, PD_TYPE_LOAD_FLAGS, 4 bytes
262146
DATA #3 : String, 282 bytes
0509-022 Cannot load module /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a(shr_64.o).
0509-153 File /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a is not an archive or
the file could not be read properly.
0509-026 System error: Cannot run a file that does not have a valid format.

2007-09-26-08.08.40.675522-300 I424815A389 LEVEL: Error
PID : 643322 TID : 1 PROC : db2logmgr (NPD) 0
INSTANCE: db2npd NODE : 000
FUNCTION: DB2 UDB, data protection services, sqlpInitVendorAPI, probe:1660
MESSAGE : Unable to load library. rc
DATA #1 : Hexdump, 4 bytes
0x0FFFFFFFFFFFD870 : 870F 009B ....

2007-09-26-08.08.40.675732-300 I425205A388 LEVEL: Severe
PID : 643322 TID : 1 PROC : db2logmgr (NPD) 0
INSTANCE: db2npd NODE : 000
FUNCTION: DB2 UDB, data protection services, sqlpgLogManager, probe:5210
RETCODE : ZRC=0x8010006D=-2146434963=SQLP_RC_CA_BUILT
"SQLCA has been built and saved in component specific control block."

2007-09-26-08.08.40.678859-300 I425594A483 LEVEL: Severe
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, data protection services, sqlpgint, probe:9030
RETCODE : ZRC=0x8010006D=-2146434963=SQLP_RC_CA_BUILT
"SQLCA has been built and saved in component specific control block."

2007-09-26-08.08.40.733817-300 I426078A483 LEVEL: Severe
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, data protection services, sqlpgint, probe:3500
RETCODE : ZRC=0x8010006D=-2146434963=SQLP_RC_CA_BUILT
"SQLCA has been built and saved in component specific control block."

2007-09-26-08.08.40.734114-300 I426562A496 LEVEL: Error
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, data protection services, sqlpRestartDPSbyRestore, probe:300
RETCODE : ZRC=0x8010006D=-2146434963=SQLP_RC_CA_BUILT
"SQLCA has been built and saved in component specific control block."

2007-09-26-08.08.40.734408-300 E427059A499 LEVEL: Severe
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, database utilities, sqludProcessLFH, probe:1190
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-902
DATA #2 : Hexdump, 8 bytes
0x0780000020705520 : 8010 006D 0000 006D ...m...m

2007-09-26-08.08.40.734773-300 E427559A919 LEVEL: Severe
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, database utilities, sqludProcessLFH, probe:1190
MESSAGE : SQL2071N An error occurred while accessing the shared library "".
Reason code: "".
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -2071 sqlerrml: 44
sqlerrmc: /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a 2
sqlerrp : SQLPGLGM
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:

2007-09-26-08.08.41.086289-300 E428479A372 LEVEL: Severe
PID : 565290 TID : 1 PROC : db2agent (NPD) 0
INSTANCE: db2npd NODE : 000 DB : NPD
APPHDL : 0-773 APPID: *LOCAL.db2npd.070926105527
AUTHID : DB2NPD
FUNCTION: DB2 UDB, database utilities, sqludrsa, probe:901
MESSAGE : Restore Terminated.
Reply With Quote
  #2 (permalink)  
Old 09-27-07, 09:23
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
check the syntax diagram and specify logs as option, this will extract the logs from backup image, also specify logtarget with this option
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #3 (permalink)  
Old 09-27-07, 09:45
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
Quote:
Originally Posted by guyprzytula
check the syntax diagram and specify logs as option, this will extract the logs from backup image, also specify logtarget with this option
Logs is already successfully restored from backup image with command :

restore db NPD logs .... logtarget...

Problem is for restore full database
Reply With Quote
  #4 (permalink)  
Old 09-27-07, 10:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Try specifying logtarget with the database restore command. What I think is happening is DB2 tries to extract the log files and put them into the configured archive location.
Reply With Quote
  #5 (permalink)  
Old 09-28-07, 02:17
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
Quote:
Originally Posted by n_i
Try specifying logtarget with the database restore command. What I think is happening is DB2 tries to extract the log files and put them into the configured archive location.
Thank's. But it is not helpfull

$ db2 restore db NPD from /db2data/backup taken at 20070925163139 on /db2data/database/NPD dbpath on /db2data/database/NPD into NPD logtarget /db2data/database/NPD/arch_logs
SQL2071N An error occurred while accessing the shared library
"/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a". Reason code: "2".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On