Setting up a schedule on the workstation with the Oracle Server

Use this procedure to define a schedule on the workstation with the Oracle Server.

About this task

This example assumes the following setup:

  • The IBM® Storage Protect backup archive client is installed on the Oracle Server in the following directory:
    C:\Program Files\Tivoli\TSM\baclient
  • The Data Protection for Oracle for the Oracle server is installed in the following directory:
    C:\Program Files\Tivoli\TSM\AgentOBA64
  • The options files in each of these directories are updated so that the communication parameters point to the IBM Storage Protect server.

Procedure

To set up a schedule on the workstation with the Oracle Server:
  1. Log in with a Windows™ account that has administrative privileges.
  2. Change to the backup archive client installation directory with this command: C:\>cd \Program Files\Tivoli\TSM\baclient
  3. Use the IBM Storage Protect Client Service Configuration Utility dsmcutil to install the IBM Storage Protect Scheduler Service. Type in the command from your current location in the backup archive client installation directory.
    For example:
      dsmcutil inst /name:"TSM Oracle Bkup Scheduler" 
      /node:nodea1 /password:passworda1 /autostart:yes 
      /clientdir:"C:\Program Files\Tivoli\TSM\baclient"
      /optfile:"C:\Program Files\Tivoli\TSM\AgentOBA64\dsm.opt"
      /validate:yes 

    You can modify the command to contain options specific to your schedule.

    This example shows the output:
    TSM Windows NT Client Service Configuration Utility
    Command Line Interface - Version 8, Release 1, Level 0
    (C) Copyright IBM Corporation, 1990, 2016, All Rights Reserved.
    
    TSM Api Version 8.1.23
    
    Command: Install TSM Client Service
    Machine: ABC-ARTXNC(Local Machine)
    
    
    
    Installing TSM Client Service:
    
           Machine          : ABC-ARTXNC
           Service Name     : TSM Oracle Bkup Scheduler
           Client Directory : C:\Program Files\Tivoli\TSM\baclient
           Automatic Start  : yes
           Logon Account    : LocalSystem
    
    The service was successfully installed.
    
    
    Creating Registry Keys ...
    
    Updated registry value 'ImagePath' .
    Updated registry value 'EventMessageFile' .
    Updated registry value 'TypesSupported' .
    Updated registry value 'TSM Oracle Bkup Scheduler' .
    Updated registry value 'ADSMClientKey' .
    Updated registry value 'OptionsFile' .
    Updated registry value 'EventLogging' .
    Updated registry value 'ClientNodeName' .
    
    Generating registry password ...
    Authenticating TSM password for node NODEA1 ...
    
    Connecting to TSM Server via client options file 
    'C:\Program Files\Tivoli\TSM\AgentOBA64\dsm.opt' ...
    
    Password authentication successful.
    
    The registry password for TSM node NODEA1 has been updated.
    
    
    Starting the 'TSM Oracle Bkup Scheduler' service .......
    
    The service was successfully started.

    The options file that is defined for Data Protection for Oracle is used by the scheduler when it validates the node and password. The options file is also used when contacting the IBM Storage Protect server for schedule information. This example assumes that the dsm.opt file is updated so that the communication parameters point to the IBM Storage Protect server to which the Oracle databases are to be backed up.

    If this message displays:
       A communications error occurred connecting to the IBM Storage Protect
    server
    Ensure that the dsm.opt file contains entries that point to the correct IBM Storage Protect server. Also, ensure that the IBM Storage Protect server is running. If you must make a correction, enter the following command:
      dsmcutil  remove /name:"TSM Oracle Bkup Scheduler" 
    Then enter the command that is given at the beginning of this step.
  4. Ensure that Data Protection for Oracle is running under the Oracle Site Services account so that it can access the Oracle backup API. The Data Protection for Oracle scheduler service must log on with that account. The scheduler service account information can be specified through the services applet in the control panel.
  5. Create a batch file that is called orcsched.cmd and place it in the following location:
    C:\Program Files\Tivoli\TSM\AgentOBA64\sched\orcsched.cmd
    Note: The scheduler service runs from the Windows system directory, so it is important that complete paths are specified for all file names and non-system commands. The scheduler service checks the Windows system directory for input and produces its output by default.
    The following is an example of the orcsched.cmd file:
    rem orcsched.cmd 
    rem ======================= 
     
    rem ======================= 
    rem setting oracle sid 
    rem ======================= 
    set oracle_sid=ilr
     
    rem ======================= 
    rem set orc executable binary 
    rem ======================= 
    set ora_exe=c:\oracle\bin\rman.exe
     
    %ora_exe% cmdfile 'C:\rman\bkdb.rmn'
    
    The following is an example of the bkdb.rmn file:
    connect target agnttest/agttest
    run
    {
    allocate channel ch1 type 'SBT_TAPE' parms 
    	'ENV=(TDPO_OPTFILE=C:\oracle\tdpo.opt)';
    allocate channel ch2 type 'SBT_TAPE' parms 
    	'ENV=(TDPO_OPTFILE=C:\oracle\tdpo.opt)';
    allocate channel ch3 type 'SBT_TAPE' parms 
    	'ENV=(TDPO_OPTFILE=C:\oracle\tdpo.opt)';
    allocate channel ch4 type 'SBT_TAPE' parms 
    	'ENV=(TDPO_OPTFILE=C:\oracle\tdpo.opt)';
    backup (database);
    release channel ch1;
    release channel ch2;
    release channel ch3;
    release channel ch4;
    }
    Note: The allocate channel entry for each channel is divided on two lines after the parms option to accommodate page formatting. The bkdb.rmn file must have the allocate channel entry for each channel specified on one line of text.
  6. The scheduler service is now installed, but is not yet started. To start the service, issue the following command:
      net start "TSM Oracle Bkup Scheduler"

    A message is displayed indicating that the Scheduler is starting up.

    Note, because autostart=yes is specified, the IBM Storage Protect scheduling service is automatically started each time the Windows system is restarted.

    Your system is now ready to run automatic daily online database backups.

Results

Note: If you want to use the IBM Storage Protect server scheduling mode:
  1. Ensure that the Data Protection for Oracle options file has the tcpclientaddress and tcpclientport options specified. If you want to run more than one scheduler service, use the same tcpclientaddress. However, you must use different values for tcpclientport in addition to the different node names. Scheduling Data Protection for Oracle with the regular Windows backup archive client is an example of running more than one scheduler service.

    Server-prompted scheduling is supported only when TCP/IP communication is being used. By default, Data Protection for Oracle uses the polling schedule mode.

  2. If any changes that affect the scheduler service are made to the Data Protection for Oracle options file, the scheduler service must be restarted to pick up the changes. For example, changes to the IBM Storage Protect server address, schedule mode, or the TCP/IP address or port. The restart is done by entering these commands:
      net stop "TSM Oracle Bkup Scheduler"  
      net start "TSM Oracle Bkup Scheduler" 
  3. The file named dsmsched.log contains status information for the IBM Storage Protect scheduler service. Though the default directory is \Tivoli\TSM\baclient\sched\dsmsched.log, you can specify a different directory, such as \Tivoli\TSM\AgentOBA64\sched\dsmsched.log with the schedlogname option in the Data Protection for Oracle options file.
  4. If an IBM Storage Protect scheduler service is already installed on your workstation for the regular backups of the Windows system, you must install another with a unique name to run the schedules that are defined for Data Protection for Oracle. The IBM Storage Protect scheduler service needs a different node name than the regular IBM Storage Protect backup archive client. If the path you want to use has a space in it, for example C:\Program Files\Tivoli\TSM\baclient, you can place quotation marks around the section of the path name that contains a space C:\"Program Files"\. You can also use the short form of the path name. The short form of a path name is made up of the first six characters in the path, followed by a tilde (~) and the unique identifier. The following is an example of the short form of the path name: C:\Progr~1\Tivoli\TSM\baclient
The orcsched.cmd file must contain these variables with the following values:
oracle_sid
Specify the Oracle system identifier for the instance to be used in the scheduled backup. A value of ilr is used in the example.
ora_exe
Specify the complete path and file name of the Oracle RMAN executable file. A value of c:\oracle\ora91\bin\rman.exe is used in the example.
cmdfile
Specify the complete path and file name of the Oracle command file. A value of C:\rman\bkdb.rmn is used in the example.