Even though
you have copies of the control file stored in different locations, there is
still the possibility that you will, at some point, have to recover from losing
all of those copies. If you have lost all copies of the current control file,
and have a backup control file, your course of action depends on the status of
the online log files and the data files.
Online
Logs Available
If the
online logs are available and contain redo necessary for recovery, and the data
files are current, then you can restore a backup control file, perform complete
recovery, and open the database with the RESETLOGS option. You must specify the
file names of the online redo logs during recovery. If the data files are not
current, then restore a backup control file, perform complete recovery, and
open the database with the RESETLOGS option.
Online
Logs Not Available
If the
online logs are not available, and the data files are current, then re-create
the control file and open RESETLOGS. However, if the data files are not
current, restore a backup control file, perform incomplete recovery, and open
RESETLOGS.
Recovering
the Control File to the Default Location
If you need
to recover the control file, and the default location is still a valid one. The
database must be shut down first. Then repair any hardware, so that the default
location is able to remain as a valid one. Restore the control file to the
default location. Do this using a command such as this, which copies the backup
control file to the default location:
% cp /backup/control01.dbf
/disk1/oradata/trgt/control01.dbf
% cp /backup/control02.dbf
/disk2/oradata/trgt/control02.dbf
Mount the
database, and start the recovery process. You must specify that a backup
control file is being used.
SQL> RECOVER DATABASE
USING BACKUP CONTROLFILE UNTIL CANCEL;
If, during
the recovery process, you are prompted for a missing redo log, it probably
means that the missing redo log is an online redo log file. When prompted,
supply the name of the online redo log file. After the recovery completes, open
the database, specifying the RESETLOGS option.