Oracle Rac 11R2删除节点

简介: 详解如何从Oracle Rac 11R2中删除一个节点
   在将一个节点从cluster删除之前,先删除节点数据库实例及Oracle RAC软件
   在Oracle RAC环境中删除集群中的节点:
AI 代码解读

1、删除数据库实例从Oracle RAC databases
1.1、如果有安装配置EM,在您计划删除的节点上,运行以下命令,从EM配置中删除
emca -deleteNode db
要删除策略管理的数据库,减少数据库实例所在的服务器池的大小。这样可以有效地删除实例,而不必从节点或集群中的节点删除Oracle RAC软件
例如,您可以通过在集群中的任何节点上运行以下命令来删除策略管理的数据库:
srvctlstopinstanceddbuniquenamennodename srvctl relocate server -n node_name -g Free

1.2、从管理员管理的数据库中删除实例,在删除Oracle RAC数据库中的实例之前,请使用srvctl执行如下操作:如果您配置了服务,请将相关服务relocate到其他节点。

要从Oracle RAC数据库中删除实例,使用dbca或使用静默模式,如下操作使用dbca

使用DBCA操作步骤(摘自Oracle官方文档),比较详细:
1.2.1、Verify there is a current backup of the OCR.

Run the ocrconfig -showbackup command to ensure there is a valid backup.

1.2.2、Start DBCA.

Start DBCA on a node other than the node that hosts the instance that you want to delete. The database and the instance that you plan to delete should continue to be started and running during this step.

1.2.3、On the DBCA Welcome page select Oracle Real Application Clusters Database, click Next. DBCA displays the Operations page.

1.2.4、On the DBCA Operations page, select Instance Management and click Next. DBCA displays the Instance Management page.

1.2.5、On the DBCA Instance Management page, select the instance to be deleted, select Delete Instance, and click Next.

1.2.6、On the List of Cluster Databases page, select the Oracle RAC database from which to delete the instance, as follows:

On the List of Cluster Database Instances page, DBCA displays the instances that are associated with the Oracle RAC database that you selected and the status of each instance. Select the cluster database from which you will delete the instance.

Enter a user name and password for the database user that has SYSDBA privileges. Click Next.

Click OK on the Confirmation dialog to proceed to delete the instance.

DBCA displays a progress dialog showing that DBCA is deleting the instance. During this operation, DBCA removes the instance and the instance's Oracle Net configuration. When DBCA completes this operation, DBCA displays a dialog asking whether you want to perform another operation.

Click No and exit DBCA or click Yes to perform another operation. If you click Yes, then DBCA displays the Operations page.

1.2.7、Verify that the dropped instance's redo thread has been removed by querying the V$LOG view. If the redo thread is not disabled, then disable the thread. For example:

SQL> ALTER DATABASE DISABLE THREAD 2;
1.2.8、Verify that the instance has been removed from the OCR by running the following command:

srvctl config database -d db_unique_name
1.2.9、If you are deleting more than one node, then repeat these steps to delete the instances from all the nodes that you are going to delete.

2、从Oracle Rac中删除预先要删除的节点及更新inventories 在其他节点

2.1、如果在您正在删除的节点上的Oracle RAC有一个监听,那么您必须disable并在删除Oracle RAC软件之前停止它。在集群中的任何节点上运行以下命令,指定监听的名称和正在删除的节点的名称
srvctldisablelistenerllistenernamennameofnodetodelete srvctl stop listener -l listener_name -n name_of_node_to_delete

2.2、在你正在删除的节点上运行以下命令从ORACLEHOME/oui/bin ./runInstaller -updateNodeList ORACLE_HOME=/u01/oracle/app/product/db_1 "CLUSTER_NODES={rc1}" -local

2.3、对于非共享目录,通过从ORACLEHOME/deinstallOraclehome ./deinstall -local

2.4、更新其他的节点的inventory,在集群的其节点上 $ORACLE_HOME/deinstall目录下执行
./runInstaller -updateNodeList ORACLE_HOME=/u01/oracle/app/product/db_1 "CLUSTER_NODES={rc2}"

3、.卸载节点的clusterware软件,确保所有节点的GRIDHOME3.1pinedrootgrid olsnodes -s –t
如果节点是pined状态,请执行以下命令(root用户执行),如果节点状态是unpinned,你不需要运行crsctl unpin css

crsctl unpin css -n rc1

3.2、在要删除节点的目录Grid_home/crs/install下以root用户运行执行

./rootcrs.pl -deconfig -force

3.3、在保留节点的目录 Grid_home/bin下以root用户运行执行

crsctl delete node -n rc1

3.4、在删除节点节点的目录Grid_home/oui/bin下以grid运行执行
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/product "CLUSTER_NODES={rc1}" CRS=TRUE -silent -local

3.5、对于非共享目录,在删除节点执行的目录下Grid_home/deinstall/的deinstall脚本删除cluster软件

$ Grid_home/deinstall/deinstall –local
执行过程会提示执行如下:
The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on the local node after the execution completes on all the remote nodes.

Run the following command as the root user or the administrator on node "rc1".

/tmp/deinstall2017-09-21_10-39-57AM/perl/bin/perl -I/tmp/deinstall2017-09-21_10-39-57AM/perl/lib -I/tmp/deinstall2017-09-21_10-39-57AM/crs/install /tmp/deinstall2017-09-21_10-39-57AM/crs/install/rootcrs.pl -force -deconfig -paramfile "/tmp/deinstall2017-09-21_10-39-57AM/response/deinstall_Ora11g_gridinfrahome1.rsp"

Press Enter after you finish running the above commands

3.6在保留节点的 Grid_home/oui/bin 目录下执行runInstaller更新inventory

$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/product "CLUSTER_NODES={rc2}" CRS=TRUE -silent

3.7、在保留节点上执行验证节点是否删除成功

$ cluvfy stage -post nodedel -n rc1 -verbose

最后提示:Post-check for node removal was successful.

目录
打赏
0
0
0
0
2
分享
相关文章
Oracle 11g RAC集群日常运维命令总结
Oracle 11g RAC集群日常运维命令总结
177 2
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
117 0
【Oracle】使用Navicat Premium连接Oracle数据库两种方法
以上就是两种使用Navicat Premium连接Oracle数据库的方法介绍,希望对你有所帮助!
114 28
【赵渝强老师】Oracle的闪回数据库
Oracle闪回数据库功能类似于“倒带按钮”,可快速将数据库恢复至 earlier 状态,无需还原备份。本文介绍了闪回数据库的使用方法及实战案例:包括设置归档模式、开启闪回功能、记录SCN号、执行误操作后的恢复步骤等。通过具体 SQL 操作演示了如何利用闪回数据库恢复被误删的用户数据。注意,使用此功能前需确保数据库为归档模式。
【赵渝强老师】Oracle数据库的闪回表
本文介绍了Oracle数据库中的闪回表(Flashback Table)功能,它能够将表的数据快速恢复到特定时间点或系统改变号(SCN),无需备份。文章通过实战示例详细演示了如何使用闪回表恢复数据,包括授权、创建测试表、记录时间与SCN号、删除数据、启用行移动功能、执行闪回操作以及验证恢复结果等步骤。同时,还展示了如何通过触发器禁止插入操作,并在闪回过程中处理触发器的启用问题。文末附有视频讲解,帮助读者更好地理解闪回表的使用方法。
65 10
【赵渝强老师】Oracle数据库的闪回查询
本文介绍了Oracle数据库的闪回查询(Flashback Query)功能及其实际应用。闪回查询通过`AS OF`子句,结合时间戳或SCN号,可查询历史数据状态,帮助分析数据差异。文中通过具体示例演示了如何使用闪回查询:创建测试表、记录当前SCN号、更新数据并提交事务,最后通过闪回查询获取历史数据。附带的视频和代码块详细展示了操作步骤与结果。
崖山异构数据库迁移利器YMP初体验-Oracle迁移YashanDB
文章是作者小草对崖山异构数据库迁移利器 YMP 的初体验分享,包括背景、YMP 简介、体验环境说明、YMP 部署(含安装前准备、安装、卸载、启动与停止)、数据迁移及遇到的问题与解决过程。重点介绍了 YMP 功能、部署的诸多细节和数据迁移流程,还提到了安装和迁移中遇到的问题及解决办法。

推荐镜像

更多
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等