Configure the Tivoli® Storage
Manager backup-archive
client to restore the WAREHOUS database.
Procedure
To configure the Tivoli Storage
Manager backup-archive
client, complete the following steps:
- Install the Tivoli Storage
Manager backup-archive
client on the same system where IBM® Tivoli Monitoring is installed.
Complete the steps in Installing Tivoli Storage Manager clients.
- Log on with the root user ID to the system where Tivoli Monitoring
for Tivoli Storage Manager is installed, and create the dsm.sys file in the following directory:
- /usr/tivoli/tsm/client/api/bin64
- /opt/tivoli/tsm/client/api/bin64
Add the following statements to the file:servername myserver
commmethod tcpip
tcpport 1500
tcpserveraddress myaddress.mycompany.com
passwordaccess generate
nodename mynode
tcpclientaddress 11.22.33.44
*This is the include list that binds the mgmtclass to backup and logs files
INCLUDE /.../*
INCLUDE /WAREHOUS/.../* WAREHOUS_BACKUPS
INCLUDE /WAREHOUS/.../*.LOG WAREHOUS_BACKUPS
where myserver is the name of the Tivoli Storage
Manager server.
- Create the dsm.opt file in the /home/db2inst1 directory with the following text:
server myserver
where myserver, is the same as the Tivoli Storage
Manager server name in the dsm.sys file.
- Log on to DB2 by using the DB2 instance ID, which by default is db2inst1. Remain logged on with the DB2 instance ID to perform most of the remaining steps, except where notated:
su - db2inst1
Tip: This user ID and password were defined when IBM Tivoli Monitoring for Tivoli Storage Manager was installed and configured on the system.
- Set up the environment variables that are needed by the Tivoli Storage
Manager client by editing the instance profile /home/db2inst1/.profile, and adding the following lines:
export DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
export DSMI_CONFIG=/home/db2inst1/dsm.opt
export DSMI_LOG=/home/db2inst1
export DSMI_DIR=/opt/tivoli/tsm/client/api/bin64
export DSMI_CONFIG=/home/db2inst1/dsm.opt
export DSMI_LOG=/home/db2inst1
- From the current open shell, source the /home/db2inst1/.profile to add the DSMI_XXXX variables to its environment:
. /home/db2inst1/.profile
- With the root user ID, start the Manage Tivoli Monitoring Services console, which is also commonly referred to as CandleManage, /opt/tivoli/tsm/reporting/itm/bin/CandleManage, and stop all IBM Tivoli Monitoring agents and services in this order:
- Tivoli Storage
Manager agents
- Summarization and Pruning agent
- Warehouse Proxy agent
- Tivoli Enterprise
Portal server
- Tivoli Enterprise
Monitoring server
- Determine whether there are any active application
connections by issuing this command:
db2 list applications for db warehous
- If there are active connections, stop them
by issuing the following command:
db2 force applications all
- To complete the configuration of the Tivoli Storage
Manager client,
restart DB2:
db2stop
db2start
- With the root User ID, source the db2 instance profile to apply the DSMI_XXXX environment variables:
. /home/db2inst1/.profile
- With the root User ID, set the Tivoli Storage
Manager password with this command:
/opt/tivoli/tsm/reporting/db2/adsm/dsmapipw
When prompted, specify the password for the node.
- While logged in using the db2inst1 user ID, confirm that the password was correctly set by issuing the following command:
Important: Perform this step by using the db2inst1 user ID, because the /home/db2inst1/tsm/dsierror.log file is owned by the first ID to issue the following command:
db2adutl query
If the command returns a message that states that no db2 objects are found, you successfully set the password.
- Optional: You can check
the activity log on the Tivoli Storage
Manager server to
confirm that the node successfully authenticated when you ran the db2adutl command.
- Optional: You can check the /home/db2inst1/ directory for the dsierror.log file to ensure that it is owned by the db2inst1 user ID, and investigate the log file for any potential errors. If the file is owned by the root user, delete it so that it is recreated and owned by the db2inst1 user.
- Configure DB2 to roll forward by issuing
the following command:
db2 update db cfg for WAREHOUS using logarchmeth1 tsm
- Configure the database to use the management class that you used when you backed up the database by issuing the following command:
db2 update db cfg for WAREHOUS using tsm_MGMTCLASS WAREHOUS_BACKUPS
- Set TRACKMOD to ON by
issuing the following command:
db2 update db cfg for WAREHOUS using TRACKMOD ON
- If you see the SQL1363W message that is displayed in response to these commands, one or more of the parameters that are submitted for modification were not dynamically changed. Issue the following command:
db2 force applications all
- Ensure that the settings for LOGARCHMETH1, TSM_MGMTCLASS,
and TRACKMOD have been updated by issuing the following
command:
db2 get db cfg for warehous