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 Tivoli Storage Manager 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.
Windows operating systemsIn 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.
  1. 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 
  2. Set the DSMI_ api environment-variable configuration for the database instance:
    1. 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 
    2. Issue this command:
      db2set -i server1 DB2_VENDOR_INI=d:\tsmserver1\tsmdbmgr.env 
  3. 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. This value can be tcpip or sharedmem. For more information about shared memory, see step 4.
    • 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.
  4. Optional: Configure the server to back up the database by using shared memory. In this way, you might be able to reduce the processor load and improve throughput. Complete the following steps:
    1. Review the dsmserv.opt file. If the following lines are not in the file, add them:
      commmethod sharedmem 
      shmport port_number
      where port_number specifies the port to be used for shared memory.
    2. In the tsmdbmgr.opt file, locate the following lines:
      commmethod tcpip 
      tcpserveraddr localhost 
      tcpport 1500
      Replace the specified lines with the following lines:
      commmethod sharedmem 
      shmport port_number
      where port_number specifies the port to be used for shared memory.
  5. 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"