Professional Documents
Culture Documents
Possible errors
Before you start
The TSM bit level must match the DB2 bit level but it need not match the O/S.
The db2adutl and dsmapipw utilities read their environment from userprofile every
time they are run but db2 only reads it on instance start.
DB2 must be restarted for changes in userprofile to take effect.
Note that a SAP install will assign the DB2 instance owner the C shell.
This changes the way DSMI variables are set.
Some definitions:
DB2 script to set envirnment variables, in /db2/db2<sid>/sqllib.
userprofile This script will be read by users running bash, csh users will run usercshrc (in the
same dir.) - at least that's the way it works in a SAP environment.
usercshrc Equivalent of userprofile for csh users.
Check bit level of DB2
Compare DB2 bit level to TSM, they must be the same.
$ db2level
DB21085I Instance "db2sp1" uses "64" bits and DB2 code release "SQL09072"
with
level identifier "08030107".
Informational tokens are "DB2 v9.7.0.2", "special_24281", "IP23089_24281",
and
Fix Pack "2".
Product is installed at "/u01/db2/db2sp1/db2_software".
$ ls -l /opt/tivoli/tsm/client/api
total 248
drwxr-xr-x 3 root bin 4096 Mar 25 07:47 bin
drwxr-xr-x 3 root bin 4096 May 31 08:37 bin64
Configure TSM
This must be done as root and assumes you are on a 64bit server and that TSM has been
installed.
If you plan to run filesystem backups alongside DB2 then it is as well to create separate TSM
nodes for each - this worked for me.
Add stanza to dsm.sys
The dsm.sys file contains configuration parameters which the backup client uses to
communicate with the TSM server.
In dsm.sys the 'SERVERNAME' parameter is just a name used to identify a set of parameters
(a stanza), it does not refer to a physical server.
There is only one dsm.sys on each client but it can contain multiple servername stanzas.
The example below has two stanza, one for filesystem backups and one for DB2.
# cd /opt/tivoli/tsm/client/api/bin64
## Create or edit dsm.sys - add DB2 stanza
# vi dsm.sys
...
DEFAULTServer tsm13
Servername tsm13
Nodename db260
COMMmethod TCPip
TCPPort 1500
TCPServeraddress tsm13
PASSWORDAccess generate
QUERYSCHEDPERIOD 6
SCHEDLOGRETention 7
ERRORLOGRetention 14
ERRORLOGNAME /var/log/dsmerror.log
Servername tsm13_db2
Nodename db260_DB2
COMMmethod TCPip
TCPPort 1500
TCPServeraddress tsm13
PASSWORDAccess generate
QUERYSCHEDPERIOD 6
SCHEDLOGRETention 7
ERRORLOGRetention 14
ERRORLOGNAME /db2/db2sp1/sqllib/log/dsmerror.log
Create dsm_db2.opt
The dsm.opt file tells the backup client which servername stanza in dsm.sys to use.
There can be multiple dsm.opt files on the client, each referring to a different stanza in
dsm.sys.
For DB2 backups we have to create a new dsm.opt to pick up the DB2 configuration in
dsm.sys.
# cd /opt/tivoli/tsm/client/api/bin64
## Create dsm_db2.opt
# vi dsm_db2.opt
...
SERVERNAME tsm13_db2
export DSMI_DIR=/opt/tivoli/tsm/client/api/bin64
export DSMI_CONFIG=/opt/tivoli/tsm/client/api/bin64/dsm_db2.opt
export DSMI_LOG=/db2/db2sp1/sqllib/log
$ cat /db2/db2sp1/sqllib/usercshrc
# /db2/db2sp1/sqllib/adsm/dsmapipw
*************************************************************
* Tivoli Storage Manager *
* API Version = 5.5.1 *
*************************************************************
Enter your current password:
Enter your new password:
Enter your new password again: