Published by : Obay Salah , November 19, 2024

 It can be called a control file, and it is a binary file, meaning it cannot be read through a text editor, as it is not text, and without it the database does not work. It is read in Mount mode, so we can open the database in Nomount mode even if we lose the Control File. Of course, it is dependent on one database,

and is only updated by the Oracle server while the database is running, so the database administrator cannot update it.

If we lose the Control File, we need to retrieve it before opening the database again. It is created during the creation of the database, and the number of File Controls can be increased after the database is created so that we can retrieve it if we lose one of the Control Files.

The Control File contains the following: -

1- Database name.

2- Database creation time.

3- Tablespace names.

4- Name and location of Data Files and Redo Log Files.

5- Current Redo Log and its serial number.

6- Backup information. For example RMAN information. We will discuss this later.

7- Archive information.

8- It contains the following information (MAXLOGMEMBERS & MAXLOGFILES & MAXLOGHISTORY & MAXDATAFILES & MAXINSTANCES).

Multiplexing the Control File:

The meaning is that the database works on a number of Control Files, knowing that all the Control Files are the original.

In this way, we can secure the database in the event of losing one of the Control Files.

It is also better to distribute these files on a number of disks so that we do not lose them all.

Now let's assume that we have a database named OBAY that contains 3 Control Files to which we want to add another Control File.

We will do this scenario in two cases:-

First case: Using SPFILE.


Second case: Using init.ora.

First case (SPFILE): -

1- We modify the variable Control_files in the variables file (SPFILE) and add to it the location of the Control File that we want to add to the database.

ALTER SYSTEM SET

CONTROL_FILES='D:\oracle\product\10.1.0\oradata\OBAY\CONTROL01.CTL',

'D:\oracle\product\10.1.0\oradata\OBAY\CONTROL02.CTL',

'D:\oracle\product\10.1.0\oradata\ OBAY\CONTROL03.CTL',

'D:\oracle\product\10.1.0\oradat a\OBAY\CONTROL04.CTL' SCOPE=SPFILE;

2- We need to close the database now so that the previous modification can be updated.

3- Through the operating system, we make a copy of one of the existing Control Files and put it and name it as we specified in the variable Control_Files.

4- Now the database can be opened.

Thus, the database now works with four Control Files instead of three.

Note that the process requires closing the database, then making copies on the operating system, and then opening the database again.

The second case (init.ora):-

1- Lock the database.

2- Modify the Control_Files variable on the variables file .initobay.ora so that we add the name and path of the new Control File and then save the file,



3- Through the operating system, we make a copy of one of the existing Control Files and put it and name it as we specified in the variable Control_Files.

4- Open the database.

Of course, the modification can be verified via the command SHOW PRAMAETERS CONTROL_FILES.

Tags : Database

You May Also Like

Comments

no comment yet!