IBM Support

Configuring DB2 and Tivoli Storage Manager in Windows

Question & Answer


Question

Configuration steps required for DB2 to work with Tivoli Storage Manager on Windows

Answer

Below are the steps required to configure DB2 Backups to be sent to the Tivoli Storage Manager Server.

1. Install Tivoli Storage Manager API software. This is included with the Tivoli Storage Manager Backup-Archive Client installation package.

2. Create a plain text file to be used as the options file for the DB2 node in c:\progra~1\common~1\Tivoli\TSM\api *for 32bit Windows
c:\progra~1\common~1\Tivoli\TSM\api64 *for 64bit Windows

Note that the default name is dsm.opt, but a different file name can be used. For example db2dsm.opt, nodename.opt, etc.. The options file must contain at least the following.

    TCPSERVERADDRESS xxx.xxx.xxx.xxx
    NODENAME DB2TSM
    PASSWORDACCESS GENERATE
3. Register the node DB2TSM on the Tivoli Storage Manager server, it is recommended that you use separate nodenames for your DB2 node and your filesystem node.
Make note of the password, as you will need it to authenticate in step 7 below.
Be sure to give the node the authority to delete it's backups (BACKDEL=YES), as DB2 will be controlling how long to keep the backup data.
    The DB2 backup objects are all uniquely named and will be in an ACTIVE state on the Tivoli Storage Manager Server until they are removed by DB2. When DB2 performs the deletions of the data, this will mark the object for immediate expiration on the Tivoli Storage Manager server. If BACKDEL is set to NO (the default value) then DB2 will not be able to delete the object. In this case, DB2 will make a second deletion attempt and mark the object as INACTIVE. The data will then be processed according to the retention values for the management class.

    A DB2 restore can only access data that has an ACTIVE state, thus it is recommended to setup the management class with a backup copygroup that has the following retention settings:
      VEREXIST=1
      VERDELETED=0
      RETEXTRA=0
      RETONLY=0

    It is not recommended to set this management class as the default within the policy domain unless you are registering your DB2 nodes in their own policy domain. The above retentions will only keep 1 current/active copy of a backup, which is not normally the desired retentions for other filesystem data.

    4. On the system where DB2 and the Tivoli Storage Manager client is installed, create an environment variable called DSMI_CONFIG (in upper-case) within the SYSTEM environment variable settings (Search Control Panel for 'Environment Variables') that contains the path and file name to the DB2 node's options file.

    Example:
      c:\progra~1\common~1\Tivoli\TSM\api64\dsm.opt
    It is not recommended to utilize the USER variable except in specific circumstances, such as when there are multiple instances on the same machine that need to be backed up via unique nodenames/options files.

    Another way to set environment variables would be to use the DB2_VENDOR_INI variable. Create a file called tsm.env that contains the path and file name to the dsm.opt used by DB2.

    Example:
      DSMI_CONFIG=c:\progra~1\common~1\Tivoli\TSM\api64\dsm.opt
    Then, open a DB2 command window and run :
      db2set -i <intancename> DB2_VENDOR_INI=d:\tsm.env

    Note: The DB2_VENDOR_INI environment variable is deprecated in DB2 v9.5 and might be removed in a future release.

    5. Reboot the system or restart the DB2 services, so that the DSMI_CONFIG variable will be loaded into the DB2 runtime engine.
    If the specified dsm.opt file does not exist or if DB2 does not get restarted, a DB2 backup using the Tivoli Storage Manager API client may fail with Reason Code 406 (No default user configuration file )

    Note: if you're binding the DB2 data to a non-default management class, update the DB cfg parameter TSM_MGMTCLASS prior to restarting DB2.

    Example:
      db2 update db cfg for db_name using tsm_mgmtclass my_mgmtclass

    6. Sign-on as the administrator, open a command window, and change to the ...\sqllib\adsm directory.

    7. Run the executable 'dsmapipw' and follow the prompts. It will ask for the current password, then for a new password, and confirmation of the new password. It should report whether or not the command was successful. To keep the existing password, enter the same identical password at all 3 prompts.

    8. It is possible to run the db2 command 'db2adutl query' to confirm that the password was set correctly. Db2adutl.exe is typically located in the c:\program files\sqllib\bin directory.

    It is important to note that if no backups have been performed, this will witness an error for "Filespace name not found" or " No objects on server match query" (RC=2060 or RC=2 respectively). However, even if an error is seen, you should still be able to check the activity log on the Tivoli Storage Manager server to confirm that the node, DB2TSM, authenticated.

    9. You can now perform a backup using the DB2 command line or the DB2 connect GUI.
    (For example, db2 backup db DBNAME use tsm.)

    The above instructions are for configuring the DB2 database backups to Tivoli Storage Manager. If you would like to configure the DB2 log archives to Tivoli Storage Manager, reference knowledgebase document 1670036 (Configuring DB2 log archives to Tivoli Storage Manager). See links below for this topic, as well as additional information on backing up DB2 to Tivoli Storage Manager.

    [{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Client","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

    Product Synonym

    TSM

    Document Information

    Modified date:
    17 June 2018

    UID

    swg21672745