Performing Cancel-Based Recovery


In the following post, we’ll see how to perform Incomplete database level recovery (Cancel based Recovery) until a manual cancel is done. This type of recovery is used when the DBA manually wants to look at the logfile name and location and then decide to apply it. Trust me there are several situations wherein you really feel comfortable using this recovery method.

Recovery Steps:-

STEP:-1 Connect to RMAN and mount the database.

  • RMAN> connect target /
  • RMAN> startup mount;

STEP 2:- Restore the database.

  • RMAN> restore database;

STEP 3:- Connect to a SQL*Plus session and initiate a cancel based recovery.

  • SQL> connect / as sysdba
  • SQL> recover database until cancel;

In this case you are prompted to manually apply each archived redo log file, hit enter key until you arrive at the archived redo logfile where you want to stop the recovery process, type cancel in such a case and hit enter.

STEP 4:- Open the database with resetlogs.

  • SQL> alter database open resetlogs;

I hope this post would be helpful in scenarios when you know the recovery process but as there is lot of stress on DBAs during recovery scenarios even googling at that time for the syntax is an overhead, hence the idea is to make a repository that cover all possibile recovery scenarios step by step with syntax of commands at a single destination. I would try to cover all the scenarios in my subsequent posts. Please comment if any of the curious readers are interested to know the internals of the recovery process like which process does that, what information is in redo that is applied to the datafiles to recover them to point in time and etc.

PLEASE COMMENT IF YOU FACE ANY ERRORS WHEN PERFORMING THIS RECOVERY SO THAT WE CAN WORK ON THOSE AND ENHANCE THIS REPOSITORY FOR OTHER READERS.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s