ITPub博客

首页 > 数据库 > Oracle > 基于Admin-managed删除节点

基于Admin-managed删除节点

原创 Oracle 作者:zhangsharp20 时间:2016-03-25 12:08:29 0 删除 编辑
第一步:查看RAC的server pool是基于admin-managed还是基于policy-managed

[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod1,prod2
Disk Groups: ORADATA
Mount point paths: 
Services: 
Type: RAC
Database is administrator managed

第二步,删除节点上的实例

[oracle@node2 ~]$ dbca -silent -deleteInstance -nodeList node1 -gdbName prod -instanceName prod1 -sysDBAUserName sys -sysDBAPassword oracle
Deleting instance
1% complete
oracle@node1's password: 
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
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/prod.log" for further details.
查看一下RAC数据库配置信息

[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod2
Disk Groups: ORADATA
Mount point paths: 
Services: 
Type: RAC
Database is administrator managed

第三步,删除RAC软件

1、停止要删除节点的监听

[oracle@node2 ~]$ srvctl disable listener -l LISTENER -n node1
[oracle@node2 ~]$ srvctl stop listener -l LISTENER -n node1
PRCC-1017 : LISTENER was already stopped on node1
PRCR-1005 : Resource ora.LISTENER.lsnr is already stopped

2、在要删除的节点上更新inventory的信息,位置$ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=Oracle_home_location "CLUSTER_NODES={name_of_node_to_delete}" -local

3、在要删除的节点上,对于nonshared home,卸载oracle RAC

$ORACLE_HOME/deinstall/deinstall -local

4、在仍然存在的节点上更新inventory信息

[oracle@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 "CLUSTER_NODES={node2}"
Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 3999 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

第四步,删除集群节点

删除完数据实例和oracle rac软件之后,就可以开始删除节点

1、确定Grid_home是安装集群件的目录
2、运行下列命令确定要删除的节点是否是unpinned和active状态
$olsnodes -s -t
如果是Pinned状态,运行crsctl unpin css命令
3、失效要删除的节点的集群件应用和监控,在要删除节点的目录Grid_home/crs/install使用root运行下列命令
运行之前先关闭dbconsole
emctl stop dbconsole
如果使用的是11.2.0.1或者是11.2.0.2,则在运行rootcrs.pl的时候不包括-deinstall标志

#./rootcrs.pl -deconfig -deinstall -force

如果要删除多个节点,在每个要删除的节点运行上述命令

如果要删除所有节点,加上-lastnode选项,用于清除OCR和voting disks的信息
# ./rootcrs.pl -deconfig -deinstall -force -lastnode


Note: If you do not use the -force option in the preceding 
command or the node you are deleting is not accessible for you to 
execute the preceding command, then the VIP resource remains 
running on the node. You must manually stop and remove the VIP 
resource using the following commands as root from any node that 
you are not deleting:
# srvctl stop vip -i vip_name -f
# srvctl remove vip -i vip_name -f
Where vip_name is the VIP for the node to be deleted. If you specify 
multiple VIP names, then separate the names with commas and 
surround the list in double quotation marks ("").

4、从不需要删除的节点上运行以下命令,使用root,在目录Grid_home/bin

crsctl delete node -n node_to_be_deleted

5、在要删除的节点上,在Grid_home/oui/bin目录下运行下列命令

$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES={node_to_be_deleted}" CRS=TRUE -silent -local

6、对于noshared home的,删除oracle集群件的目录
$ Grid_home/deinstall/deinstall –local

Caution: If you do not specify the -local flag, then the command 
removes the Grid Infrastructure home from every node in the cluster.

7、在任何一个没有被删除的节点,在 Grid_home/oui/bin目录下运行下列命令,多个节点用逗号隔开,例如"node1,node2"

$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=
{remaining_nodes_list}" CRS=TRUE -silent

Notes:
■ You must run this command a second time where ORACLE_
HOME=ORACLE_HOME, and CRS=TRUE -silent is omitted from 
the syntax, as follows:
$ ./runInstaller -updateNodeList ORACLE_HOME=ORACLE_HOME
 "CLUSTER_NODES={remaining_nodes_list}"
■ If you have a shared Oracle Grid Infrastructure home, then 
append the -cfs option to the command example in this step and 
provide a complete path location for the cluster file system.
例如:

[grid@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0/grid/ "CLUSTER_NODES={node2}" 
Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 3962 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

8、运行CVU命令验证节点是否被删除

[grid@node2 bin]$ cluvfy stage -post nodedel -n node1





来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29802484/viewspace-2063641/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-12

  • 博文量
    382
  • 访问量
    634021