RMAN Example: Restoring an Oracle RAC Database to a Different Host

Follow this example to restore an Oracle RAC database to a different host

When you perform an RMAN restore, you must set the BLKSIZE parameter to the value that was used for the backup that you want to restore.

In order to perform command line restores on a UNIX cluster, you need to use the following syntax for the allocate command in the RMAN script. Substitute N with the channel number (for example, 2).

allocate channel chN type 'sbt_tape';

Before You Begin

  1. If you run the RMAN script on a UNIX configuration, use PARMS in the Allocate Channel Command.

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

Procedure

  1. Set the number of automatic channels for a specific device type by using the CONFIGURE DEVICE TYPE ... PARALLELISM command.

    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM number_of_automatic_channels BACKUP TYPE TO BACKUPSET;
  2. Optional: To have a single job ID application for command line backups and restores when an Oracle instance is discovered or created from the command line and there is not a CommCell backup, use the following the allocate channel command syntax:

    allocate channel ch1 type 'sbt_tape' PARMS="SBT_LIBRARY=software_installation_path/Base/libobk.so,BLKSIZE=262144, ENV=(CvOraSID=OracleSID)”;
  3. On the RMAN command line, run a script similar to the following one, substituting any required or optional Oracle SBT parameters.

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

    run{
    allocate channel ch1 type 'sbt_tape' connect sys/xyz@swift1
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    allocate channel ch2 type 'sbt_tape' connect sys/xyz@swift1
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    allocate channel ch3 type 'sbt_tape' connect sys/xyz@swift1
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    allocate channel ch4 type 'sbt_tape' connect sys/xyz@swift2
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    allocate channel ch5 type 'sbt_tape' connect sys/xyz@swift1
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    allocate channel ch6 type 'sbt_tape' connect sys/xyz@swift1
    PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance001, CVOraRacDBName=swift,CvSrcClientName=mreddy-rac)";
    restore controlfile  from 'c-2449711066-20220617-01';
    sql 'alter database mount';
    restore database;
    recover database until time = "TO_DATE('JUN 17 2022 12:46:08', 'MON DD YYYY HH24:MI:SS')";
    alter database open resetlogs;
    release channel ch1;
    release channel $[ch2$;
    release channel $[ch3$;
    release channel $[ch4$;
    }

Page contents

×

Loading...