Forum Stats

  • 3,824,999 Users
  • 2,260,452 Discussions
  • 7,896,380 Comments

Discussions

RMAN - Restore Control File / SPFile

user7672166
user7672166 Member Posts: 17 Blue Ribbon

Hi, I need to perform an incomplete recovery. We keep 7 days of backups, and I want to restore the database as it was 7 days ago. I've not done this before.

My question is: I can use the SET UNTIL TIME for the restore / recovery. But, with regards to restoring the control file and SPFile........do I need to restore those separately with SET UNTIL TIME, or will RMAN be smart enough to restore everything I need based on the timeframe I set?

Thank you.

Answers

  • Sunny kichloo
    Sunny kichloo Member Posts: 2,459 Gold Trophy

    IF you have complete rman backup of 7 days only thing needed by you is to set correct time and then rman will be able to do complete restore of database

    > set until time="to_date('22112020 10:34:16','ddmmyyyy hh24:mi:ss')";

    > restore database;

    > recover database;

  • EdStevens-OC
    EdStevens-OC Member Posts: 55 Silver Trophy

    Same answer as I gave you in SE (though now I see you actually posted here first).


    In general - for this use case - there should be no need to restore controlfile or spfile. You say '7 days of backups' but you didn't specify what type of backups, nor what your retention policy is, nor what kind of housekeeping you do. If its a vanilla inc 0 and inc 1 backups with retention policy of recovery period of 7 days or more, a simple 'set until' followed by 'restore database' followed by 'recover database' should do it.

    To give you a more definitive answer, we'd need to see your complete backup script(s), and the output of

    rman> show all;
    

    When showing requested information, please do not just paste a screen shot. Copy the text from a command window, paste the copied text into your message, then format the pasted text as 'code'. Screen shots of command sessions can be hard to read.