RMAN Example: Performing Oracle RAC Multi Stream Backups

You can perform parallel backups across multiple Oracle RAC nodes with the Oracle RAC agent. The Oracle RAC agent requires one subclient and one storage policy backup type (for example., data, log) along with the requisite number of allocated streams to perform parallel backups. You can load-balance your backups across all the nodes or selected nodes of the Oracle RAC database and take advantage of the strengths of each node.

Oracle RAC application command line operations running on multiple streams share the same Job ID in the Job Manager. If all the streams return the status as failure, then the job is marked as failed. If one of the streams fails, it is submitted to the another stream for completion.

By default, each stream in an Oracle RAC operation with multiple streams uses a different drive.

When there are different storage policies for archive log backups and for command line backups occurs:

  • Data and log command line backups use the log storage policy for the log portion of the backup, and the command line storage policy for the datafiles backup.

  • Control file backups use the command line storage policy.

Before You Begin

  • Use a unique backup piece format to avoid using conflicting backup piece names.

Procedure

  1. Edit the Oracle pfile or SP file and set the BACKUP_TAPE_IO_SLAVES initial parameter to TRUE.

  2. Configure the device type. On the RMAN command line, type the following command.

    RMAN> CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  3. If you use the Oracle Enterprise Manager application with multiple channels, include the RMAN settings in the Oracle Enterprise Manager.

    UNIX:

    SBT_LIBRARY=software_install_path/Base64/libobk.so, BLKSIZE=262144,ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name)

    Windows:

    ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name, BLKSIZE=262144)
  4. Create and save an RMAN script file to run the backup operation with a single job ID.

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

    If you use both the RMAN PARALLELISM configure parameter and set multiple streams from an RMAN script, the backup job will use twice the number of streams. For example, if PARALLELISM is set to 2 and 2 streams are set from the RMAN script, the backup job uses 4 streams.

    run{ 
     allocate channel ch1 type 'sbt_tape' connect account/password@servicename
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144,
     ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name)";
     allocate channel ch2 type ‘sbt_tape' connect account/password@servicename
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name)";
     allocate channel ch3 type 'sbt_tape' connect account/password@servicename
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name)";
     allocate channel ch4 type 'sbt_tape' connect account/password@servicename
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=rac_database_name, CvInstanceName=instance_name, -hn=host_name)";
     setlimit channel ch1 maxopenfiles 8; 
     setlimit channel ch2 maxopenfiles 8; 
     setlimit channel ch3 maxopenfiles 8; 
     setlimit channel ch4 maxopenfiles 8; 
    backup 
     incremental level=0 
     filesperset =8 
     database include current controlfile; 
     }
     EOF

    Example:

    run{ 
     allocate channel ch1 type 'sbt_tape' connect sys/sys@racdb2 
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144,
     ENV=(CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.commcell.com)"; 
     allocate channel ch2 type ‘sbt_tape' connect sys/sys@racdb2  
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.commcell.com)"; 
     allocate channel ch3 type 'sbt_tape' connect sys/sys@racdb2  
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.commcell.com)"; 
     allocate channel ch4 type 'sbt_tape' connect sys/sys@racdb2  
     PARMS="SBT_LIBRARY=/oracle/Commvault/Base/libobk.so,BLKSIZE=262144, 
     ENV=(CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.commcell.com)"; 
     setlimit channel ch1 maxopenfiles 8; 
     setlimit channel ch2 maxopenfiles 8; 
     setlimit channel ch3 maxopenfiles 8; 
     setlimit channel ch4 maxopenfiles 8; 
     backup 
     incremental level=0
     filesperset =8
     database include current controlfile;
     }
     EOF
  5. On the RMAN command line, connect to the target database.

    rman target sys/sys@dbtnsname
  6. On the RMAN command line, go to the RMAN script location and type the following:

    @file_path_backup1.txt

Page contents

×

Loading...