Sunday, July 31, 2011

recovery a database where current/online redo log file deleted.

The following INIT.ORA/SPFILE parameter can be used if your current redologs are corrupted or blown away. It may also be handy if you do database recovery and one of the archived log files are missing and cannot be restored.
NOTE: Caution is advised when enabling this parameter as you might end-up losing your entire database. Please contact Oracle Support before using it.
_allow_resetlogs_corruption = true
This should allow you to open the database. However, after using this parameter your database will be inconsistent (some committed transactions may be lost or partially applied).
Steps:
1) Do a "SHUTDOWN NORMAL" of the database
2) Set the above parameter
3) Do a "STARTUP MOUNT" and "ALTER DATABASE OPEN RESETLOGS;"
4) If the database asks for recovery, use an UNTIL CANCEL type recovery and apply
all available archive and on-line redo logs, then issue CANCEL and reissue the
"ALTER DATABASE OPEN RESETLOGS;" command.
5) Wait a couple of minutes for Oracle to sort itself out
6) Do a "SHUTDOWN NORMAL"
7) Remove the above parameter!
8) Do a database "STARTUP" and check your ALERT.LOG file for errors.
9) Extract the data and rebuild the entire database

No comments: