You are on page 1of 5

WORK INSTRUCTION

Defining the Detailed Implementation of a Procedure

Managed Tape DB2 Hot Backup Instruction


Summary: This work instruction outlines the steps required to provision a hot DB2 backup with a TSM TDP agent for a TSM Managed Tape Backup customer.

DETAILS
Steps to Take When Provisioning A DB2 TSM TDP Agent for Hot Backup
Prerequisites: The steps included in this work instruction are dependant on a DB2 DBA (Data Base Administrator)
being made available for all DB2 DBA responsibilities. The steps required to utilize TSM as a backup utility for DB2 are largely the function of the DB2 DBA. Where there are instructions that require the configuration of client server DB2 settings to be modified the DB2 DBA will be responsible. Where there are instructions that require access to the TSM server the Tape Implementation Engineer is responsible.

Windows 1. Install Tivoli Storage Manager Backup-Archive client (including the API). 2. Create a plain text file dsm.opt in x:\progra~1\Tivoli\TSM\api.
It must contain at least the following. COMMMETHOD TCPIP TCPSERVERADDRESS xxx.xxx.xxx.xxx NODENAME DB2TSM PASSWORDACCESS GENERATE

3. Register the node DB2TSM on the Tivoli Storage Manager server.


It is recommended to create a new Management Class and Copy Group on the Tivoli Storage Manager server for this node. The management class with a backup copygroup should have the following retention settings: VEREXIST=1 VERDELETED=0 RETEXTRA=0 RETONLY=0 Example Commands for Management Class and Copygroup creation on the TSM server; DEFINE MGMTCLASS CST03.TEFA STANDARD DB2 DESCRIPTION="DB2 Management Class Teach For America" SPACEMGTECHNIQUE=NONE AUTOMIGNONUSE=0 MIGREQUIRESBKUP=YES MIGDESTINATION=DISK.ONSITE DEFINE COPYGROUP CST03.TEFA STANDARD DB2 TYPE=BACKUP DESTINATION=DISK.ONSITE FREQUENCY=0 VEREXISTS=1 VERDELETED=0 RETEXTRA=0 RETONLY=0 MODE=MODIFIED SERIALIZATION=SHRSTATIC VALIDATE POLICYSET CST03.TEFA STANDARD ACTIVATE POLICYSET CST03.TEFA STANDARD

4. In Control Panel/System for the environment SYSTEM variables, specify the variable DSMI_CONFIG with the value:
x:\progra~1\Tivoli\TSM\api\dsm.opt Note: DSMI_CONFIG is case sensitive. The SYSTEM not the USER variable needs to be set.

5. Reboot the system or restart the DB2 services, so that the DSMI_CONFIG variable will be loaded into the DB2 runtime engine. Otherwise, a backup to Tivoli Storage Manager will fail with error 406 DSM.OPT file not found. 6. Sign-on as db2admin 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 if it is successful. 8. Run the db2 command 'db2adutl query' to confirm that the password file was correctly set. If the command comes back and says no db2 objects found, it is working (you haven't done any backups yet). You should be able to check the activity log on the Tivoli Storage Manager server to confirm that the node DB2TSM authenticated. Db2adutl.exe is located in the x:\program files\sqllib\bin directory. 9. You can now perform a backup using the db2 command line or the db2 connect GUI. (For example, backup db DBNAME use tsm.) AIX Here is a quick start guide for backing up DB2 to Tivoli Storage Manager. This is based on the AIX OS and the 3.7 or 4.1 Tivoli Storage Manager API level. DB2 provides native support for backing up to Tivoli Storage Manager. DB2 utilizes the Tivoli Storage Manager API to perform these backups. The following is the minimum steps necessary to get DB2 to backup to Tivoli Storage Manager: 1. Install DB2. 2. Install Tivoli Storage Manager API. 3. Create a plain text file dsm.opt in /usr/tivoli/tsm/client/api/bin.
It only needs one line, the value for SERVERNAME is arbitrary, but must match the dsm.sys file:
SERVERNAME DB2

4. 4. Create a plain text file dsm.sys in /usr/tivoli/tsm/client/api/bin.


It must contain at least the following: SERVERNAME DB2 COMMMETHOD TCPIP TCPSERVERADDRESS xxx.xxx.xxx.xxx NODENAME DB2TSM PASSWORDACCESS GENERATE

5. 5. Register the node DB2TSM on the Tivoli Storage Manager server.


It is recommended to create a new Management Class and Copy Group on the Tivoli Storage Manager server for this node. The management class with a backup copygroup should have the following retention settings: VEREXIST=1 VERDELETED=0 RETEXTRA=0 RETONLY=0

6. Sign-on as root and cd to the db2 directory that contains the files db2adutl and dsmapipw. 7. Run the executable 'dsmapipw' and follow the prompts.

It will ask for the current Tivoli Storage Manager node password, then for a new password, and confirmation of the new password. It should report if it is successful. 8. Run the command 'db2adutl query' to confirm that the password file was correctly set. If the command comes back and says no db2 objects found, then it is working (you haven't done any backups yet). You should 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 command line or the db2 connect GUI. For example, db2 backup db DBNAME use tsm. Additional DB2 information: In the home/db2instance/sqllib directory run '. db2profile' to update the signed on user with the needed environment variables (DB2INSTANCE=db2inst1, for example). Start db2 command line processor via /home/db2instance/sqllib/bin/db2. Get db cfg for DBNAME. Update db cfg for DBNAME using TSM_PASSWORD NULL. (Similar syntax for another Tivoli Storage Manager parameters. NULL causes the parameter to be reset to nothing.) Backup db DBNAME to /test (backup to a directory).

Sun Solaris Here is a quick start guide for backing up DB2 to Tivoli Storage Manager. This will be based on the Sun Solaris and the 3.7 or 4.1 Tivoli Storage Manager API level. DB2 provides native support for backing up to Tivoli Storage Manager. DB2 utilizes the Tivoli Storage Manager API to perform these backups. The following is the minimum steps necessary to get DB2 to backup to Tivoli Storage Manager: 1. Install DB2 2. Install Tivoli Storage Manager API. 3. Create a plain text file dsm.opt in /opt/tivoli/tsm/client/api/bin.
It only needs one line, the value for SERVERNAME is arbitrary, but must match the dsm.sys file:
SERVERNAME DB2

4. Create a plain text file dsm.sys in /opt/tivoli/tsm/client/api/bin.


It must contain at least the following: SERVERNAME DB2 COMMMETHOD TCPIP TCPSERVERADDRESS xxx.xxx.xxx.xxx NODENAME DB2TSM PASSWORDACCESS GENERATE

5. Register the node DB2TSM on the Tivoli Storage Manager server.


It is recommended to create a new Management Class and Copy Group on the Tivoli Storage Manager server for this node. The management class with a backup copygroup should have the following retention settings: VEREXIST=1 VERDELETED=0 RETEXTRA=0 RETONLY=0

6. Sign-on as root and cd to the db2 directory that contains the files db2adutl and dsmapipw. 7. Run the executable 'dsmapipw' and follow the prompts. It will ask for the current Tivoli Storage Manager node password, then for a new password, and confirmation of the new password. It should report if it is successful. 8. Run the command 'db2adutl query' to confirm that the password file was correctly set. If the command comes back and says no db2 objects found, then it is working (you haven't done any backups yet). You should 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 command line or the db2 connect GUI. For example, db2 backup db DBNAME use tsm. Additional DB2 information: In the /export/home/db2instance/sqllib directory run '. db2profile' to update the signed on user with the needed environment variables (DB2INSTANCE=db2inst1, for example). Start db2 command line processor via /export/home/db2instance/sqllib/bin/db2. Get db cfg for DBNAME. Update db cfg for DBNAME using TSM_PASSWORD NULL. (Similar syntax for other Tivoli Storage Manager parameters. NULL causes the parameter to be reset to nothing.) Backup db DBNAME to /test (backup to a directory).

You might also like