Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Creating Control Files

Every Oracle7 database has a control file. A control files records the physical structure of the database and contains:

The control file of an Oracle7 database is created at the same time as the database. By default, at least one copy of the control file must be created during database creation. On some operating systems, Oracle7 creates multiple copies. You should create two or more copies of the control file during database creation. You might also need to create control files later, if you lose control files or want to change particular settings in the control files.

This section describes ways to create control files, and includes the following topics:

Creating Initial Control Files

You create the initial control files of an Oracle7 database by specifying one or more control filenames in the CONTROL_FILES parameter in the parameter file used during database creation. The filenames specified in CONTROL_FILES should be fully specified. Filename specification is operating system-specific.

If files with the specified names currently exist at the time of database creation, you must specify the CONTROLFILE REUSE parameter in the CREATE DATABASE command, or else an error occurs. Also, if the size of the old control file differs from that of the new one, you cannot use the REUSE option. The size of the control file changes between some release of new version of Oracle, as well as when the number of files specified in the control file changes; configuration parameters such as MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES, and MAXINSTANCES affect control file size.

If you do not specify files for CONTROL_FILES before database creation, Oracle7 uses a default filename. The default name is also operating system-specific.

You can subsequently change the value of the CONTROL_FILES parameter to add more control files or to change the names or locations of existing control files.

See Also: For more information about specifying control files, see your operating system-specific Oracle documentation.

Creating Additional Copies of the Control File, and Renaming and Relocating Control Files

You add a new control file by copying an existing file to a new location and adding the file's name to the list of control files.

Similarly, you rename an existing control file by copying the file to its new name or location, and changing the file's name in the control file list.

In both cases, to guarantee that control files do not change during the procedure, shut down the instance before copying the control file.

To Multiplex or Move Additional Copies of the Current Control File

New Control Files

You can create a new control file for a database using the CREATE CONTROLFILE command. This is recommended in the following situations:

The following statement creates a new control file for the PROD database (formerly a database that used a different database name):

CREATE CONTROLFILE
	SET DATABASE prod
	LOGFILE GROUP 1 ('logfile1A', 'logfile1B') SIZE 50K,
	   GROUP 2 ('logfile2A', 'logfile2B') SIZE 50K
	NORESETLOGS
	DATAFILE 'datafile1' SIZE 3M, 'datafile2' SIZE 5M
	MAXLOGFILES 50
	MAXLOGMEMBERS 3
	MAXDATAFILES 200
	MAXINSTANCES 6
	ARCHIVELOG;

Warning: The CREATE CONTROLFILE command can potentially damage specified datafiles and online redo log files; omitting a filename can cause loss of the data in that file, or loss of access to the entire database. Employ caution when using this command and be sure to follow the steps in the next section.

See Also: For more information about the CREATE CONTROLFILE command, see the .

Creating New Control Files

This section provides step-by-step instructions for creating new control files.

To Create New Control Files

The database is now open and available for use.

See Also: For more information about listing database files, see "Listing Database Files Before Backup" [*].

For more information on backing up all datafiles and online redo log files of the database, see "Performing a Full Backup" [*].

For more information on recovering online or archived redo log files, see "Loss of Online Redo Log Files" [*] and "Loss of Datafiles" [*].

For more information on closed database recovery, see [*].


Contents Index Home Previous Next