在我们的生产环境中,RAC 集群可能由于某些原因导致某个节点不可用。当出现这种情况时,我们通常需要将该节点重新添加回集群。然而,如果节点的相关信息没有彻底清理干净,重新添加节点的操作可能会失败。因此,在执行添加节点的操作之前,必须确保完全清理掉旧节点的所有残留信息,包括节点在集群中的资源、网络配置和数据库实例等。
在清理的过程中,可能需要检查节点的状态、清除相关的集群资源,并确保所有服务和配置都已正确移除。只有在确认节点信息清理干净之后,才能顺利重新添加新的节点,保证集群的正常运行。
参考文档:
How to remove/delete a node from Grid Infrastructure Clusterware when the node has failed (文档 ID 1262925.1)
删除数据库实例:
可以使用dbca图形界面删除
也可以使用dbca静默方式删除rac1中的数据库实例:
[oracle@rac2 bin]$ dbca -silent -deleteInstance -nodeList rac1 -gdbName orcl -instanceName orcl1 -sysDBAUserName sys -sysDBAPassword oracle
Deleting instance
1% complete
2% complete
6% complete
13% complete
20% complete
26% complete
33% complete
40% complete
46% complete
53% complete
60% complete
66% complete
Completing instance management.
100% complete
更新RAC节点信息:
[oracle@rac2 bin]$ echo $ORACLE_HOME
/oracle/app/oracle/product/11.2.0/db_1/oui/bin/
[oracle@hisrac02 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/oracle/app/oracle/product/11.2.0/db_1 "CLUSTER_NODES=hisrac02"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 62924 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oraInventory
查看集群节点信息:
[root@hisrac02 bin]# ./crsctl stat res -t |grep vip
ora.hisrac02.vip
ora.scan1.vip
删除rac1节点的vip:
[root@hisrac02 bin]# ./srvctl remove vip -i rac1 -f
查看集群节点信息:
[root@hisrac02 bin]# ./olsnodes -s -t
hisrac01 Inactive Unpinned
hisrac02 Active Unpinned
从集群中删除节点1:
[root@hisrac2 bin]# ./crsctl delete node -n hisrac01
CRS-4661: Node rac1 successfully deleted.
更新集群节点信息:
[grid@hisrac02 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/oracle/app/oracle/product/11.2.0/db_1 "CLUSTER_NODES=hisrac02"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 62929 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oraInventory
'UpdateNodeList' was successful.
检查确认仅剩余hisrac02节点:
[grid@hisrac02 bin]$ olsnodes
hisrac02
至此,从集群中清理hisrac01信息完毕。





