Windows: Preparing the database manager for database backup
To back up the data in the database to Tivoli® Storage Manager, you must enable the database manager and configure the Tivoli Storage Manager application programming interface (API).
About this task
If you use the configuration wizard to create a Tivoli Storage Manager server instance, you do not have to complete these steps. If you are configuring an instance manually, complete the following steps before you issue either the BACKUP DB or the RESTORE DB commands.
Attention: If the database is unusable, the entire Tivoli Storage
Manager server is
unavailable. If a database is lost and cannot be recovered, it might
be difficult or impossible to recover data that is managed by that
server. Therefore, it is critically important to back up the database.
In the following
commands, the examples use server1 for the
database instance and d:\tsmserver1 for the Tivoli Storage
Manager server directory.
Replace these values with your actual values in the commands.
- Create a file that is called tsmdbmgr.env in
the d:\tsmserver1 directory with the following
contents:
DSMI_CONFIG=server_instance_directory\tsmdbmgr.opt DSMI_LOG=server_instance_directory
- Set the DSMI_ api environment-variable configuration for the database
instance:
- Open a DB2® command window.
One method is to go to the C:\Program Files\Tivoli\TSM\db2\bin directory,
or if you installed Tivoli Storage
Manager in a different
location, go to the db2\bin subdirectory in your
main installation directory. Then, issue this command:
db2cmd
- Issue this command:
db2set -i server1 DB2_VENDOR_INI=d:\tsmserver1\tsmdbmgr.env
- Open a DB2® command window.
One method is to go to the C:\Program Files\Tivoli\TSM\db2\bin directory,
or if you installed Tivoli Storage
Manager in a different
location, go to the db2\bin subdirectory in your
main installation directory. Then, issue this command:
- Create a file that is called tsmdbmgr.opt in
the d:\tsmserver1 directory with the following
contents:
************************************************* nodename $$_TSMDBMGR_$$ commmethod tcpip tcpserveraddr localhost tcpport 1500 passwordaccess generate errorlogname d:\tsmserver1\tsmdbmgr.log
where- nodename specifies the node name the client API uses to connect to the server during a database backup. This value must be $$_TSMDBMGR_$$ for database backup to work.
- commethod specifies the client API used to contact the server for database backup.
- tcpserveraddr specifies the server address that the client API uses to contact the server for database backup. To ensure that the database can be backed up, this value must be localhost.
- tcpport specifies the port number that the client API uses to contact the server for database backup. Ensure that you enter the same tcpport value that is specified in the dsmserv.opt server options file.
- passwordaccess is required for the backup node to connect to the server on windows systems.
- errorlogname specifies the error log where the client API logs errors that are encountered during a database backup. This log is typically in the server instance directory. However, this log can be placed in any location where the instance user ID has write-permission.
- Enter the following command on one
line:
"c:\program files\tivoli\tsm\server\dsmsutil.exe" UPDATEPW /NODE:$$_TSMDBMGR_$$ /PASSWORD:TSMDBMGR /VALIDATE:NO /OPTFILE: "d:\tsmserver1\tsmdbmgr.opt"