Full System Recovery of Oracle Database: Restoring the Oracle Database

Restore the Oracle database to the same or different client in the event of a disaster.

Before You Begin

  • Rebuilding the Operating System.

  • Make sure that the ORACLE_HOME directory was restored when the operating system was rebuilt.

  • Configure an automatic backup of the control file for all subclients in that instance. For more information, see Enabling Automatic Backup of Control Files for All Oracle Subclients.

  • Make sure the listener is running and configured correctly.

  • Optional: Delete the pfile and spfile that were restored when the ORACLE_HOME directory was restored to ensure that latest spfile is restored.

  • You cannot start the database from sqlplus because the pfile and the spfile files were deleted. Connect to RMAN and type the following commands, which start the Oracle instance with a dummy parameter file.

    RMAN> connect target sys/sys@<dbname>
    RMAN> startup force nomount;

Procedure

  1. From the CommCell Browser, go to Client Computers > client > Oracle.

  2. Right-click the instance, then go to All Tasks > Browse and Restore.

    The Browse and Restore Options dialog box appears.

  3. Select Latest Backup, and then click the View Content button.

  4. Select the database, and then click the Recover All Selected button.

    The Oracle Restore Options dialog box appears.

  5. Depending on the type of restore to be run, click Restore in place or Restore out of place, and then click Next.

    The Oracle In Place Restore Options or Oracle Out of Place Restore Options dialog box appears.

  6. On the General tab of the Oracle Restore Options dialog box:

    1. Select the name of the client computer from the Destination Client list.

    2. Select the Restore Control File check box.

    3. Select the Restore SP File check box.

    4. Select the Restore Data check box.

    5. Select the Recover check box.

    6. Click Advanced.

  7. On the Options tab of the Advanced Restore Options dialog box:

    1. Select the Open DB check box.

    2. Select the Yes option for Reset Logs.

    3. Select the Switch Database mode for Restore check box.

    4. Select the Set DBID check box.

  8. On the Restore tab of the Advanced Restore Options dialog box select the Restore Data check box with From the Latest Backup option.

  9. On the Ctrl & SP Files tab of the Advanced Restore Options dialog box select the Restore From check boxes with From auto Backup options for both Restore Control File and Restore SP File.

  10. On the Recover tab of the Advanced Restore Options dialog box, choose one of the following:

    • To recover to the current time select the Current Time option.

    • To recover to a point-in-time, select the Point-in-Time option and enter the date and time. On the Options tab, if the time zone is different on the CommServe and client, in the Time Zone box, select the time zone of the client computer.

    • To recover using the SCN, select the SCN option and enter the System Change Number.

    • To recover using the latest backup time, select the Latest Backup Time option.

    • To recover using the latest SCN number, select the Latest SCN Number option.

  11. Click OK to close the Advanced Restore Options dialog box.

  12. On the General tab of the Restore Options dialog box:

    1. Click the Script Preview button to review the generated RMAN script.

      Example
      #******CONTROL FILE/SPFILE RESTORE SCRIPT******#
       SET DBID 1814427393;
       run {
       allocate channel ch1 type 'sbt_tape'
       PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=65536,ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
       TRACE 2;
       restore spfile from autobackup ;
       startup force nomount;
       }
       exit;
       SET DBID 1814427393;
       run {
       allocate channel ch1 type 'sbt_tape'
       PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=65536,ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
       TRACE 2;
       restore controlfile from autobackup ;
       }
       exit;
       ******DATA RESTORE SCRIPT****** 
       run { 
       allocate channel ch1 type 'sbt_tape'
       PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
       TRACE 0; 
       restore database ; 
       } exit; 
       run { 
       allocate channel ch1 type 'sbt_tape'
       PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=262144,ENV=(CV_mmsApiVsn=2,CV_channelPar=ch1)"
       TRACE 0; recover database until scn 3549690 ; 
       alter database open resetlogs; 
       } 
       exit;
    2. Verify the Status is STARTED.

    3. Click OK to submit the job.

Once the procedure is complete, the database is opened due to the "Reset Logs" option and the log sequence is reset to 1.

The data files, control and SP files and redo logs are restored to their original location. If the Flash Recovery Area (FRA) is configured, then only recent archive logs are restored and new logs are archived to the FRA location.

What to Do Next

  • Verify that the restored database and log files are available in the original location.

  • After the database is restored, perform a full online or offline backup.

  • Start the database.

Loading...