- Kiran 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
[root@install]# /u02/app/grid/product/19C/dbhome/bin/olsnodes -c
[oracle@node1 ~]$ crsctl stat res -t
[root@node2 install]# /u02/app/grid/product/19C/dbhome/crs/install/rootcrs.sh -deconfig -force -verboseIf you have more than 2 nodes, then run the same on other nodes , excluding the local node.
[root@node1 install]# /u02/app/grid/product/19C/dbhome/crs/install/rootcrs.sh -deconfig -force -verbose -lastnode
echo $ORACLE_HOME /u02/app/grid/product/19C/dbhome cd /u02/app rm -rf oracle
cd / chown oracle:oinstall u02
[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
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.
[root]# oracleasm scandisks [root ~]$ oracleasm scandisks
echo $ORACLE_SID=+ASM1 echo $ORACLE_HOME=/u02/app/grid/product/19C/dbhome [oracle@node1]$ asmcmd ASMCMD> lsdg ASMCMD > mount -a ASMCMD> lsdgWe can see the all diskgroups are intact.
[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
SQL> select name,open_mode from gv$database; SQL> select file_name from dba_data_files;