Wednesday, December 23, 2009

Recovering Database from Ora 01194 error

Problem:
The Oracle Database (10.2.0.4) instance would start, database would get mounted, but it would not shift to open state prompting an error:

ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: [Database File Location]


Actions performed before problem

  1. Attempt was being made to put the database into Archive mode. But the command "alter database archivelog;" would give an error mentioning some database file was corrupt. Recovery had to be performed on the file. (Error number was not noted)

  2. Windows update installation required a restart of the Server. Restart was done without explicitly shutting the Oracle Database down.

  3. To put the database in Archive Mode, Shutdown abort was done once. (Instead of normal shutdown or shutdown immediate)



Actions performed to recover database
  • We first tried,

    recover database until cancel;

    The command then suggested certain archive files in the archive destination mentioned in our init.ora. However, since Archiving was never turned on earlier, those files did not exist. The command failed with an OS Error which said that the file was not found.


  • We removed the archive log parameters from init.ora and tried the same command

    recover database until cancel;

    The command suggested Archive files in the folder [Oracle-Home]/RDBMS which did not exist either.

  • Recover Database from backup control file was attempted

    recover database using backup controlfile until cancel;

    But we kept getting the same error as we did not have any archive log file.

  • In all the above cases, we could not open the database using command.

    alter database open resetlogs;

    as it gave the error that the SYSTEM.DBF still needed more recovery.
  • We tried searching Oracle's Metalink support for the problem and then tried to ignore the suggestions made by recovery. Type CANCEL when file is suggested. Even that failed.

  • We finally decided to point to the current redo log files of the database to check if the database could be recovered and that worked.

    recover database using backup controlfile until cancel;

    Oracle suggests filename. Do not click enter, instead type the location of the redo log file. Starting from Redo log file 1, then 2 and then the 3rd until all recovery is complete.
    Database recovered.

  • No comments:

    Post a Comment