How to multiplex control file on a RAC Database when ASM is being used and on non-ASM environment

How to multiplex control file on a RAC Database when ASM is being used and on non-ASM environment

Follow the steps below to multiplex the Control File.

RAC ASM Environment

STEP 1

Connect to any one of the RAC nodes and check the current control file status

$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 07:55:12 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/ORADB/CONTROLFILE/current.256.1155470367

STEP 2

Modify the control_files parameter by adding the new disk group

SQL> alter system set control_files='+DATA/ORADB/CONTROLFILE/current.256.1155470367','+FRA' scope=spfile;

System altered.
SQL> exit

STEP 3

Shutdown the RAC database and start it in nomount mode

  $  srvctl stop database -d ORADB
  $ srvctl start database -d ORADB -o nomount

STEP 4

Check the database to confirm addition of new diskgroup to the control_files parameter

$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 07:59:11 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> show parameter control_files

NAME               TYPE           VALUE
--------------- ------------- ------------------------------
control_files       string  +DATA/ORADB/CONTROLFILE/current.256.1155470367, +FRA

SQL> exit

STEP 5

Connect to RMAN and use the restore command to create a copy of the control file

$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Apr 25 08:04:19 2021
Version 19.8.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORADB(not mounted)
RMAN> restore controlfile from '+DATA/ORADB/CONTROLFILE/current.256.1155470367';

Starting restore at 25-APR-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=53 instance=ORADB1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATA/ORADB/CONTROLFILE/current.256.1155470367
output file name=+FRA/ORADB/CONTROLFILE/current.263.1157817489
Finished restore at 25-APR-21

RMAN> exit

Take notice of the newly generated control file ‘+FRA/ORADB/CONTROLFILE/current.263.1157817489’

STEP 6

Connect to sqlplus and modify the contol_files parameter

$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 08:06:15 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> alter system set control_files='+DATA/ORADB/CONTROLFILE/current.256.1155470367','+FRA/ORADB/CONTROLFILE/current.263.1157817489' scope=spfile;

System altered.
SQL> exit

STEP 7

Shutdown the database and start up normal

$ srvctl stop database -d ORADB
$ srvctl start database -d ORADB

STEP 8

Connect to sqlplus and confirm muliplex of the control file

$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 08:03:15 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
SQL> show parameter control_files

NAME                  TYPE            VALUE
---------------- ----------- ------------------------------------------
control_files     string      +DATA/ORADB/CONTROLFILE/current.256.1155470367,
                              +FRA/ORADB/CONTROLFILE/current.263.1157817489
 

SQL> select name from v$controlfile;

NAME
------------------------------------------------------------------------
+DATA/ORADB/CONTROLFILE/current.256.1155470367
+FRA/ORADB/CONTROLFILE/current.263.1157817489

Non-ASM Environment

STEP 1

Check the current control file

[oracle@srv1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 09:55:21 2021
Version 19.8.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/ORADB/control01.ctl
/u01/app/oracle/fra/ORADB/control02.ctl

SQL> exit

STEP 2

Modify the control_files parameter by adding a new disk location. We will use this location ‘/u02/oracle/ORADB’

$ mkdir -p /u02/oracle/ORADB
$ chown -R oracle:oinstall /u02
$ chmod -R 775 /u02

SQL> alter system set control_files='/u01/app/oracle/oradata/ORADB/control01.ctl','/u01/app/oracle/fra/ORADB/control02.ctl','/u02/oracle/ORADB/control03.ctl' scope=spfile;

System altered.

STEP 3

Shutdown the database and copy the control file to the newly created location

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
[oracle@srv1 ~]$ 

[oracle@srv1 ~]$ cp /u01/app/oracle/oradata/ORADB/control01.ctl /u02/oracle/ORADB/control03.ctl

STEP 4

Startup the database and check the control_files parameter

[oracle@srv1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 10:06:08 2021
Version 19.8.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup 
ORACLE instance started.

Total System Global Area 1073738888 bytes
Fixed Size		    9143432 bytes
Variable Size		  553648128 bytes
Database Buffers	  503316480 bytes
Redo Buffers		    7630848 bytes
Database mounted.
Database opened.
SQL> 
SQL> 
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/ORADB/control01.ctl
/u01/app/oracle/fra/ORADB/control02.ctl
/u02/oracle/ORADB/control03.ctl

SQL>