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:
-
Ensure that the prerequisites described in “Prerequisites for Restoring and Recovering Data from Recovery Appliance” are met.
-
Use RMAN to connect to the protected database as
TARGETand the Recovery Appliance catalog asCATALOG.See Also: “Connecting to the Protected Database and Recovery Appliance Using CLI”
-
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';
}