Database Reference
In-Depth Information
If you're using a text-based initialization file, you can view the file directly, with an OS editor, or use
the grep command:
$ grep -i control_files $ORACLE_HOME/dbs/initO12C.ora
Adding a Control File
Adding a control file means copying an existing control file and making your database aware of the copy by modifying
your CONTROL_FILES parameter. This task must be done while your database is shut down. This procedure only works
when you have a good existing control file that can be copied. Adding a control file isn't the same thing as creating or
restoring a control file.
If your database uses only one control file, and that control file becomes damaged, you need to either restore a
control file from a backup (if available) and perform a recovery or re-create the control file. If you're using two or more
control files, and one becomes damaged, you can use the remaining good control file(s) to quickly get your database
into an operating state.
If a database is using only one control file, the basic procedure for adding a control file is as follows:
1.
Alter the initialization file CONTROL_FILES parameter to include the new location and name
of the control file.
2.
Shut down your database.
3.
Use an OS command to copy an existing control file to the new location and name.
4.
Restart your database.
Depending on whether you use an spfile or an init.ora file, the previous steps vary slightly. The next two
sections detail these different scenarios.
Spfile Scenario
If your database is open, you can quickly determine whether you're using an spfile with the following SQL
statement:
SQL> show parameter spfile
Here is some sample output:
NAME TYPE VALUE
--------- ----------- ------------------------------
spfile string /orahome/app/oracle/product/12
.1.0.1/db_1/dbs/spfileO12C.ora
When you've determined that you're using an spfile , use the following steps to add a control file:
1.
Determine the CONTROL_FILES parameter's current value:
SQL> show parameter control_files
 
Search WWH ::




Custom Search