Thursday, May 15, 2008

Autorecovery

Yesterday I was testing some recovery scenarios with a customer. We decided to restore a backup of a database from a month ago, and recover it to yesterday.
Because the backup was one month old, we had to apply a lot off archived log files. First I just recovered using the suggested archives by entering. It took me more then 20 minutes to recover and open the database.

SQL> recover database until time '2008-05-14:12:00:00';
ORA-00279: change 1274237264 generated at 04/14/2008 23:40:14 needed for thread1
ORA-00289: suggestion :/opt/oracle/product/10.2/db_1/dbs/arch1_100_646855611.dbf
ORA-00280: change 1274237264 for thread 1 is in sequence #100
Specify log: {=suggested filename AUTO CANCEL}


I decided to test again but thios time with the 'set autorecovery on'. Now, the recovery does not wait for your enter, but automaticly applies the next archived log file.
This time, recovery and open database took me 8 minutes....

SQL> set autorecovery on
SQL> recover database until time '2008-05-14:12:00:00';
ORA-00279: change 1274237264 generated at 04/14/2008 23:40:14 needed for thread1
ORA-00289: suggestion :/opt/oracle/product/10.2/db_1/dbs/arch1_100_646855611.dbf
ORA-00280: change 1274237264 for thread 1 is in sequence #100

No comments: