CREATE CONTROLFILE

Create a control file.

Syntax:

   CREATE CONTROLFILE [REUSE] [SET] DATABASE database
      LOGFILE [GROUP int] filespec
         [RESETLOGS | NORESETLOGS]
            DATAFILE filespec options [CHARACTER SET charset]

Options:
   MAXDATAFILES int
   MAXLOGFILES int
   MAXLOGMEMBERS int
   MAXLOGHISTORY int
   MAXINSTANCES int
   ARCHIVELOG | NOARCHIVELOG
   FORCE LOGGING

Several LOGFILE and/or DATAFILEs can be specified at once if separated with commas.

Do not include in the DATAFILE clause any datafiles in temporary or read-only tablespaces. You can add these to the database later.

Use this command to re-create a control file only if:

Oracle recommend that you perform a full backup of all database files before using this statement. (see the Oracle User-Managed Backup and Recovery Guide)

An alternative to CREATE CONTROLFILE is
ALTER DATABASE BACKUP CONTROLFILE TO TRACE
this generates a new SQL script that can be used to re-create the controlfile.

Specify REUSE to indicate that existing control files identified by the initialization
parameter CONTROL_FILES can be reused and overwritten.

Use SET DATABASE to change the name of the database.

Use the logfile_clause to specify ALL the redo log files for the database.

Specify RESETLOGS if you want Oracle to ignore the contents of the files listed in the LOGFILE clause. The log files do not have to exist but each redo_log_file_spec in the LOGFILE clause must specify the SIZE parameter. Oracle will assign all online redo log file groups to thread 1 and will enable this thread for public use by any instance. You must then open the database using ALTER DATABASE RESETLOGS.

NORESETLOGS will use all files in the LOGFILE clause as they were when the database was last open. These files must exist and must be the current online redo log files rather than restored backups.
Oracle will reassign the redo log file groups to reenabled threads as previously assigned.

The FORCE LOGGING clause will put the database into FORCE LOGGING mode after control file creation.

"To the victor go the spoils” ~ Senator William L. Marcy (1828)

Related Oracle Commands:

ALTER DATABASE BACKUP CONTROLFILE TO TRACE

Related Views:

GLOBAL_NAME
DBA_DATA_FILES

V$CONTROLFILE
V$DATABASE
V$DATAFILE
V$LOG
V$LOGFILE


 
Copyright © 1999-2024 SS64.com
Some rights reserved