UNIX and Linux operating systems

Setting up a schedule on the client machine NodeA1

Use this procedure to define a schedule on the client machine with the client node NodeA1.

About this task

This example assumes the following setup:

  • The Tivoli® Storage Manager backup-archive client is installed on NodeA1 in the /usr/tivoli/tsm/client/ba/bin directory.
  • Data Protection for Oracle is installed on NodeA1 in the /usr/tivoli/tsm/client/oracle/bin64 directory.
  • An AIX® operating system is used.
For best results, set the password expiration for the Data Protection for Oracle node, NodeA1, to not expire. Otherwise, the password becomes out of sync between Data Protection for Oracle and the scheduler. Specify passwordaccess generate. If passwordaccess prompt is already specified, you can prevent password expiration by typing in the following command:
update node NodeA1 passexp=0

Scheduling Data Protection for Oracle backups with the Tivoli Storage Manager scheduler requires special configuration issues to be addressed. This procedure addresses this issue by creating a dsm.sys file from which to associate nodes for your client, Data Protection for Oracle, and scheduled backups.

Procedure

To set up a schedule on the client with client node NodeA1:

  1. Create a dsm.sys file in the /usr/tivoli/tsm/client/ba/bin directory if one does not exist. Add the following servername stanzas:
    1. Add a servername stanza for the file system backups that are associated with your Tivoli Storage Manager backup archive client. For example:
      servername   TSMbackup
         commmethod   tcpip
         tcpserveraddress    site.xyzinc.com
         tcpport    1500
         nodename   client
         passwordaccess    generate

      The servername TSMbackup setting must be specified in the dsm.opt file that is associated with the Tivoli Storage Manager backup archive client. The default directory location is /usr/tivoli/tsm/client/ba/bin.

    2. Add a servername stanza for the backups that are associated with Data Protection for Oracle. For example:
      servername   TSMOracle
         commmethod   tcpip
         tcpserveraddress     site.xyzinc.com
         tcpport    1500
         nodename   NodeA1
         passwordaccess    generate
         passworddir       /home/oracle user 

      Replace oracle user with the Oracle user ID of the target Oracle database instance.

      The servername TSMOracle setting must be specified in the dsm.opt file associated with Data Protection for Oracle. The default directory location is /usr/tivoli/tsm/client/oracle/bin64. This dsm.opt file can have a unique name, such as dsmoracle.opt. Make sure that the dsmi_orc_config option specifies the user options file, dsmoracle.opt in Step 1b, associated with Data Protection for Oracle. For example:
      dsmi_orc_config /usr/tivoli/tsm/client/oracle/bin64/dsmoracle.opt
    3. Add a servername stanza for the scheduled backups associated with Data Protection for Oracle. For example:
      servername   DPSched
         commmethod   tcpip
         tcpserveraddress    site.xyzinc.com
         tcpport    1500
         nodename   NodeA1
         passwordaccess    generate
         passworddir       /home/oracle user

      Replace oracle user with the Oracle user ID of the target Oracle database instance.

  2. Make sure that there is a symbolic link to this dsm.sys file so that the file is available to the Tivoli Storage Manager API directory, /usr/tivoli/tsm/client/api/bin64.
  3. Create the scheduler backup script, schedbkdb.scr, in the /usr/tivoli/tsm/client/oracle/sched/ directory. This script is the scheduler backup script that was defined for the scheduler in Setting up a schedule on the Tivoli Storage Manager server. The scheduler backup script runs the command script mysched.scr, which runs the RMAN backup script bkdb.scr. This example shows the scheduler backup script schedbkdb.scr:
    #!/bin/ksh
    su - OracleUser -c /home/oracle/sched/mysched.scr
  4. Create the command script mysched.scr in the /home/oracle/sched/ directory. A sample of the command script mysched.scris provided: in the following example:
    #!/bin/ksh
    export ORACLE_HOME=/orc11g/app/oracle/product/11.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    rman target agnttest/agnttest@target rcvcat rman/rman@rman
    cmdfile /home/oracle/sched/bkdb.scr msglog /home/oracle/sched/bkdb.log

    You must place the command text, rman target agnttest/agnttest@target rcvcat rman/rman@rman and cmdfile /home/oracle/sched/bkdb.scr msglog /home/oracle/sched/bkdb.log, on the same line in this command script. The command text is placed on two lines in this example to accommodate page formatting.

  5. Create the RMAN backup script bkdb.scr in the /home/oracle/sched/ directory. An example of the RMAN backup script bkdb.scr:
    run {
    allocate channel t1 type 'sbt_tape' parms 
    'ENV=(TDPO_OPTFILE=/home/oracle/sched/tdpo.opt)';
    allocate channel t2 type 'sbt_tape' parms 
    'ENV=(TDPO_OPTFILE=/home/oracle/sched/tdpo.opt)';
    
    backup
    format 'df_%t_%s_%p_%u_%c'
    (database); }
  6. Log in as the root user to the system where Data Protection for Oracle is installed as node name NodeA1.
  7. Start the scheduler in the inittab. Use the servername parameter to specify the correct stanza to use in the dsm.sys file:
      dsmc sched -servername=DPSched

    Data Protection for Oracle is now enabled for scheduled backups.

What to do next

For security, in a default installation, the Tivoli Storage Manager client's trusted communications agent (dsmtca) allows both root access for the scheduler and non-root access for Data Protection for Oracle to read and write the same password file TSM.PWD in passworddir. If your system is set up otherwise, see the Enable non-administrators to manage their own data topic in the Tivoli Storage Manager client documentation.

Create servername stanzas in both dsm.sys files by the same servername as in the dsmi_orc_config file which is set in your TDPO_OPTFILE.

For Data Protection for Oracle, the stanza must be in the following file path: /usr/tivoli/tsm/client/api/bin64/dsm.sys

For the scheduler associated with Data Protection for Oracle a stanza by the same servername must be in the following file path: /usr/tivoli/tsm/client/ba/bin64/dsm.sys

Ensure the following 6 options are identical in both files:
  • servername TSMOracle
  • tcpserveraddress site.xyzinc.com
  • tcpport 1500
  • nodename NodeA1
  • passwordaccess generate
  • passworddir /home/oracle
Other options can or even must be different in both files.
To the stanza servername TSMOracle in /usr/tivoli/tsm/client/api/bin64/dsm.sys, you can add options specific to Data Protection for Oracle, for example:
INCLUDE /adsmorc/.../DB* mgmtclassnameforDBs 
INCLUDE /adsmorc/.../LOG* mgmtclassnameforLogs 
enablelanfree yes 
lanfreecommmethod sharedmem 
* errorlogname /home/oracle/dsierror__NodeA1.log 
When the option DSMI_LOG is set in your TDPO_OPTFILE to point to a directory with read and write permissions for the Oracle user, you don't need to set errorlogname in /usr/tivoli/tsm/client/api/bin64/dsm.sys.

However, if you decide to set errorlogname for Data Protection for Oracle, then its value must be different from errorlogname in /usr/tivoli/tsm/client/ba/bin64/dsm.sys, to prevent concurrent write access to the same file by Data Protection for Oracle running as oracle user and the scheduler running as root.

To the stanza servername TSMOracle in /usr/tivoli/tsm/client/ba/bin64/dsm.sys you may add scheduler specific options, for example:
schedmode prompted 
tcpclientport 1502 
schedlogname /home/root/dsmsched_NodeA1.log 
* commmethod tcpip <- unnecessary because it's default. 
errorlogname /home/root/dsmerror_NodeA1.log 
When using passwordaccess generate, the options TDPO_NODE, TDPO_OWNER, and TDPO_PSWDPATH must not be set in your TDPO_OPTFILE.

The temporary switching from passwordaccess generate to passwordaccess prompt can become necessary when existing Oracle backups in Tivoli Storage Manager storage with a certain OWNER need to be accessed by a user with a different user name, for example, when restoring a database to a system with another Oracle user name. In this type of situation you can avoid the typical restore error ANS1302E (RC2). No objects on server match query by setting /usr/tivoli/tsm/client/api/bin64/dsm.sys to passwordaccess prompt, because this allows specifying a TDPO_OWNER in your TDPO_OPTFILE, who is different from the name of the user who is restoring the data.

For this scenario you also have to complete the following steps:
  1. Set TDPO_NODE and TDPO_PSWDPATH in your TDPO_OPTFILE.
  2. Rerun tdpoconf password.