Controlfile Multiplexing and De-Multiplexing In Oracle12c
In this article we will learn what controlfile contains,How to perform controlfile Multiplexing and De-Multiplexing .
Control file :
- Controlfile is a Physical file.
- Controlfile is a small binary file which contains the current physical structure of database.
- Control file contains all the crucial information of database like
–>DBname and ID
–>Name & locations of datafiles
–>SCN# Number
–>Name & locations of redolog files
–>Rman backup informationArchive information
–>Time stamp of DB creation
- Control file is used to start the database.
- The size of control file is in lower MB’s
- We can multiplex the control files to 8 different location(Min-1 Max-8)
- We will give .ctl extension for the controlfile ,but the extension is not mandatory.It is understanding and only for our purpose.
Control file Multiplexing :
As a DBA, you know that control files play a very important role in oracle database.
If the control files are corrupt, can you start your database?
No, you can’t do it. So what should be done to avoid such type of corruption?
As a DBA, it’s your responsibility to multiplex control files to protect your organization in case of possible data loss due to media failure or control file corruption.
Creating a copy of controlfile in a new location with a new name .
Steps for Multiplexing controlfile.
Step 1 :
Connect to database and check for controlfile location .
1 2 3 4 |
SYS>>select name from v$controlfile; NAME ---------------------------------------- /u01/oradata/primary/control.ctl |
Or else we can check using Show Parameter
1 2 3 4 5 |
SYS>>show parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string /u01/oradata/primary/control.ctl |
Step 2 :
Shutdown the database and create new physical location If we dont have existing location
1 2 3 4 5 6 7 |
SYS>>shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SYS>>exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options |
Creating new physical location If we dont have existing location
1 |
[oracle@dba12 ~]$ mkdir -p /u01/oradata/primary/multicontrol |
Step 3 :
Copy the Current Controlfile to Another Directory Location:
1 2 |
[oracle@dba12 primary]$cd /u01/oradata/primary [oracle@dba12 primary]$ cp control.ctl /u01/oradata/primarymulticontrol/control1.ctl |
Step 4 :
Go to pfile location and add new location to control_files parameter
1 2 3 4 |
[oracle@dba12 primary]$ cd $ORACLE_HOME/dbs [oracle@dba12 dbs]$ vi init$ORACLE_SID.ora control_files =/u01/oradata/primary/control.ctl,/u01/oradata/primary/multicontrol/control1.ct1 |
Step 5 :
Startup the database and check control_file parameter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[oracle@dba12 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 3 05:30:49 2001 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SYS>>startup ORACLE instance started. Total System Global Area 260046848 bytes Fixed Size 2923192 bytes Variable Size 167773512 bytes Database Buffers 83886080 bytes Redo Buffers 5464064 bytes Database mounted. Database opened. ######################Check controlfile################# SYS>>select name from v$controlfile; NAME ---------------------------------------- /u01/oradata/primary/control.ctl /u01/oradata/primary/multicontrol/control1.ctl |
De-Multiplexing controlfiles :
Need to repeat same steps but in reverse order
Step 1:
Check controlfile location and Shutdown the database
1 2 3 4 5 6 |
SYS>>select name from v$controlfile; NAME ---------------------------------------- /u01/oradata/primary/control.ctl /u01/oradata/primary/multicontrol/control1.ctl |
1 2 3 4 5 6 7 |
SYS>>shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SYS>>exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options |
Step 2 :
Go top pfile and remove path of unwanted controlfile location
1 2 3 4 |
[oracle@dba12 hrts]$ cd $ORACLE_HOME/dbs [oracle@dba12 dbs]$ vi init$ORACLE_SID.ora #control_files =/u01/oradata/primary/control.ctl,/u01/oradata/primary/multicontrol/control1.ctl control_files =/u01/oradata/primary/control.ctl |
Step 3 :
Connect to sqlplus and start the database
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[oracle@dba12 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 3 06:15:22 2001 copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SYS>>startup ORACLE instance started. Total System Global Area 260046848 bytes Fixed Size 2923192 bytes Variable Size 167773512 bytes Database Buffers 83886080 bytes Redo Buffers 5464064 bytes Database mounted. Database opened. |
Step 4 :
Check controlfile location
1 2 3 4 |
SYS>>select name from v$controlfile; NAME ---------------------------------------- /u01/oradata/primary/control.ctl |
Thank you ….
유흥알바
Hey There. I found your blog the usage of msn.
That is a very smartly written article. I’ll make sure to bookmark it and come back to learn extra of your useful
info. Thank you for the post. I will certainly comeback.