Non-CDB Oracle RAC database restore using Commvault

Pre-requisites

In the previous article, we talked about performing an object-level recovery in non-CDB Oracle database using Commvault. In this article, we will take a look at the steps to restore a non-CDB RAC database. Before a database restore is attempted, we need to ensure that:

  • A successful backup of the database exists
  • The setting “cluster_database” is set to false, and
  • The database is started in NOMOUNT mode.
SYS@apexdev1>alter system set cluster_database=false scope=spfile sid='*';
System altered.

$ srvctl stop database -d apexdev

$ sqlplus / as sysdba
SYS@apexdev1>startup force nomount;
ORACLE instance started.

Total System Global Area 5368709130 bytes
Fixed Size                  2935732 bytes
Variable Size            3313443946 bytes
Database Buffers         2046820362 bytes
Redo Buffers                5509130 bytes
SYS@apexdev1>exit

Restore database

From the CommCell Browser, expand Client Computers > RAC client.
Right-click on the RAC database instance, and navigate to “All Tasks” and then click on “Browse and Restore”.

Select “Latest Backup” option and then click on “View Content”.

Select the checkbox next to the database to be recovered and click on “Recover All Selected”.

On the next screen, select “Restore in place” and click on “Next”.

On the next screen, select at least the following options (Restore Control File, Restore Data, and Recover).

Since we have already started the database in NOMOUNT mode, click on “OK” on the pop-up box and then acknowledge the database restore question.

At this point, Commvault will first restore the control file and then the database. The progress can be monitored using the Commvault Job Controller window. Based on the size of the database being restored, it might take some time for the process to complete. Once the restore operation completes, you can connect to the database and RACit!

$ sqlplus / as sysdba
SYS@apexdev1>alter system set cluster_database=true scope=spfile sid='*';
System altered.

SYS@apexdev1>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@apexdev1>exit

$ srvctl start database -d apexdev

$ srvctl status database -d apexdev
Instance apexdev1 is running on node dbnode01
Instance apexdev2 is running on node dbnode02

Below is the a sample script, if you prefer to restore the database using command line instead of GUI.

#******CONTROL FILE/SPFILE RESTORE SCRIPT******#

run {
allocate channel ch1 type 'sbt_tape' 
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
TRACE 0;
## send " -jm 16908298 -a 2:-1 -cl 1421 -ins 531 -at 80 -j 2094827 -rcp 0 -ms 1 -p 1 -df -PREVIEW -mhn dbnode01.itnoesis.com*dbnode01*8400*8402";
 restore controlfile ;
sql 'alter database mount';
}
exit;



#******DATA RESTORE SCRIPT******#
run {
allocate channel ch1 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
TRACE 0;
allocate channel ch2 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch2)"
TRACE 0;
allocate channel ch3 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch3)"
TRACE 0;
allocate channel ch4 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch4)"
TRACE 0;
## send " -jm 17039374 -a 2:-1 -cl 1421 -ins 531 -at 80 -j 2094827 -rcp 0 -ms 4 -p 2 -df -PREVIEW -mhn dbnode01.itnoesis.com*dbnode01*8400*8402";
 restore database ;
}
exit;
run {
allocate channel ch1 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
TRACE 0;
allocate channel ch2 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch2)"
TRACE 0;
allocate channel ch3 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch3)"
TRACE 0;
allocate channel ch4 type 'sbt_tape' connect SYS/4b2746f717754c6538cd2c521d3d1f2adac08628941fc8d17@apexdev
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so, BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,CV_channelPar=ch4)"
TRACE 0;
## send " -jm 17039374 -a 2:-1 -cl 1421 -ins 531 -at 80 -j 2094827 -rcp 0 -ms 4 -p 2 -df -PREVIEW -mhn dbnode01.itnoesis.com*dbnode01*8400*8402";
 recover database;
}
exit;
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s