It is possible to move/rename the database’s control files should the need arise. This document will detail the steps required to move/rename the control files in an 11gR2 environment on Linux. These steps also apply to a 10g environment.
First we will verify the current location of the control files.
SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/orcl/control01.ctl /u01/app/oracle/flash_recovery_area/orcl/control02.ctl SQL> </pre> The location of the control files is all stored in the <code>SPFILE</code>. <pre> SQL> show parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string /u02/app/oracle/oradata/orcl/c ontrol01.ctl, /u01/app/oracle/ flash_recovery_area/orcl/contr ol02.ctl SQL>
In this document we are going to move the control file located in /u02/app/oracle/oradata/orcl
to /u02/app/oracle/oradata/orcl/ctl
.
First we will set the CONTROL_FILES
parameter to the new location for control file control01.ctl.
SQL> alter system 2 set control_files='/u02/app/oracle/oradata/orcl/ctl/control01.ctl', 3 '/u01/app/oracle/flash_recovery_area/orcl/control02.ctl' 4 scope=spfile; System altered. SQL>
Next we shutdown the database and move the control file with OS commands then we start up the database to complete the move/rename of the control file.
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> host [oracle@ora1 ~]$ mv /u02/app/oracle/oradata/orcl/control01.ctl /u02/app/oracle/oradata/orcl/ctl/control01.ctl [oracle@ora1 ~]$ exit exit SQL> startup ORACLE instance started. Total System Global Area 849530880 bytes Fixed Size 1339824 bytes Variable Size 528485968 bytes Database Buffers 314572800 bytes Redo Buffers 5132288 bytes Database mounted. Database opened. SQL>
Now when we show the location of the control files the new location is displayed for contol01.ctl.
SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/orcl/ctl/control01.ctl /u01/app/oracle/flash_recovery_area/orcl/control02.ctl SQL> show parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string /u02/app/oracle/oradata/orcl/c tl/control01.ctl, /u01/app/ora cle/flash_recovery_area/orcl/c ontrol02.ctl SQL>
Moving the control file(s) is a task that should be followed by backup of the control files for backup and recovery purposes.
very good…..
Clear and precise …very good.
I would choose to cp the controlfile, instead of mv. Tiny detail, a little bit safer.
how to rename a controlfile if we copied it from different location to another location?
suppose,if we wish to rename ‘control02.ctl’ to ‘control01.ctl’ what should we do?
could you please help me?
ora-00205:error in identifying control files,check alert log for more info
any detail solution please
Tks…very simple