Thursday 26 March 2009

I've lost an archived/online REDO LOG file, can I get my DB back?

The following INIT.ORA/SPFILE parameter can be used if your current redologs are corrupted or blown away. It is also handy if you do database recovery and one of the archived log files are missing and cannot be restored.

_allow_resetlogs_corruption = true

STEPS:
  • Do a "SHUTDOWN NORMAL" of the database
  • Set the above parameter
  • Do a "STARTUP MOUNT" and "ALTER DATATBASE OPEN RESETLOGS;"
  • If the database asks for recovery, use a UNTIL CANCEL type recovery and apply all available archive and online redo logs, then issue CANCEL and reissue the "ALTER DATATBASE OPEN RESETLOGS;" command.
  • Wait a couple of minutes for Oracle to sort itself out
  • Do a "SHUTDOWN NORMAL"
  • Remove the above parameter!
  • Do a database "STARTUP" and check your ALERT.LOG file for errors.

NOTE: Caution is advised when enabling this parameter as you might end-up losing your entire database. Please contact Oracle Support before using it.

No comments:

Post a Comment