Example: Recovering a Database Configured for Real-Time Redo Transport After a Severe Storage Failure

Real-time redo transport, when enabled, guarantees the lowest recovery downtime for protected database. When restoring and recovering a protected database immediately after a storage failure, the necessary complete and partial archived log files are restored and recovered so that media recovery can return the database state to the closest state from when the storage failure occurred.

The following example recovers a protected database that was configured to use real-time redo transport after a storage failure that results in the loss of all data files and online redo log files. To recover the protected database to the highest SCN using the backups and redo logs available at the Recovery Appliance, use the FINAL_CHANGE# column of the RC_DATABASE view. The FINAL_CHANGE# column contains the highest SCN to which the protected database must be recovered. Use this SCN value in the SET UNTIL SCN command prior to performing a recovery. The recovery is performed using only the backups and redo logs available at the Recovery Appliance.

Note:

In the following scenarios, RC_DATABASE.FINAL_CHANGE# will contain the value -1 and cannot be used in the SET UNTIL SCN command:

  • version of the protected database is Oracle Database 11g (Release 11.1) or lower

  • COMPATIBLE parameter of the protected database was set to 10.0 or lower while sending real-time redo log data to the Recovery Appliance

Instead, use the NEXT_CHANGE# column in the V$ARCHIVED_LOG view to determine the SCN to which the protected database needs to be recovered.

See My Oracle Support note 243760.1 for additional information. My Oracle Support is available at: https://support.oracle.com.

To restore and recover a protected database that is configured to use real-time redo transport:

  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 as described in "Connecting to the Protected Database and Recovery Appliance Using CLI".
  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 and recover the protected database.

    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.

See Also: