Site icon IT Tutorial

How to Multiplex Controlfile in Oracle RAC or ASM

Hi,

I will explain How to Multiplex Controlfile in Oracle RAC or ASM in this article.

 

 

The Control file is a file with a .ctl extension that is physically stored on the operating system that is a must for an Oracle database. This file also acts as the brain for our Oracle database. When the Oracle database starts, it reads the parameter file called SPFILE or PFILE and learn the location of the Control file. Because the Control file is the brain of our database, the database needs to find this file to work. If it cannot find the Control File, the Oracle database will not start and will give an error. Thats why, the control file is stored in 2 copies in the production databases. Oracle’s recommended configuration is that we store 3 copies on separate disks.

 

You can find more details about controlfile like following link.

https://ittutorial.org/oracle-database-architecture-1/

 

Now let’s go to multiplex controlfile on 2 node RAC. Normally, we have one controlfile which is located on +DATA ASM disk group, we will multiplex it and new controlfile will be located on +RECO Disk group. Thus, database will run with two controlfile simultaneously.

If one controlfile is corrupted, then database can run with other controlfile.

 

 



Check existing controlfile.

SQL> show parameter control_file
NAME TYPE VALUE
 ------------------------------------ ----------- ------------------------------
 control_file_record_keep_time integer 7
 control_files string +DATA/POCDB/controlfile/current.256.847487823

 


 

Stop RAC database like following.

srvctl stop database -d POCDB


start database nomount mode like following.

srvctl start database -d POCDB -o nomount





Now let’s go to multiplex controlfile on ASM using restore existing controlfile like following.

 

connected to target database: POCDB (not mounted)
RMAN> restore controlfile from '+DATA/POCDB/controlfile/current.256.847487823';
Starting restore at 14-MAY-14
using target database control file instead of recovery catalog
 allocated channel: ORA_DISK_1
 channel ORA_DISK_1: SID=853 instance=POCDB1 device type=DISK
channel ORA_DISK_1: copied control file copy
 output file name=+DATA/POCDB/controlfile/current.256.847487823
 output file name=+RECO/POCDB/controlfile/current.263.847536995
 Finished restore at 14-MAY-14
RMAN>

 

Set controlfiles parameter with two controlfiles like following.

 SQL> alter system set control_files='+DATA/POCDB/controlfile/current.256.847487823', +RECO/POCDB/controlfile/current.263.847536995'  scope=spfile sid='*';

 

 

Stop RAC database again

oracle:oraserver01:/home/users/oracle:>srvctl stop database -d POCDB


Then start RAC database now like following.

 

 oracle:oraserver01:/home/users/oracle:>srvctl start database -d POCDB

 

 

 

Now check controlfile again, you can see that controlfile multiplexed

 


 SQL> show parameter control_files
NAME TYPE VALUE
 ------------------------------------ ----------- ------------------------------
 control_files string +DATA/POCDB/controlfile/current.256.847487823, +RECO/POCDB/controlfile/current.263.847536995

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version