If the primary copy of the database is not available, in this example, you can restore from a secondary copy.
Before You Begin
-
If you run the RMAN script on a UNIX configuration, relink the SBT library or use PARMS in the Allocate Channel Command.
-
Use a unique backup piece format to avoid conflicting backup piece names.
-
Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.
Procedure
-
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"; } -
On the RMAN command line, run the following command to connect to the target database.
rman target sys/sys@dbtnsname -
On the RMAN command line, run the RMAN script.
@restore.txt