Skip to Content
author's profile photo
Former Member

restore problem

Hello.

On my production site i have DB2 9.1.2 database configured for archiving logs and making backup through "TSM Data Protection for mySAP for DB2 UDB"

The LOGARCHMETH1 parameter is set to LOGARCHMETH1=VENDOR:/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

I make from DB2 CLP 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 from using TSM library and make datatabase available for rollfirward with logs extracted from backup image ??

Thank's.

With best regards, Dmitry

P.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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on Sep 26, 2007 at 10:24 PM

    Hello Dmitry

    consider following Option of restore command

    <b>LOGTARGET</b> directory

    The absolute path name of an existing directory on the database server, to

    be used as the target directory for extracting log files from a backup image.

    If this option is specified, any log files contained within the backup image

    will be extracted into the target directory. If this option is not specified, log

    files contained within a backup image will not be extracted. To extract only

    the log files from the backup image, specify the LOGS option.

    see "Command Reference" for all possible Options .

    Best regards

    dirk

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 06:00 AM

    Hi, Dirk

    Thank's for your response,but the problem is not in restore LOGS (included logs are successfully restored from backup image). Problem in restoring full DATABASE.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 12:41 AM

    Hello Dmitry

    usually a similar procedure as described in Data" target="_blank">ftp://ftp.software.ibm.com/ps/products/db2/info/vr9/pdf/letter/en_US/db2hae90.pdf">Data Recovery and High Availability Guide and Reference should work

    >>>snip<<<

    4. To produce a backup image, which includes logs, for transportation to a remote site:

    backup db sample online to /dev3/backup include logs

    To restore that backup image, supply a LOGTARGET path and specify this path during ROLLFORWARD:

    restore db sample from /dev3/backup logtarget /dev3/logs
    rollforward db sample to end of logs and stop overflow log path /dev3/logs
    

    >>>unsnip<<<

    Best regards

    dirk

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 06:08 AM

    Hello, Dirk

    Thank's for your responses.

    May be i not properly describe my problem (sorry for my bad english).

    I familiar with DB2 databases backup and restore techniques (but not with TDP for mySAP for DB2)

    My backup is successfylly created and logs is successfully restored from it with command :

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

    Only restore database is failed :

    $ 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".

    I want to restore manually created backup on server what does not have access to TSM and not have to TDP library installed. In my case i think this is not correct behavior of DB2 restore utility, because restoring posibility not to be depended on logs archive methods (LOGARCHMETH1) implemented on source database (may be i'm wrong)

    Thank's

    With best regards, Dmitry

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 12:38 AM

    Hello Dmitry ,

    Probably db2logmgr simply tries to load the vendor library and fails .

    You stated , you only copied /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

    to your target system .

    Please also check as db2<db2sid> via

    dump -H -X 64 /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

    whether further Libraries are missing when trying to load your TDP vendor library .

    Since TDP uses TSM Functionality I cannot say for now , how intensive you need to install and configure TDP and TSM client to get around this .

    Alternatively you can use an <b>offline backup</b> .

    Best regards

    dirk

    Add comment
    10|10000 characters needed characters exceeded