RMAN Example: Restoring from an Oracle Secondary Copy

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

Before You Begin

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

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

  3. Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.

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...