发表于: 2008.07.03 14:45
分类: @EBS
出处: http://2jliu.itpub.net/post/21805/465645
---------------------------------------------------------------
The current location of the controlfiles can be queried from the V$CONTROLFILE view, as shown below.
select name from v$controlfile;
NAME
---------------------------------------------------------------
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/control01.ctl
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/control02.ctl
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/control03.ctl
In order to rename or move these files we must alter the value of the control_files instance parameter.
show parameter control_files
NAME VALUE
---------------- ------------------------------------------ ------------------------------
control_files /u01/app/oracle/product/9.2.0/oradata/DEVSOL/control01.ctl, /u01/app/oracle/product/9.2.0/oradata/DEVSOL/control02.ctl, /u01/app/oracle/product/9.2.0/oradata/DE
To move or rename a controlfile do the following:
* Alter the control_files parameter using the ALTER SYSTEM comamnd.
* Shutdown the database.
* Rename the physical file on the OS.
* Start the database.
The following SQL*Plus output shows how this is done for an instance using an spfile. For instances using a pfile replace the spfile manipulation steps with an amendment of the parameter in the init.ora file.
ALTER SYSTEM SET control_files='/new_path/control01.ctl', '/new_path/control02.ctl', '/new_path/control03.ctl' SCOPE=SPFILE;
SHUTDOWN IMMEDIATE!mv /old_path/control01.ctl /new_path/control01.ctl!mv /old_path/control02.ctl /new_path/control02.ctl!mv /old_path/control03.ctl /new_path/control03.ctl
STARTUP
Repeating the initial query shows that the the CONTROLFILES has been renamed in the data dictionary.
select name from v$controlfile;











