Thursday, September 24, 2009

To recover the database with a backup control file and a recovery catalog:

After connecting to the target database and recovery catalog database, start the instance without mounting the database: STARTUP NOMOUNT

Restore the backup control file, then restore and recover the database. Do the following:
Run the RESTORE CONTROLFILE command to restore the control file to all default locations specified in the CONTROL_FILES initialization parameter. To restore a control file from an older backup, you can run SET UNTIL or specify the UNTIL clause on the RESTORE CONTROLFILE command.
Mount the database using the restored control file.
Optionally, run a SET UNTIL command for incomplete recovery. Note that you can also specify the UNTIL clause on the RESTORE and RECOVER commands.
Restore and recover the database as described in "Performing Basic RMAN Media Recovery".
This example restores the control file to its default location, then restores and completely recovers the database:RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;

If recovery was successful, then open the database and reset the online logs: ALTER DATABASE OPEN RESETLOGS;

If the database uses locally-managed temporary tablespaces, then add new tempfiles to these tablespaces. For example: SQL "ALTER TABLESPACE temp ADD TEMPFILE ''?/oradata/trgt/temp01.dbf'' REUSE";

It is recommended that you immediately back up the database, preferably with the database mounted (to avoid possible data loss in an open database). Because the database is a new incarnation, the backups made prior to the RESETLOGS are not easily usable. For example, run the following to back up the database: SHUTDOWN IMMEDIATE
STARTUP MOUNT
BACKUP DATABASE;
ALTER DATABASE OPEN;

No comments:

Post a Comment

About Me

Working as Oracle DBA for Wipro Technologies, Chennai, India