Loading...

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

  1. Rebuilding the Operating System.
  2. Make sure that the ORACLE_HOME directory was restored when the operating system was rebuilt.
  3. 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.
  4. Make sure the listener is running and configured correctly.
  5. Optional: Delete the pfile and spfile that were restored when the ORACLE_HOME directory was restored to ensure that latest spfile is restored.
  6. You cannot start the database from sqlplus because the pfile and the spfile files were deleted. Connect to RMAN and issue the following command, which starts the Oracle instance with a dummy parameter file.

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

Procedure

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle.
  2. Right-click the <Instance> point to All Tasks and then click Browse and Restore.
  3. Click View Content.
  4. Select the entire database and click Recover All Selected.
  5. On General tab of the 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.
  6. On the Options tab of the Advanced Restore Options dialog box:
    1. Select the Open DB check box.
    2. Select the Yes for Reset Logs.
    3. Select the Switch Database mode for Restore check box.
    4. Select the Set DBID check box.
  7. On the Restore tab of the Advanced Restore Options dialog box select the Restore Data check box with From the Latest Backup option.
  8. 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.
  9. On 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, elect the Point-in-Time option and enter 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.
  10. Click OK to close the Advanced Restore Options dialog box.
  11. On General tab of the Restore Options dialog box:
    1. Click the Script Preview button to review the generated RMAN script.
      Expand All

      Example

      #******CONTROL FILE/SPFILE RESTORE SCRIPT******#
      SET DBID 1814427393;
      run {
      allocate channel ch1 type 'sbt_tape'
      PARMS="SBT_LIBRARY=/opt/snapprotect/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/snapprotect/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/snapprotect/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/snapprotect/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 sequent 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.