Home » RDBMS Server » Server Administration » How to add a new control file to oracle 10G R2 database
How to add a new control file to oracle 10G R2 database [message #156799] Fri, 27 January 2006 21:24 Go to next message
evoradba
Messages: 144
Registered: April 2005
Location: Canada
Senior Member
HELP

I have oracle 10g R2 running on solaris 5.8 and I only have 1 control file, but I would like to add at least 2 more. How can I do this with out recreating the entire database from scratch?

Many thanks
Maria
Re: How to add a new control file to oracle 10G R2 database [message #156854 is a reply to message #156799] Sat, 28 January 2006 12:08 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE

Then find & edit the resultant file to create multiple control files.
SQL> SHUTDOWN IMMEDIATE
SQL> @EDITED_TRACE_FILE.SQL
Re: How to add a new control file to oracle 10G R2 database [message #156961 is a reply to message #156854] Mon, 30 January 2006 07:27 Go to previous messageGo to next message
alliejane
Messages: 59
Registered: July 2005
Location: Glasgow
Member
Hi Maria,

This really isn't the best way of doing it, give me 15mins and I'll post comprehensive instructions.

Allie
Re: How to add a new control file to oracle 10G R2 database [message #156970 is a reply to message #156961] Mon, 30 January 2006 07:48 Go to previous message
alliejane
Messages: 59
Registered: July 2005
Location: Glasgow
Member
Hi Maria,

Although the last post will work, there is a much easer way of multiplexing your controlfiles.

Oracle uses the "control_files =" entry in the parameter file to find the location of the controlfile(s) on database startup, you need to update this entry to point to multiple locations where you have placed identical copys of your 1 original controlfile.

You can only copy the controlfile when the database is closed so the order in which you perform these steps is very important.

In addition to that, there is two types of parameter files (init.ora and spfiles) which of the following instructions you follow depends of which type of file you are using.

To check which on type you are using, use the following command.

SQL> show parameter spfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string ?/spfile@.ora

If there is an entry in the value colum as above then you are using a server parameter file and it can't be update with a text editor, therefor follow the steps below.

SPFILE STEPS.

1. Use sqlplus to update your spfile with the location of the original controlfile and the two new ones that you will copy in the next step.

ALTER SYSTEM SET control_files =
'full path of original file','full path of copy 1','full path of copy 2' scope=spfile;
eg ...
ALTER SYSTEM SET control_files =
'$ORACLE_HOME/ORADATA/u01/control1.ctl','$ORACLE_HOME/ORADATA/u02/control2.ctl','$ORACLE_HOME/ORADATA/u03/control3.ctl'
scope=spfile;

2. shutdown immediate
3. Copy the controlfile to it's two new locations
4. Startup

If the value shows a blank

SQL> show parameter spfile

NAME TYPE VALUE
------------------------------------ ----------- ---------------
spfile string

Then follow the steps below.

INIT.ORA STEPS

1. Shutdown immdiate
2. Open the init.ora file in a text editor like vi (you should find it in the $ORACLE_HOME/dbs directory)
control_files='$ORACLE_HOME/ORADATA/u01/control1.ctl','$ORACLE_HOME/ORADATA/u02/control2.ctl','$ORACLE_HOME/ORADATA/u03/control3.ctl'
3. Copy the original file to it's two new locations.
4. Startup immediate.

Hope that helps, get back to me if you need any more information or support.

Good luck.

Allie
Previous Topic: Index Skip Scan
Next Topic: import a single object
Goto Forum:
  


Current Time: Sat Jan 25 10:39:33 CST 2025