How to remove SUP node manually from the Cluster (SUP 2.x)
This document explains how to remove an SUP node manually from the cluster data tier database manually if the uninstall is not possible.
- SUP 2.x
- SUP configured in a cluster environement.
- At least 2 SUP nodes or more.
It is possible for someone to experience a problem where the OS crashed and the user cannot get to the machine anymore. Therefore, the SUP node host machine is not available anymore, but there is an entry for it in the SUP cluster database. This document explains the steps needed to follow to remove this particular node from the cluster. In this example, we are considering an environment running two SUP nodes in a cluster environment. Our task is to remove SUP node from the cluster it is called "sup02".
- Before we do anything, make sure you do a backup of the cluster database before doing any modification to it.
- Here is the current environment:
- We do not have access to he machine where sup02 node is installed because the machine is not available.
- Now all we need to do is remove this node manually from the cluster database by connecting directly to the cluster CDB database.
- To connect to the cluster database manually follow the following steps:
- From a working SUP node, invoke dbisql located in default path ( i.e C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN32)
- Enter user id: dba
- Password: sql
- ODBC Data Source: clusterdb_<clustername>
- You should have the following screen
- Click Connect.
- Now we need to figure out what is the installation ID for the SUP node we want to remove. In this example, the SUP node we are going to remove is "sup02". So we need to find the installation ID.
- Issue this query:
SELECT * FROM CLUSTER_INSTALLATION
- We should see something similar to this screen below:
- The installation ID that we are interested in is "2"
- Now we need to delete any reference to this node from the 3 tables. MEMBER_PROP, CLUSTER_MEMBER, and CLUSTER INSTALLATION.
- To do that, first issue this query:
DELETE FROM MEMBER_PROP WHERE MEMBERID IN (SELECT MEMBERID FROM CLUSTER_MEMBER WHERE INSTALLID = 2)
- Then issue this Query:
DELETE FROM CLUSTER_MEMBER WHERE INSTALLID=2
- Lastly issue this Query:
DELETE FROM CLUSTER_INSTALLATION WHERE INSTALLID=2
- Now if we issue "SELECT * FROM CLUSTER_INSTALLATION", we should see something similar to this screen:
- Now if we go to SCC, we should not see any reference to the node we have just removed
- Right now my cluster is running with one node.
If for some reason a mistake is made in dbisql and you did not issue a COMMIT nor the dbisql session is closed, then you can issue a ROLLBACK call to revert all the changes.
In summary, in order to totally remove a node from the cluster if uinstall is not possible, a connection to the cluster database must be made in order to remove the node manually using dbisql.