RMAN Example: Restoring from an Oracle RAC Secondary Copy

If the primary copy of the database is not available, in this example, you can restore from a secondary copy.

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 ch N 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. Create an RMAN script similar to the one below, which includes the CV_restCopyPrec environmental variable.

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

    The restore.txt example script.

    run{ allocate channel ch1 type 'sbt_tape' PARMS="SBT_LIBRARY=software_installation_path/Base/libobk.so,ENV=(CV_restCopyPrec=2)”; allocate channel ch2 type 'sbt_tape' PARMS="SBT_LIBRARY=software_installation_path/Base/libobk.so,ENV=(CV_restCopyPrec=2)”; allocate channel ch3 type 'sbt_tape' PARMS="SBT_LIBRARY=software_installation_path/Base/libobk.so,ENV=(CV_restCopyPrec=2)”; restore database ; recover database ; sql "alter database open"; }
  2. On the RMAN command line, run the following command to connect to the target database.

    rman target sys/sys@dbtnsname
  3. On the RMAN command line, run the RMAN script.

    @restore.txt
    

Page contents

×

Loading...