Example: Restoring and Recovering a Data File in the Protected Database

This example demonstrates how to restore and recover a data file that was accidentally deleted or corrupted.

To restore and recover a data file 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. Restore and recover the affected data file in the protected database using the following command:

    The following command restores and recovers data file 3 in the protected database:

    RUN
    {
      SQL 'ALTER DATABASE DATAFILE 3 OFFLINE';
      RESTORE DATAFILE 3;
      RECOVER DATAFILE 3;
      SQL 'ALTER DATABASE DATAFILE 3 ONLINE';
    }