Database Reference
In-Depth Information
You can view database-related information stored in the control file via the V$DATABASE view:
SQL> select name, open_mode, created, current_scn from v$database;
NAME OPEN_MODE CREATED CURRENT_SCN
--------- -------------------- --------- -----------
O12C READ WRITE 27-SEP-14 319781
Every Oracle database must have at least one control file. When you start your database in nomount mode, the
instance is aware of the location of the control files from the CONTROL_FILES initialization parameter in the spfile
or init.ora file. When you issue a STARTUP NOMOUNT command, Oracle reads the parameter file and starts the
background processes and allocates memory structures:
-- locations of control files are known to the instance
SQL> startup nomount;
At this point, the control files haven't been touched by any processes. When you alter your database into mount
mode, the control files are read and opened for use:
-- control files opened
SQL> alter database mount;
If any of the control files listed in the CONTROL_FILES initialization parameter aren't available, then you can't
mount your database.
When you successfully mount your database, the instance is aware of the locations of the data files and online
redo logs but hasn't yet opened them. After you alter your database into open mode, the data files and online redo
logs are opened:
-- datafiles and online redo logs opened
SQL> alter database open;
keep in mind that when you issue the STARTUP command (with no options), the previously described three
phases are automatically performed in this order: nomount, mount, open. When you issue a SHUTDOWN command, the
phases are reversed: close the database, unmount the control file, and stop the instance.
Note
The control file is created when the database is created. If possible you should have multiple control files stored
on separate storage devices controlled by separate controllers.
After the database has been opened, Oracle will frequently write information to the control files, such as when
you make any physical modifications (e.g., creating a tablespace, adding/removing/resizing a data file). Oracle writes
to all control files specified by the CONTROL_FILES initialization parameter. If Oracle can't write to one of the control
files, an error is thrown:
ORA-00210: cannot open the specified control file
If one of your control files becomes unavailable, shut down your database, and resolve the issue before restarting
(see Chapter 6 for using RMAN to restore a control file). Fixing the problem may mean resolving a storage-device
failure or modifying the CONTROL_FILES initialization parameter to remove the control file entry for the control file that
isn't available.
 
 
Search WWH ::




Custom Search