Example: Recovering the Control File and Database When Real-Time Redo Transport is Configured
This example recovers a protected database that is configured to use real-time redo transport from the loss of all database files. Since the control file too is lost, you need to first restore the control file and then perform recovery of the protected database.
To restore and recover a protected database, including the control file, that is configured to use real-time redo transport:
-
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 asCATALOGas described in “Connecting to the Protected Database and Recovery Appliance Using CLI”. -
Determine the SCN to which the protected database must be recovered by querying the
RC_DATABASEview. This SCN is the highest SCN at the time the database crashed.SELECT final_change# FROM rc_database WHERE name='PTDB1'; -
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 FORCE NOMOUNT; SET DBID=ptdb1; RESTORE CONTROLFILE; ALTER DATABASE MOUNT; RUN { SET UNTIL SCN 34568; RESTORE DATABASE; RECOVER DATABASE; } ALTER DATABASE OPEN RESETLOGS;