IBM Support

Database backup, restore or log archiving via TSM fails with TSM reason code 168

Question & Answer


Question

A BACKUP DATABASE or RESTORE DATABASE command that uses Tivoli® Storage Manager (TSM) might report the following error: SQL2062N An error occurred while accessing media "/home/db2inst1/sqllib/adsm/libtsm.a". Reason code: "168"

Cause

The reason code "168", which appears in the error message and in the db2diag.log messages, is in fact TSM error 168. TSM error 168 means "DSM_RC_NO_PASS_FILE". According to TSM API return codes reference, "DSM_RC_NO_PASS_FILE" means "password file needed and user is not root".

There are two possible causes for the TSM error code 168:

  1. You have configured the passwordaccess option in dsm.sys to have a value of "generate", but you have not run the command dsmapipw. That command generates the TSM password and stores it locally.
  2. You have not configured the DB2® instance to use the same bit width as the TSM API client. As a result, a 32-bit DB2 instance might try to use a 64-bit TSM API (or vice versa).

Diagnosis details
The messages that appear in the db2diag.log at the time of the problem will be similar to the following:



2006-12-03-23.26.29.827997+660 I3396A663 LEVEL: Error
PID : 1368086 TID : 1 PROC : db2med.1744978.0 0
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, database utilities, sqluMapVend2MediaRCWithLog, probe:0
DATA #1 : String, 108 bytes
Vendor error: rc = 11 returned from function sqluvint.
Return_code structure from vendor library libtsm.a:

DATA #2 : Hexdump, 48 bytes
0x0FFFFFFFFFFFD8E8 : 0000 00A8 3435 3020 3136 3800 0000 0000 ....450 168.....
0x0FFFFFFFFFFFD8F8 : 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0FFFFFFFFFFFD908 : 0000 0000 0000 0000 0000 0000 0000 0000 ................


In addition to the failure of a backup or restore operation with TSM RC=168, log archiving might also fail with sqluvint return code 11 and the same TSM reason code 168. For example the following db2diag.log message might be observed when the log archive fails:



2006-12-03-23.02.11.134267+660 I100725A563 LEVEL: Error
PID : 2187462 TID : 1 PROC : db2logmgr (SAMPLE) 0
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1030
MESSAGE : sqluvint failed! Vendor rc:
DATA #1 : Hexdump, 48 bytes
0x0FFFFFFFFFFFCF90 : 0000 00A8 3435 3020 3136 3800 0000 0000 ....450 168.....
0x0FFFFFFFFFFFCFA0 : 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0FFFFFFFFFFFCFB0 : 0000 0000 0000 0000 0000 0000 0000 0000 ................

2006-12-03-23.02.11.134813+660 I101289A280 LEVEL: Error
PID : 2187462 TID : 1 PROC : db2logmgr (SAMPLE) 0
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1050
RETCODE : ZRC=0x0000000B=11

Answer

The following solutions correspond to the two possible causes of the TSM 168 error, as described above:

  1. Perform the following actions:
    1. Log in as root.
    2. Run the command dsmapipw from within the <instance home>/sqllib/adsm directory.
    3. Provide the password for the TSM node when prompted.

      Once these steps are complete, the encrypted password will be stored in a local file (/etc/security/adsm/TSM.PWD) along with the corresponding TSM server name and TSM node name.

      After the password has been generated and stored locally, it is not necessary to run the command dsmapipw again for other DB2 instances on the same machine--as long as they use the same TSM server and the same TSM node.
  2. Configure the DB2 instance to use the TSM API with the same bit width and then stop and start the instance.

    For example, the variables for a 64-bit instance would be set to values similar to the following:
    DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
    DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
    DSMI_LOG=/home/db2inst1/sqllib/db2dump

    For a 32-bit instance, the variables could be set to values similar to the following:
    DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin/dsm.opt
    DSMI_DIR=/usr/tivoli/tsm/client/api/bin
    DSMI_LOG=/home/db2inst1/sqllib/db2dump


Refer to DB2 UDB Version 8: Configuring a Tivoli Storage Manager client or DB2 Version 9: Configuring a Tivoli Storage Manager client

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Backup","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.1;8","Edition":"Enterprise Server;Express;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21252398