Performing Tablespace-Level Recovery


In the following post, we’ll see how to perform tablespace level recovery when we have lost all the datafiles contained in one tablespace BUT we still have online redo log files and we have a backup’s in place & all the archived redo log files from when the backup was taken till the recent.

In such a case we don’t want to recover the whole database ( because of the time outage ), hence below are the recovery steps for this case:-

Recovery Steps:-

Recover While Database Not Open

  • RMAN> connect target /
  • RMAN> startup mount;
  • RMAN> restore tablespace <TABLESPACE NAME>;
  • RMAN> recover tablespace <TABLESPACE NAME>;
  • RMAN> alter database open;

Recover While Database Is Open

  • RMAN> connect target /
  • RMAN> sql ‘alter tablespace <TABLESPACE NAME> offline immediate’;
  • RMAN> restore tablespace <TABLESPACE NAME>;
  • RMAN> recover tablespace <TABLESPACE NAME>;
  • RMAN> sql ‘alter tablespace <TABLESPACE NAME> online’;

This method of taking tablespace offline and then restore , recover and then back to online would work for every tablespace except SYSTEM and UNDO tablespace.

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.

2 thoughts on “Performing Tablespace-Level Recovery

  1. Dear,
    Can you please explain internal process for each recovery scenarios….

    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.

    Like

    • Hi Vikhar,

      Internals for each recovery scenario might take time but I have added your request in the pending actions for the team, if its regarding internals for any specific recovery scenario I might be able to respond quickly.

      Thanks for reading…!!!
      Nitish

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.