Steps for Creating New Control Files
Complete the following steps to create a new control file.
-
Make a list of all datafiles and redo log files of the database.
If you follow recommendations for control file backups as discussed in "Backing Up Control Files" , you will already have a list of datafiles and redo log files that reflect the current structure of the database. However, if you have no such list, executing the following statements will produce one.
SELECT MEMBER FROM V$LOGFILE; SELECT NAME FROM V$DATAFILE; SELECT VALUE FROM V$PARAMETER WHERE NAME = 'control_files';
If you have no such lists and your control file has been damaged so that the database cannot be opened, try to locate all of the datafiles and redo log files that constitute the database. Any files not specified in step 5 are not recoverable once a new control file has been created. Moreover, if you omit any of the files that make up the
SYSTEMtablespace, you might not be able to recover the database. -
Shut down the database.
If the database is open, shut down the database normally if possible. Use the
IMMEDIATEorABORTclauses only as a last resort. -
Back up all datafiles and redo log files of the database.
-
Start up a new instance, but do not mount or open the database:
STARTUP NOMOUNT
-
Create a new control file for the database using the
CREATE CONTROLFILEstatement.When creating a new control file, specify the
RESETLOGSclause if you have lost any redo log groups in addition to control files. In this case, you will need to recover from the loss of the redo logs (step 8). You must specify theRESETLOGSclause if you have renamed the database. Otherwise, select theNORESETLOGSclause. -
Store a backup of the new control file on an offline storage device. See "Backing Up Control Files" for instructions for creating a backup.
-
Edit the
CONTROL_FILESinitialization parameter for the database to indicate all of the control files now part of your database as created in step 5 (not including the backup control file). If you are renaming the database, edit theDB_NAMEparameter in your instance parameter file to specify the new name. -
Recover the database if necessary. If you are not recovering the database, skip to step 9.
If you are creating the control file as part of recovery, recover the database. If the new control file was created using the
NORESETLOGSclause (step 5), you can recover the database with complete, closed database recovery.If the new control file was created using the
RESETLOGSclause, you must specifyUSING BACKUP CONTROL FILE. If you have lost online or archived redo logs or datafiles, use the procedures for recovering those files.See Also:
Oracle Database Backup and Recovery User's Guide for information about recovering your database and methods of recovering a lost control file -
Open the database using one of the following methods:
-
If you did not perform recovery, or you performed complete, closed database recovery in step 8, open the database normally.
ALTER DATABASE OPEN;
-
If you specified
RESETLOGSwhen creating the control file, use theALTER DATABASEstatement, indicatingRESETLOGS.ALTER DATABASE OPEN RESETLOGS;
-
The database is now open and available for use.
1937

被折叠的 条评论
为什么被折叠?



