CONTROL_FILES initialization parameter.
To understand about CONTROL_FILES initialization parameter we first need to understand what initialization parameters are.
Initialization Parameters
To manage the Oracle instances, the Oracle Universal installer configures parameters that can affect the basic operations of the instance. These parameters are called Initialization parameters.
Initialization parameters are stored in parameter files famously known as SPFILE or PFILE. On startup, Oracle instance reads initialization parameters from these.
CONTROL_FILES initialization parameters
CONTROL_FILES initialization Parameter specifies one or more control file names along with their location in the database.
Whenever we execute CREATE DATABASE statement, all the control files listed in this CONTROL_FILES initialization parameter get created.
What is the location of Oracle Control file
We can find out the name and location of the control file using the said initialization parameter
[oracle@oracle-db-19c ~]$
[oracle@oracle-db-19c ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 1 15:28:51 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> set pagesize 200
SQL> set linesize 200
SQL>
SQL>
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
control_files string /u02/oradata/CDB1/control01.ct
l, /u02/oradata/CDB1/control02
.ctl
SQL>
v$Controlfile View
The second way of finding out the name and the location of the control file in Oracle is by using v$controlfile dynamic performance view.
[oracle@oracle-db-19c ~]$
[oracle@oracle-db-19c ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 1 15:30:05 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u02/oradata/CDB1/control01.ctl
/u02/oradata/CDB1/control02.ctl
SQL>
These are the two most common ways to find the name and location of the control files in the Oracle Database.