Restoring an Oracle database

In the event of data loss, you can use SnapCenter to restore data from one or more backups to your active file system and then recover the database. Recovery operation is performed by using archive logs of the database in an active file system.

Before you begin

About this task

When you restore a database, an operational lock file (.sm_lock_dbsid) is created on the Oracle database host in the $ORACLE_HOME/dbs directory to avoid multiple operations being executed on the database. After the database has been restored, the operational lock file is automatically removed.

Note: If you are performing multiple restore operations simultaneously on a single host, all the restore operations are serialized.

Steps

  1. In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.
  2. In the Resources page, select either Database or Resource Group from the View list.
  3. Select the database from either the database details view or the resource group details view.
    The database topology page is displayed.
  4. From the Manage Copies view, select Backups from either the primary or the secondary (mirrored or replicated) storage systems.
  5. Select the backup from the table, and then click restore icon.
  6. In the Restore Scope page, perform the following tasks:
    1. If you have selected a backup of a database in a Real Application Clusters (RAC) environment, select the RAC node.
    2. Perform the following actions:
      If you want to restore... Do this...
      All datafiles Select All Datafiles.
      Tablespaces Select Tablespaces.

      You can specify the tablespaces that you want to restore.

      Control files Select Control files.
      Redo log files Select Redo log files.

      This option is available only for Data Guard standby or Active Data Guard standby databases.

      Pluggable databases (PDBs) Select Pluggable databases, and then specify the PDBs that you want to restore.
      Pluggable database (PDB) tablespaces Select Pluggable database (PDB) tablespaces, and then specify the PDB and the tablespaces of that PDB that you want to restore.

      This option is available only if you have selected a PDB for restore.

    3. Select Change database state if needed for restore and recovery to change the state of the database to the state required to perform restore and recovery operations.
      The various states of a database from higher to lower are open, mounted, started, and shutdown. You must select this check box if the database is in a higher state but the state must be changed to a lower state to perform a restore operation. If the database is in a lower state but the state must be changed to a higher state to perform the restore operation, the database state is changed automatically even if you do not select the check box.
      Example
      If a database is in the open state, and for restore the database needs to be in the mounted state, then the database state is changed only if you select this check box.
    4. Select Force in place restore if you want to perform in-place restore in the scenarios where new datafiles are added after backup or when LUNs are added, deleted, or re-created to an LVM disk group.
  7. In the Recovery Scope page, perform the following actions:
    You cannot perform restore with recovery from secondary backups if archive log volumes are not protected but data volumes are protected. You can restore only by selecting No recovery.
    If you... Do this…
    Want to recover to the last transaction Select All Logs.
    Want to recover to a specific System Change Number (SCN) Select Until SCN (System Change Number).
    Want to recover to a specific data and time Select Date and Time.

    You must specify the date and time of the database host's time zone.

    Do not want to recover Select No recovery.
    Want to specify any external archive log locations Select Specify external archive log locations, and then specify the location of the external archive log files.

    If archive logs are pruned as part of backup, and you have manually mounted the required archive log backups, you must specify the mounted backup path as the external archive log location for recovery.

    Note: Recovery is not supported for Data Guard standby and Active Data Guard standby databases.
  8. In the PreOps page, enter the path and the arguments of the prescript that you want to run before the restore operation.
    You must store the prescripts either in the /var/opt/snapcenter/spl/scripts path or in any folder inside this path. By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have created any folders inside this path to store the scripts, you must specify those folders in the path.

    You can also specify the script timeout value. The default value is 60 seconds.

  9. In the PostOps page, perform the following steps:
    1. Enter the path and the arguments of the postscript that you want to run after the restore operation.
      You must store the postscripts either in /var/opt/snapcenter/spl/scripts or in any folder inside this path. By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have created any folders inside this path to store the scripts, you must specify those folders in the path.
    2. Select the check box if you want to open the database after recovery.

      After restoring a container database (CDB) with or without control files, or after restoring only CDB control files, if you specify to open the database after recovery, then only the CDB is opened and not the pluggable databases (PDB) in that CDB.

      In a RAC setup, only the RAC instance that is used for recovery is opened after recovery.

      Note: After restoring a user tablespace with control files, a system tablespace with or without control files, or a PDB with or without control files, only the state of the PDB related to the restore operation is changed to the original state. The state of the other PDBs that were not used for restore are not changed to the original state because the state of those PDBs were not saved. You must manually change the state of the PDBs that were not used for restore.
  10. In the Notification page, from the Email preference drop-down list, select the scenarios in which you want to send the email notifications.
    You must also specify the sender and receiver email addresses, and the subject of the email. If you want to attach the report of the restore operation performed, you must select Attach Job Report.
    Note: For email notification, you must have specified the SMTP server details by using the either the GUI or the PowerShell command Set-SmSmtpServer.
  11. Review the summary, and then click Finish.
  12. Monitor the operation progress by clicking Monitor > Jobs.