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 IBM® Storage Protect backup-archive client is installed on NodeA1 in the /usr/tivoli/tsm/client/ba/bin64 directory.
  • Data Protection for Oracle is installed on NodeA1 in the /usr/tivoli/tsm/client/oracle/bin64 directory.
  • An AIX® operating system is used.

Scheduling Data Protection for Oracle backups with the IBM Storage Protect scheduler requires special configuration issues to be addressed. This procedure addresses this issue by creating dsm.sys files from which to associate stanzas for your client, Data Protection for Oracle, and scheduled backups.

The passwordaccess generate option is more secure and convenient for every-day use than the passwordaccess prompt option. The passwordaccess generate option is the recommended setting for Data Protection for Oracle.

In a default installation, the IBM Storage Protect 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 not a default installation, see the Enable non-administrators to manage their own data chapter in the IBM Storage Protect client manual.

Procedure

To set up a schedule on the client with client node NodeA1:
  1. Create dsm.sys files in both the /usr/tivoli/tsm/client/ba/bin64 and the /usr/tivoli/tsm/client/api/bin64 directories, if these files do not exist.
  2. Make sure the dsm.sys file for the backup / archive client /usr/tivoli/tsm/client/ba/bin64/dsm.sys is not linked with the API client's dsm.sys file /usr/tivoli/tsm/client/api/bin64/dsm.sys because for some options, identical values in both files can lead to malfunction.
    1. Add a servername stanza to /usr/tivoli/tsm/client/ba/bin64/dsm.sys for the file system backups that are associated with your IBM Storage Protect 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 IBM Storage Protect backup archive client. The default directory location is /usr/tivoli/tsm/client/ba/bin64.

    2. Create servername stanzas in both dsm.sys files using 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 file /usr/tivoli/tsm/client/api/bin64/dsm.sys.

      For the scheduler associated with Data Protection for Oracle, a stanza from the same servername parameter must be in the file /usr/tivoli/tsm/client/ba/bin64/dsm.sys. When the password expires, and the new node credentials are stored to TSM.PWD, passwordaccess generate couples the password with the servername from the dsm.sys file.

      Ensure that the following six options are identical in both files.

      • servername TSMOracle
      • tcpserveraddress site.xyzinc.com
      • tcpport 1500
      • nodename NodeA1
      • passwordaccess generate
      • passworddir /home/oracle

      Most of the other options will be different in each file. Some specific options cannot be the same in each file.

    3. 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. These different values prevent concurrent write access to the same file by Data Protection for Oracle, which is running as oracle user and the scheduler, which is running as root.

    4. To the stanza servername TSMOracle in /usr/tivoli/tsm/client/ba/bin64/dsm.sys, you can add options specific to the scheduler.
      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 you use passwordaccess generate, the options TDPO_NODE, TDPO_OWNER, and TDPO_PSWDPATH must not be set in your TDPO_OPTFILE.

  3. The temporary switching from passwordaccess generate to passwordaccess prompt can become necessary when your existing Oracle backups in IBM Storage Protect storage, with a certain owner, need to be accessed by a user with a different user name. For example, when you restore 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.

    Examples:

    Specify TDPO_OWNER oraxyz in order to access files in IBM Storage Protect storage, whose OWNER is oraxyz.

    Specify TDPO_OWNER in order to access files in IBM Storage Protect storage, whose OWNER is empty.

    For this scenario, you must also set TDPO_NODE and TDPO_PSWDPATH in your TDPO_OPTFILE and rerun tdpoconf password.

    The servername TSMOracle setting must be specified in the dsm.opt file that is 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, associated with Data Protection for Oracle. For example:
    dsmi_orc_config /usr/tivoli/tsm/client/oracle/bin64/dsmoracle.opt
  4. 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 IBM Storage Protect 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
  5. Create the command script mysched.scr in the /home/oracle/sched/ directory. A sample of the command script mysched.scr is 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.

  6. 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); }
  7. Log in as the root user to the system where Data Protection for Oracle is installed as node name NodeA1.
  8. 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=TSMOracle

    Data Protection for Oracle is now enabled for scheduled backups.