Wednesday, February 3, 2010

How to perform database recovery with a corrupt control file in Oracle

How can I perform a database recovery with a corrupt control file in Oracle?

You'll have to manually create the control file. First, take a backup of your database's files so that you can always start over should something go wrong. Then, STARTUP NOMOUNT the database and issue the CREATE CONTROLFILE command.

You will have to know things like where your datafiles are. Once you have successfully issued the CREATE CONTROLFILE command, then you can do the following:

RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

Specify CANCEL when you have applied all of your redo logs for recovery. Then specify:

ALTER DATABASE OPEN RESETLOGS;

SHUTDOWN IMMEDIATE

Next, take a backup of your database. If you have succeeded, you do not want to go through this again.

No comments:

Post a Comment