Follow this example to restore an Oracle RAC database to a single node configuration.
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
-
If you run the RMAN script on a UNIX configuration, use PARMS in the Allocate Channel Command.
-
Use a unique backup piece format to avoid conflicting backup piece names.
Procedure
-
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;
-
Set the CvOraSID parameter to run the restore operation with a single job ID.
Example:
run { allocate channel $[ch1] type 'sbt_tape' PARMS="SBT_LIBRARY=$[software_install_path]/Base64/libobk.so,ENV(CvClientName=$[rdlab04],CvOraSID=$[DB1],CvInstanceName=$[Instance001])"; allocate channel $[ch2] type 'sbt_tape' PARMS="SBT_LIBRARY=$[software_install_path]/Base64/libobk.so,ENV=(CvClientName=$[rdlab04],CvOraSID=$[DB1],CvInstanceName=$[Instance001])"; allocate channel $[ch3] type 'sbt_tape' PARMS="SBT_LIBRARY=$[software_install_path]/Base64/libobk.so,ENV=(CvClientName=$[rdlab04],CvOraSID=$[DB1],CvInstanceName=$[Instance001])"; restore database ; recover database ; sql "$[alter database open]"; } -
On the RMAN command line, run the following sample script, substituting any required or optional Oracle SBT parameters.
For information on required and optional SBT parameters, see SBT Parameters.
run { set newname for datafile '$[/oradata/oeldb/oeldb/example01.dbf]' to '$[/database/oracle/10GR/oradata/oeldb/example01.dbf]'; set newname for datafile '$[/oradata/oeldb/oeldb/sysaux01.dbf]' to '$[/database/oracle/10GR/oradata/oeldb/sysaux01.dbf]'; set newname for datafile '$[/oradata/oeldb/oeldb/system01.dbf]' to '$[/database/oracle/10GR/oradata/oeldb/system01.dbf]'; set newname for datafile '$[/oradata/oeldb/oeldb/users01.dbf]' to '$[/database/oracle/10GR/oradata/oeldb/users01.dbf]'; allocate channel $[ch1] type 'sbt_tape' PARMS= "SBT_LIBRARY=$[/oracle/commvault/Base/libobk.so], BLKSIZE=$[262144$, ENV=(CvClientName=$[rac1],CVOraRacDBName=$[racdb], CvInstanceName=$[Instance001], -hn= $[rac1.devemc.Commvault.com])"; TRACE $[2]; restore database until time = "TO_DATE('$[01/08/2010 14:46:24]','$[MM/DD/YYYY HH24:MI:SS]')"; switch datafile all; recover database until scn $[6024452]; sql "$[alter database open resetlogs]"; release channel $[ch1]; release channel $[ch2]; release channel $[ch3]; release channel $[ch4]; }