All technological notes.
Control FilesControl FilesEnsure redundancy of control files. If a control file is damaged or lost, recovery is easier if you have another copy.
To protect against database failure, your database should have multiple copies of the control file.

control file
Database should have a minimum of two control files on different storage devices to minimize the impact of a loss of one control file.
instance to fail because all control files must be available at all times.In a database using regular file system storage, adding a control file is a manual operation:
ALTER SYSTEM SET control files =
'/u0l/app/oracle/oradata/orcl/controlOl.ctl"' ,
'/u02/app/oracle/oradata/orcl/control02.ctl"' ,
'/u03/app/oracle/oradata/orcl/control03.ctl' SCOPE=SPFILE;
ASM as your storage technique, then as long as you have two control files, one in each disk group (such as +DATA and +FRA), you should not require further multiplexing.Oracle Managed Files (OMF)—such as a database using ASM storage—all additional control files must be created as part of a recovery process using RMAN (or using Enterprise Manager).sqlplus / AS SYSDBA
SELECT name FROM v$controlfile;
CDB was created, DBCA created two control files.CREATE DATABASE command in SQL*Plus to create a database, you configure the CONTROL_FILES parameter to generate two control files and set their names.
SHOW PARAMETER control files;

CREATE PFILE FROM SPFILE;

IMMEDIATE mode.SHUTDOWN IMMEDIATE
EXIT
# Create a directory for the new control file.
mkdir -p /u01/app/oracle/controlfiles_dir/ORCL
# copy one of control file to directory
cp /u0l/app/oracle/oradata/ORCL/control0l.ctl /u01/app/oracle/controlfiles_dir/ORCL/control03.ctl
control_files=# Backup pfile
cp $ORACLE_HOME/dbs/initorcl.ora $ORACLE_HOME/dbs/backup_initorcl.ora
vi $ORACLE_HOME/dbs/initorcl.ora
# add ,'/u01/app/oracle/controlfiles_dir/ORCL/control03.ctl'

sqlplus / AS SYSDBA
STARTUP
-- view parameter
SHOW PARAMETER control_files
Note:
SPFILE.
SPFILE does not exist, then the instance starts up with a PFILE.SPFILE and PFILE are present, so the SPFILE takes precedence.PFILE, not the The SPFILE still contains only two references.
SHUTDOWN IMMEDIATE
EXIT
# re-create cf
cp /u01/app/oracle/oradata/ORCL/control01.ctl /u01/app/oracle/controlfiles_dir/ORCL/control03.ctl
sqlplus / AS SYSDBA
-- create a spfile from pfile before startup
CREATE SPFILE FROM PFILE;
STARTUP
SHOW PARAMETER control_files;
SELECT name FROM v$controlfile;



# refer to the backup pfile
PFILE_PATH=$ORACLE_HOME/dbs/backup_initorcl.ora
sqlplus -s / as sysdba <<EOF
-- Starting the Oracle instance with the specified pfile
STARTUP PFILE='$PFILE_PATH';
-- Recreating the spfile from the current pfile
CREATE SPFILE FROM PFILE;
SHUTDOWN IMMEDIATE
-- startup normally with recreated spfile
STARTUP
SHOW PARAMETER control_files;
SELECT name FROM v\$controlfile;
EXIT
EOF
# remove the additional control file
rm -rf /u01/app/oracle/controlfiles_dir/ORCL
-- View current cf
show parameter control_files;
-- NAME TYPE VALUE
-- ------------- ------ --------------------------------------------------------------------------------------
-- control_files string /u01/app/oracle/oradata/ORCL/control01.ctl, /u01/app/oracle/oradata/ORCL/control02.ctl
SELECT name FROM v$controlfile;
-- /u01/app/oracle/oradata/ORCL/control01.ctl
-- /u01/app/oracle/oradata/ORCL/control02.ctl
CREATE PFILE FROM SPFILE;
-- create initorcl.ora in $ORACLE_HOME/dbs
SCOPE set as spfile to prevent the database from attempting to look for the new file at this timeALTER SYSTEM SET CONTROL_FILES='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl' SCOPE=spfile;
SHUTDOWN IMMEDIATE
mv /u01/app/oracle/oradata/ORCL/control02.ctl /u01/app/oracle/fast_recovery_area/ORCL/control02.ctl
STARTUP
SELECT name FROM v$controlfile;
show parameter control_files
