ADSM-L

Re: DB2 backups with multiple DB's on one host

2003-11-17 09:36:20
Subject: Re: DB2 backups with multiple DB's on one host
From: Bill Boyer <bill.boyer AT VERIZON DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 17 Nov 2003 09:35:50 -0500
Get the redbook "Backing up DB2 using TSM" SG24-6247. Lots of good
information here.

What I did to backup a DB2 server on AIX that had 4 instances:

1. In the $HOME for each instance I created a $HOME/tsm directory to hold
all the files/logs.
2. In the DSM.SYS file, I created a server stanza for each DB2 instance
specifying the nodename for that instance.
3. In the $HOME/tsm I created the DSM.OPT file for that instance, pointing
to the correct servername in the DSM.SYS file.
4. In the /$HOME/sqllib/userprofile file, I added all the env variables. The
DSMI_CONFIG points to the $HOME/TSM/DSM.OPT file, and I set the DSMI_LOG to
the $HOME/TSM directory. The redbook recommends you use this file which is a
user-defined profile. It gets called from the $HOME/.profile for the
instance, if it exists. This file will not change during upgrades or
maintenance of DB2.
5. DB2STOP/DB2START each instance.
6. Set the password. Since this needs to be run as "root", you need to
export the DSMI_CONFIG variable pointing to the correct instances' DSM.OPT
file. Then run the $HOME/sqllib/adsm/dsmapipw program.
7. You can then log in as the instance and verify things are working using
the DB2ADUTL utility.
8. You can now use the DB2 BACKUP DB USE TSM....

To automate the backup, in the $HOME/tsm directory I created a backup.ksh
file that backups up all the databases for that instance. I then created a
directory /db2/tsm with a backup.ksh file in it. This file does a 'su -
<instanceid> -c "$HOME/tsm/backup.ksh"' for each instance. It does a lot of
other things, plus keeps track of the return code from all the backup steps.
This return code is then used when exiting the script and becomes the status
of the backup event in TSM.

Bill Boyer
DSS, Inc.


-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
Zlatko Krastev
Sent: Monday, November 17, 2003 9:00 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: DB2 backups with multiple DB's on one host


Looking at DB2 Administration Guide:
"Tivoli Storage Manager Node Name (tsm_nodename)
...
This parameter is used to override the default setting for the node name
associated with the Tivoli Storage Manager (TSM) product. The node name is
needed to allow you to restore a database that was backed up to TSM from
another node.

The default is that you can only restore a database from TSM on the same
node from which you did the backup. It is possible for the tsm_nodename to
be overridden during a backup done through DB2 (for example, with the
BACKUP DATABASE command)."

So the parameter is for emergency recovery and is not intended for
day-to-day operations.


What you are trying to accomplish can be done in two ways:
1. Using include/exclude list each database can be bound to different TSM
management class with different destionation pools
2. Separate each database in own DB2 instance and set instance owners
environment DSMI_CONFIG accordingly. Only this way you can achieve your
two-TSM-nodes goal.

Do not forget that database configuration in DB2 is used only for
full/incremental backups. It depends on the user exit how transaction logs
are handled. You can find in same DB2 Guide:
"Only one user exit program can be invoked within a database manager
instance. ..."

Discuss the options with your DB2 DBA to select the best fit.

Zlatko Krastev
IT Consultant






"French, Michael" <Michael.French AT SAVVIS DOT NET>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
14.11.2003 02:05
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        DB2 backups with multiple DB's on one host


        I have a customer who has two DB2 databases on one server and I
need to back them up with TSM.  Is it possible to do this with two
separate node names to keep them apart?  If so, how would I do this? Since
you have to define 3 environment variables specific to DB2 for TSM and one
of them points to the dsm.opt file, can I specify two different node
entries inside of the opt file?  Would it look something like this:

SERVERNAME TSM1
COMMMEHOD tcpip
TCPBUFFSIZE 512
TCPWINDOWSIZE 128
TCPNODELAY yes
TCPSERVERADDRESS 10.82.96.21
NODENAME TIVANAI
PASSWORDACCESS generate

SERVERNAME TSM1
COMMMEHOD tcpip
TCPBUFFSIZE 512
TCPWINDOWSIZE 128
TCPNODELAY yes
TCPSERVERADDRESS 10.82.96.21
NODENAME TIVASSI
PASSWORDACCESS generate

        If I do this, how do I specify inside of DB2 which node to use?  I
know that there is a parameter called TSM_NODENAME that is set inside DB2,
but I don't know how to generate the encrypted password since it only
grabs the first entry out of the opt file.

Michael French
Savvis Communications
IDS01 Santa Clara, CA
(408)450-7812 -- desk
(408)239-9913 -- mobile