Follow this example to restore an Oracle RAC database to the same 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
-
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; -
Optional: To have a single job ID application 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)”; -
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.
rman target sys/sys@racdb5 << EOF run { allocate channel ch1 type 'sbt_tape' PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac1,CVOraRacDBName=database_name,CvInstanceName=Instance001,-hn=host_name)"; allocate channel ch2 type 'sbt_tape'PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac1,CVOraRacDBName=database_name,CvInstanceName=Instance001,-hn=host_name)"; allocate channel ch3 type 'sbt_tape' connect connect_string PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac2,CVOraRacDBName=database_name,CvInstanceName=Instance001,-hn=host_name)"; allocate channel ch4 type 'sbt_tape' connect connect_string PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac2,CVOraRacDBName=database_name,CvInstanceName=Instance001,-hn=host_name)"; setlimit channel ch1 maxopenfiles 8; setlimit channel ch2 maxopenfiles 8; setlimit channel ch3 maxopenfiles 8; setlimit channel ch4 maxopenfiles 8; restore database; recover database; }Example
rman target sys/sys@racdb5 << EOF run { 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)"; allocate channel ch2 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)"; allocate channel ch3 type 'sbt_tape' connect sys/sys@racdb6 PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac2,CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.devemc.Commvault.com)"; allocate channel ch4 type 'sbt_tape' connect sys/sys@racdb6 PARMS="SBT_LIBRARY=/oracle/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CvClientName=rac2,CVOraRacDBName=racdb,CvInstanceName=Instance001,-hn=rac1.devemc.Commvault.com)"; setlimit channel ch1 maxopenfiles 8; setlimit channel ch2 maxopenfiles 8; setlimit channel ch3 maxopenfiles 8; setlimit channel ch4 maxopenfiles 8; restore database; recover database; }