- Renaming a RAC cluster - 27/09/2018
- Stop/Start all RAC databases at once - 26/09/2018
- RMAN Backup script - 08/11/2017
Renaming an Oracle RAC cluster is not an easy thing, unfortunately for me I had to do this today because the name chosen for the newly installed cluster was wrong.
Oracle does not provide a simple command to do this and you have to go through a deconfiguration/reconfiguration of the whole cluster.
Changing the cluster name
Deconfigure RAC (root user)
On each node except the last one as user root:
<GRID_HOME>/crs/install/rootcrs.pl -deconfig -force -verbose
On the last node as root:
<GRID_HOME>/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode
Cleanup the ASM disks (grid user)
You need to cleanup the ASM disks used for the OCR diskgroup because the diskgroup cannot be reused.
dd if=/dev/zero of=/dev/rhdisk2asm bs=1024k count=50 dd if=/dev/zero of=/dev/rhdisk3asm bs=1024k count=50 dd if=/dev/zero of=/dev/rhdisk4asm bs=1024k count=50
Reconfigure RAC (grid user)
To reconfigure the cluster you just restart the setup of the grid installation, either config.sh for 11g or gridSetup.sh for 12c. I used the responsefile from my first installation and just edited the response file to change my cluster name.
<GRID_HOME>/crs/config/gridSetup.sh -silent -responsfile /home/oracle/grid.rsp -silent -responsfile /home/oracle/grid.rsp
Execute root.sh scripts once installation completes as instructed by the installer.
Check if the change is effective
if you already had created a database on the cluster before changing its name, here are the additionnal steps you need to perform.
Mount the ASM diskgroups
SQL> alter diskgroup FRA mount; Diskgroup altered. SQL> alter diskgroup DATA12 mount; Diskgroup altered.
Add back the database to the cluster
srvctl add database -db MYBD -oraclehome /opt/oracle/base/bd/188.8.131.52/ -dbtype RAC -spfile +DATA12/MYBD/PARAMETERFILE/spfile.275.987328111 -pwfile +DATA12/MYBD/PASSWORD/pwdmybd.256.987327363
Add instances to the database
srvctl add instance -db MYBD -i INST1 -n node1 srvctl add instance -db MYBD -i INST2 -n node2 srvctl add instance -db MYBD -i INST3 -n node3
Start the database
srvctl start database -db MYBD
Reference: Doc ID 1967916.1
1 thought on “Renaming a RAC cluster”
What a funny idea to rename a RAC. Like always, thank you for this very original procedure.