DB2 and TSM Cross-node recovery

To recover/access the backup image of the database that was backed up from a different server. Typically to access production database from dev/qa

 In the following situation :

Assumption 1 –  is that there are 2 servers : MYSERVER1 and MYSERVER2

MYSERVER1 is the source server

MYSERVER2  is the backup server

Assumption 2 – The tsm client is installed on the server

Assumption 3  – In the environment variables  of the particular instance if the SET command is issued , there should be the following  3 variables

DSMI_CONFIG=/opt/tsm/client/api/bin/dsm_db2.opt

DSMI_DIR=/opt/tsm/client/api/bin

DSMI_LOG=/db2/tsmlog

In the following example , MYSERVER1 has become unavailable

Step 1 – create an entry in “/opt/tsm/client/ba/bin/dsm.sys”  on MYSERVER2 such as

SErvername crossnode_mytsmserver_db2

COMMMethod           TCPip

TCPPort              1500

TCPServeraddress      mytsmserver.net

NODename             MYSERVER1_DB2

*   passwordaccess generate

Step 2- adjust the entry in : “/opt/tsm/client/api/bin/dsm.opt”

SErvername crossnode_ mytsmserver_db2

Step 3 – from within the db2 instance

Now we should be able to query any backup image, provided you have the required details.

db2adutl query db <dbname> password <my_tsm_passwd>

Appendix 1 –

————————MYSERVER1 ——–START———————————————–

SErvername  mytsmserver

COMMMethod         TCPip

TCPPort            1500

TCPServeraddress   mytsmserver.net

NODename MYSERVER1

passwordaccess generate

SErvername mytsmserver_db2

COMMMethod           TCPip

TCPPort              1500

TCPServeraddess      mytsmserver.net

NODename             MYSERVER1_DB2

passwordaccess generate

————————MYSERVER1 ——–FINISH———————————————–

———————–MYSERVER2 —————-START—————————————-

SErvername  mytsmserver

SCHEDLOGRETENTION 7 D

COMMMethod         TCPip

TCPPort            1500

TCPServeraddress   mytsmserver.net

NODename MYSERVER2

passwordaccess generate

SErvername mytsmserver_db2

COMMMethod           TCPip

TCPPort              1500

TCPServeraddess      mytsmserver.net

NODename             MYSERVER2_DB2

passwordaccess generate

———————–MYSERVER2 —————-FINISH—————————————-

Leave a Reply

Discover more from ciquery

Subscribe now to keep reading and get access to the full archive.

Continue reading