Example: Restoring and Recovering an Entire Database having Real-time Redo

This example assumes that the protected database were configured to use real-time redo transport.

To restore and recover all the data files in a protected database:

  1. Ensure that the prerequisites described in "Prerequisites for Restoring and Recovering Data from Recovery Appliance" are met.
  2. Use RMAN to connect to the protected database as TARGET and the Recovery Appliance catalog as CATALOG.
  3. Determine the SCN to which the protected database must be recovered by querying the RC_DATABASE view. This SCN is the highest SCN at the time the database crashed.
    SELECT final_change# FROM rc_database WHERE name='MY_DB'
  4. Restore the control file from a backup created before the SCN at which the recovery will be done. As per our example we should find the backup of control file with SCN lower than 23098.
  5. Restore and recover all the data files using the following command:

    This example assumes that the control file is available. If the control file is lost, then you need to first recover the control file before performing the steps listed here.

    STARTUP NOMOUNT;
    RUN 
    {
      SET UNTIL SCN 23098;
      RESTORE DATABASE;
      RECOVER DATABASE;
      ALTER DATABASE OPEN RESETLOGS;
    }

    Note:

    The UNTIL SCN clause is required. Unless a specific SCN value is chosen, the log containing the partial redo is not applied by recovery.