Managing clusters in Oracle RAC (Real Application Clusters) is a critical skill for any Oracle DBA.
Whether you’re scaling your environment or cleaning up unused clusters, here’s a quick guide on how to add and delete clusters in RAC. 🚀
🛠 Steps to Add a Cluster in RAC:
1️⃣ Prepare the New Node:
Install the necessary OS packages.
Configure shared storage access and networking (private/public/SCAN).
2️⃣ Add the Node to the Cluster:
Run the following command from an existing cluster node:
$GRID_HOME/addNode/addNode.sh -silent “CLUSTER_NEW_NODES={new_node}”
3️⃣ Add ASM and Database Homes:
Extend the Oracle ASM and database homes to the new node:
$ORACLE_HOME/addNode/addNode.sh
4️⃣ Verify the Cluster Configuration:
Check that the new node has joined the cluster:
crsctl stat res -t
5️⃣ Update Inventory and Final Checks:
Run root.sh and rootupgrade.sh on the new node:
$GRID_HOME/root.sh
$ORACLE_HOME/root.sh
🔥 Steps to Delete a Cluster in RAC:
1️⃣ Relocate or Stop Services:
Relocate active services to other nodes:
srvctl relocate service -db <db_name> -service <service_name> -node <target_node>
2️⃣ Remove the Node from the Cluster:
From an existing cluster node, run:
$GRID_HOME/crs/install/rootcrs.pl -deconfig -force
3️⃣ Clean the Node:
Run cleanup scripts to remove clusterware traces:
$GRID_HOME/root.sh -deconfig -force
4️⃣ Update the Cluster Configuration:
Update the cluster configuration to remove the node:
cluvfy comp -nodelist <node_name> -fix
5️⃣ Final Verification:
Ensure the cluster is stable and functional:
crsctl stat res -t