How To Change Cluster Name In Oracle RAC

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 01 Sep, 2023
  • 0 Comments
  • 2 Mins Read

How To Change Cluster Name In Oracle RAC

How To Change Cluster Name In Oracle RAC

Changing the cluster_name in ORACLE RAC means grid infrastructure need to be reconfigured( which is a complex activity). You will need downtime for this activity and you will lose your cluster services, But good thing is you won’t lose your data. The data (ASM DISKS) will be intact. In the below example,  you will see , how to do that.

In the below example we will change the cluster_name from clsrac to clsrep.

NODES        = classbtc03(local node), classbtc04 ( remote node)
GRID VERSION = 19C
GRID_HOME    = /u02/app/grid/product/19C/dbhome
ORACLE_HOME  = /u01/app/oracle/product/19C/dbhome
CLUSTER_NAME = clsrac
DATABASES    = racdb

1. Check the existing cluster_name:
[root@install]#  /u02/app/grid/product/19C/dbhome/bin/olsnodes -c
2. Notedown cluster resource details and the config of database and services.
[oracle@node1 ~]$ crsctl stat res -t
3. Deconfig the remote node:[ as root user ]
[root@node2 install]# /u02/app/grid/product/19C/dbhome/crs/install/rootcrs.sh  -deconfig -force -verbose
If you have more than 2 nodes, then run the same on other nodes , excluding the local node.
4. Deconfig on local node: [ as root ]
[root@node1 install]# /u02/app/grid/product/19C/dbhome/crs/install/rootcrs.sh -deconfig -force -verbose -lastnode
5.Delete the grid_home directory from both nodes:
echo $ORACLE_HOME
/u02/app/grid/product/19C/dbhome
cd /u02/app
rm -rf oracle
6. Change the permission of mount point from root to grid_owner on both nodes:
cd /
chown oracle:oinstall u02
7. Remove the crs=true keyword from inventory.xml file from both nodes:
[oracle@node2 gpnp]$ cd /u02/app/oraInventory/ContentsXML

[oracle@node2 ContentsXML]$ cat inventory.xml | grep CRS

Remove the CRS=”true” keyword. [oracle@node2 ContentsXML]$ cat inventory.xml | grep CRS

8.remove the entry for grid_home from oratab entry [ both nodes]
cat /etc/oratab

 

 

9. Copy the grid software to grid_home location and unzip it.  
mkdir -p /u02/app/grid/product/19C/dbhome/
cp grid_home19c.zip /u02/app/grid/product/19C/dbhome/
cd /u02/app/grid/product/19C/dbhome/
unzip grid_home19c.zip

10. Start the gridsetup installer in GUI mode:[ on local node as oracle user]
./gridSetup.sh
Follow all steps at GUI & complete grid installation
Now your grid setup is completed.

11. Verify the cluster_name:

[root@node2 install]# /u02/app/grid/product/19C/dbhome/bin/olsnodes -c
clspre
We can see the cluster_name has been updated as per our requirement.

11. Scan the asm disks on both nodes:[ as root user]
[root]# oracleasm scandisks
[root ~]$ oracleasm scandisks
12.Mount the diskgroups on both nodes:
echo $ORACLE_SID=+ASM1
echo $ORACLE_HOME=/u02/app/grid/product/19C/dbhome
[oracle@node1]$ asmcmd

ASMCMD> lsdg
ASMCMD > mount -a

ASMCMD> lsdg 
We can see the all diskgroups are intact.
13 .Now register the database in the CRS and start it.
[oracle@node1 dbs]$ srvctl add database -d classrep -oraclehome /oracle/app/oracle/product/19.3.0/dbhome_1
[oracle@node1 dbs]$ srvctl add instance -d classrep -i classrep1 -node node1
[oracle@node1 dbs]$ srvctl add instance -d classrep -i classrep2 -node node2
[oracle@node1 dbs]$ srvctl modify database -db classrep -spfile '+DATA/classrep/PARAMETERFILE/spfile.263.1070311859'

[oracle@node1 dbs]$ srvctl config database -d classrep
[oracle@node1 dbs]$ srvctl start database -db classrep
14.Connect the the database and verify details:
SQL> select name,open_mode from gv$database;
SQL> select file_name from dba_data_files;