RMAN Example: Performing Oracle On-Demand Backups

Oracle On-Demand backups are performed when there is a need to back up the data at a time other than a scheduled backup.

You can specify the contents of the On-Demand backup in the RMAN backup script.

Best Practice: Use separate scripts for data and logs because only one data type can be passed through the argument file. This system uses the data type to mark the archive files created by the backups as DATA or LOG in the CommServe database. Therefore, if you have scripts containing both data and logs, the archive files are marked as either DATA or LOG depending on the data type mentioned in the argument file. The drive reservation retry mechanism works more efficiently when you use separate RMAN scripts for data and log backups.

Before You Begin

  1. Add an On-Demand Instance for the Oracle database.

  2. Use a unique backup piece format to avoid conflicting backup piece names.

  3. When the CommCell Console authenticates RMAN scripts, run the qlogin command with the token file option (-f) to obtain a token file.

Procedure

  1. On the RMAN command line, run the following sample script, substituting any required or optional Oracle SBT parameters. When the CommCell Console authenticates RMAN scripts, you must use the CvQcmdTokenFile parameter with the token file that the qlogin command generates.

    For information on required and optional SBT parameters, see SBT Parameters.

    run { allocate channel ch1 type 'sbt_tape'
     PARMS="BLKSIZE=1048576";
     sql 'alter system archive log current';
     backup
     filesperset 4 format '%d_%U_%t'
     (archivelog all); 
    }
     exit
  2. Create the On-Demand backup parameter file on the Oracle Agent client, and specify the RMAN script.

    For information on required and option parameters, see Input Parameters for Oracle On-Demand backups.

    Example

    This is a parameter file argfile1.txt with a path to the RMAN backuplogs.txt, script:

    [instancescripts]
     ora11gv1,D:\backuplogs.txt
     [datatype] LOG
     [sp]
     SP1
     [streamcount]
     2
  3. Run the qlogin command to log on to the CommServe computer.

    If you want to run this from a scheduled job, you must use a password or token with qlogin. For more information on how to use tokens and passwords with qlogin see qlogin using tokens.

  4. On the command line, type the following command:

    qoperation backup -c <client_name> -a Q_ORACLE -af <input_file> -t Q_FULL

    Option

    Definition

    -c

    The client name

    -af

    The input file containing the arguments

    Example

    Run a full backup on client client1, by using the parameter file argfile1.txt:

    D:\>qoperation backup -c client1 -a Q_ORACLE -af /argfile1.txt -t Q_FULL

Loading...