From: mitrofun63 on
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 ??


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.