DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: RMAN point in time recovery (PITR)

  1. #1
    Join Date
    Aug 2007
    Posts
    62

    RMAN point in time recovery (PITR)

    Hi,

    I read on the documentation that in order to do a PITR on a database using RMAN, you need to run the following commands:

    run{
    set until time "to_date('08/28/07 15:00:00' , 'mm/dd/yy hh24:mi:ss')";
    restore database;
    recover database;
    alter database open resetlogs;}

    This can be done provided that the controlfile is intact.
    However, what if my controlfile is lost and needs to be restored from my spfile?

    If i was to do a restoration on 30 AUG and my aim is to restore the database to the 28 AUG, my controlfile will be restored to the 30 AUG instead of 28 AUG if i restore it using the spfile right?
    Will using a controlfile restored to 30 AUG affect restoration of the database to 28 AUG?

    Thanks in advance!!

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    I am sorry i did not understand what you are trying to say

    But it is not possible to restore controlfile from spfile as per my knowledge of RMAN

    regards
    Hrishy

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    whats a control file got to do with the spfile?

  4. #4
    Join Date
    Aug 2007
    Posts
    62
    Hi,

    Sorry about the confusion. It's my mistake.
    I wanted to do a full database recovery using my init.ora file. To do so, i need to recover my controlfile so that i can mount my database.
    RMAN> restore controlfile from autobackup;

    I do a daily backup of my database. If i do a recovery on 31 AUG, the controlfile restored will be from the backup done on 30 AUG right?

    In this case, can i do a PITR on my database using RMAN through the following commands
    run{
    set until time "to_date('08/28/07 15:00:00' , 'mm/dd/yy hh24:mi:ss')";
    restore database;
    recover database;
    alter database open resetlogs;}
    to restore the database to 29 AUG using my restored controlfile?

    Thanks!

  5. #5
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    RMAN is smart enough to figure which controlfile it needs for the restore

    run{
    set until time "to_date('08/28/07 15:00:00' , 'mm/dd/yy hh24:mi:ss')";
    restore controlfile to /tmp/control01.ctl;
    restore controlfile from /tmp/control01.ctl
    ;
    alter database mount;
    restore database;
    recover database;
    alter database open resetlogs
    }

    Try something like this

    http://www.dbasupport.com/forums/sho...t=48023&page=3

    regards
    Hrishy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width