About Restoring and Recovering a Database

Learn how to restore and recover VSS snapshots. As in the case of backups, the procedure depends on the archiving mode of the database and the type of snapshot that you are restoring.

About Restoring and Recovering a Database in ARCHIVELOG Mode

You can select the components listed in Components Usable in a Restore Operation in a restore and recovery operation.

The table describes the validations that Oracle VSS writer performs for the components during the pre-restore phase, and the actions that it performs after the restore completes.

Table 9-3 Components Usable in a Restore Operation

Component Pre-Restore Phase PostRestore Phase Section

Server Parameter File

Verifies that the database instance is not started. Otherwise, the writer returns a pre-restore failure.

Ensures that the database is started NOMOUNT. If the server parameter file is restored to the default location for the Oracle home, then the instance starts NOMOUNT automatically. Otherwise, you must set ORA_SID_PFILE to the location of the text-based initialization parameter file that points to the location of the server parameter file.

"Restoring the Server Parameter File "

Control File

Verifies that the instance is either started NOMOUNT or not started. If the instance is not started, the writer either starts the instance with the ORA_SID_PFILE instance parameter file, or uses the initialization parameter file or server parameter file in the default location.

Mounts control file after replicating control file to all the current control file locations pointed to by the instance.

"Recovering from the Loss of All Control Files"

Tablespace or data file component

Verifies that the database must be mounted or the specified data files or tablespaces must be offline.

Performs complete recovery of these tablespaces or data files. The requester application can override the default recovery behavior.

"Recovering Tablespaces or Data Files"

All Tablespaces

Verifies that the database is mounted.

Extracts redo from the backup writer metadata document and performs incomplete recovery on all the restored data files up to the time of snapshot creation. The requester application can override the default recovery behavior.

"Recovering All Tablespaces"

Oracle Database

Verifies that the instance is not started.

Starts the database instance, mounts the control file, and performs recovery. See the descriptions of postrestore behavior for Server Parameter File, Control File, and All Tablespaces.

"Performing Disaster Recovery" and "Restoring Component-Based Backups of a NOARCHIVELOG Database"

Archived redo log or fast recovery area

None.

Does not perform default recovery of this component. Nevertheless, the requester application can run required RMAN commands.

 

Restoring the Server Parameter File

Use this procedure to restore the server parameter file.

To restore the server parameter file:

  1. Select the component named Server Parameter File from a VSS snapshot.
  2. Restore the server parameter file.

    Oracle VSS writer restores the server parameter file to the original location from where it was copied. You can also restore it to a new location.

Recovering from the Loss of All Control Files

This procedure explains how to recover from the loss of all multiplexed control files.

To recover from the loss of all control files:

  1. Ensure that the database is in NOMOUNT state or can be started in NOMOUNT state by the Oracle VSS writer.
  2. Select the component named Control File from a VSS snapshot.
  3. Restore the component containing the lost control file.

    The Oracle VSS writer automatically mounts the database with the restored control files. If only the control file must be recovered, then the VSS requester application can ask the Oracle writer to perform complete recovery.

  4. Restore and recover other database components if necessary.
  5. Open the database with the RESETLOGS option.

Recovering Tablespaces or Data Files

This procedure explains how to recover from the loss of one or more tablespaces or data files. This procedure assumes that not all data files are lost.

To recover from the loss of all tablespaces or data files:

  1. Ensure that the database is either mounted or open. If the database is open, then take the data files or tablespaces needing recovery offline with the ALTER DATABASE ... OFFLINE statement.
  2. If the archived redo logs are required for recovery of the data files or tablespaces, then restore the archived redo logs.
  3. Select the components from the VSS snapshot that contains the lost data files, or all data files in the lost tablespaces.
  4. Restore the component containing the lost data files.

    The Oracle VSS writer automatically recovers the restored data files. If some archived logs are missing, then you can restore the logs and recover the data files with SQL*Plus or RMAN.

  5. Bring the offline data files or tablespaces back online.

Recovering All Tablespaces

This procedure explains how to recover from the loss of all tablespaces.

To recover all data files:

  1. Ensure that the database is mounted.
  2. If the archived redo logs are required for recovery of the data files or tablespaces, then restore the archived redo logs.
  3. Select the component named All Tablespaces from a VSS snapshot.
  4. Restore the tablespaces.

    The Oracle VSS writer automatically recovers the restored data files. If some archived logs are missing, then you can restore the logs and recover the data files with SQL*Plus or RMAN.

  5. Open the database.

Performing Disaster Recovery

This procedure explains how to recover from the loss of the server parameter file, control file, and all data files.

To perform disaster recovery:

  1. Ensure that the instance is not started.
  2. If the archived redo logs are required for recovery of the data files or tablespaces, then restore the archived redo logs.
  3. Select the component named Oracle Database from a VSS snapshot.
  4. Restore the database.

    The Oracle VSS writer automatically starts the instance, mount the database, and recovers the restored data files. If some archived logs are missing, then you can restore the logs and recover the data files with SQL*Plus or RMAN.

  5. Open the database with the RESETLOGS option.

Restoring a Database in NOARCHIVELOG Mode

For an Oracle Database running in NOARCHIVELOG mode, archived redo logs are not generated. So, media recovery is not possible.

Restoring Component-Based Backups of a NOARCHIVELOG Database

Use this procedure to restore a component-based backup.

To restore a component-based backup:

  1. Use a third-party VSS requester to select the Oracle Database component.

    The Oracle VSS writer automatically restores the data files and mounts the database.

  2. Open the database with the RESETLOGS option.

Restoring Volume-Based Backups of a NOARCHIVELOG Database

Use this procedure to restore a volume-based backup.

To restore a volume-based backup:

  1. Use a third-party VSS requester to select the volumes where the data files, control files, and server parameter file are physically located.
  2. Restore all volumes where data files and logs are located.
  3. Open the database with the RESETLOGS option.