Multiplex oracle control file


Multiplex oracle control file

Control file is very crucial for oracle database because it holds the physical record of database. It is recommended that every database must have multiple control file to avoid the risk of losing control file due to corruption for the unexpected failure of system or accidental removal and it is recommended that each control file placed at different  location for security reason.
We are going to create another control file named control03.ctl under the oracle directory.

View the location of existing control file

To view the existing control file location use the run following command on the sql promt.
SQL>  show parameter control_files;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /oracle/oradata/orcl/control01
                                                 .ctl, /oracle/flash_recovery_a
                                                 rea/orcl/control02.ctl


Update the Parameter file

To update the new location and name of the new control file in the parameter file of the database use the following command on sql promt
SQL> alter system set control_files='/oracle/oradata/orcl/control01.ctl',
  2  '/oracle/flash_recovery_area/orcl/control02.ctl',
  3  '/oracle/control03.ctl'
  4  scope=spfile;

Shutdown database

To complete the above activity we shutdown the database to perform rest of the work.To shutdown the database we run the below command on the sql promt.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.



Copy the control file

Now copy the existing control file to the new location in operating system level.To do this activity weun the below command.
[oracle@db ~]$ cp /oracle/oradata/orcl/control01.ctl /oracle/control03.ctl


Startup database


After completing the above step we startup the database run the below command

SQL> startup
ORACLE instance started.

Total System Global Area 2071076864 bytes
Fixed Size                  2214896 bytes
Variable Size            1291846672 bytes
Database Buffers          771751936 bytes
Redo Buffers                5263360 bytes
Database mounted.
Database opened.

Now verify the contol files using this command.

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/oracle/oradata/orcl/control01.ctl
/oracle/flash_recovery_area/orcl/control02.ctl
/oracle/control03.ctl

To un the above command we find the another control file named control03.ctl located /oracle directory.



oracle database controlfile
oracle database controlfile

SHARE

Admin

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment