Removing a NODE from RAC
- Delete the instance on the node to be removed
- Clean up ASM
- Remove the listener from the node to be removed
- Remove the node from the database
- Remove the node from the clusterware
You can delete the instance by using the database creation assistant (DBCA), invoke the
program choose the RAC database, choose instance management and then choose
delete instance, enter the sysdba user and password then choose the instance to delete.
To clean up ASM follow the below steps
- From node 1 run the below command to stop ASM on the node to be removed
srvctl stop asm -n rac3
srvctl remove asm -n rac3 - Now run the following on the node to be removed
cd $ORACLE_HOME/admin
rm -rf +ASM
cd $ORACLE_HOME/dbs
rm -f *ASM* - Check that /etc/oratab file has no ASM entries, if so remove them
Now remove the listener for the node to be removed
· Login as user oracle, and set your DISPLAY environment variable, then start the Network
Configuration Assistant
$ORACLE_HOME/bin/netca
$ORACLE_HOME/bin/netca
· Choose cluster management
· Choose listener
· Choose Remove
· Choose the name as LISTENER
Next we remove the node from the database
- Run the below script from the node to be removed
cd $ORACLE_HOME/bin
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={rac3}" -local
./runInstaller - Choose to deinstall products and select the dbhome
- Run the following from node 1
cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={rac1,rac2,rac3}"
Lastly we remove the clusterware software
- Run the following from node 1, you obtain the port number from remoteport section in the ons.config file in $ORA_CRS_HOME/opmn/conf
- $CRS_HOME/bin/racgons remove_config rac3:6200
- Run the following from the node to be removed as user root
cd $CRS_HOME/install
./rootdelete.sh - Now run the following from node 1 as user root, obtain the node number first
$CRS_HOME/bin/olsnodes -n
cd $CRS_HOME/install
./rootdeletenode.sh rac3,3 - Now run the below from the node to be removed as user oracle
cd $CRS_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={rac3}" CRS=TRUE -local
./runInstaller - Choose to deinstall software and remove the CRS_HOME
- Run the following from node as user oracle
cd $CRS_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={rac1,rac2,rac3}" CRS=TRUE - Check that the node has been removed, the first should report "invalid node", the second you should not see any output and the last command you should only see nodes rac1 and rac2
srvctl status nodeapps -n rac3
crs_stat |grep -i rac3
olsnodes -n