Oracle Rac 11R2删除节点

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

1、删除数据库实例从Oracle RAC databases
1.1、如果有安装配置EM,在您计划删除的节点上,运行以下命令,从EM配置中删除
emca -deleteNode db
要删除策略管理的数据库,减少数据库实例所在的服务器池的大小。这样可以有效地删除实例,而不必从节点或集群中的节点删除Oracle RAC软件
例如,您可以通过在集群中的任何节点上运行以下命令来删除策略管理的数据库:
$ srvctl stop instance -d db_unique_name -n node_name
$ 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软件之前停止它。在集群中的任何节点上运行以下命令,指定监听的名称和正在删除的节点的名称
$ srvctl disable listener -l listener_name -n name_of_node_to_delete
$ srvctl stop listener -l listener_name -n name_of_node_to_delete

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

2.3、对于非共享目录,通过从$ ORACLE_HOME / deinstall目录运行以下命令,从正在删除的节点上删除Oracle home
$ ./deinstall -local

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

3、.卸载节点的clusterware软件,确保所有节点的$GRID_HOME环境变量配置正确,
3.1、查看删除节点是否为pined状态(root用户或者grid用户查看)
$ 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.

目录
相关文章
|
28天前
|
运维 Oracle 前端开发
Oracle 11g RAC集群日常运维命令总结
Oracle 11g RAC集群日常运维命令总结
50 2
|
1月前
|
Oracle 关系型数据库
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
|
2月前
|
存储 负载均衡 Oracle
|
Oracle 关系型数据库 数据库管理
|
2月前
|
存储 Oracle 关系型数据库
|
4月前
|
存储 Oracle 关系型数据库
Oracle RAC:数据库集群的舞动乐章
【4月更文挑战第19天】Oracle RAC是Oracle提供的高可用性数据库解决方案,允许多个实例共享同一数据库,确保业务连续性和数据完整性。通过集群件和全局缓存服务实现服务器间的协调和通信。RAC提供高可用性,通过故障转移应对故障,同时提升性能,多个实例并行处理请求。作为数据管理员,理解RAC的架构和管理至关重要,以发挥其在数据管理中的最大价值。
|
4月前
|
存储 运维 Oracle
Oracle系列十八:Oracle RAC
Oracle系列十八:Oracle RAC
|
4月前
|
Oracle 关系型数据库
oracle rac 手工安装补丁,不适用auto
oracle rac 手工安装补丁,不适用auto
60 3
|
4月前
|
Oracle 关系型数据库
oracle Hanganalyze no RAC
oracle Hanganalyze no RAC
35 0