基於Admin-managed刪除節點
第一步:檢視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
[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- networkx基礎用法:新增節點、新增邊、刪除節點、刪除邊、計算度、賦權重
- JavaScript刪除節點自身JavaScript
- Oracle Rac 刪除節點Oracle
- jQuery如何刪除元素節點jQuery
- onnx 增刪改查,修改節點,刪除節點,修改input,output
- 【RAC】刪除RAC資料庫節點(二)——刪除ASM資料庫ASM
- 【RAC】刪除RAC資料庫節點(五)——刪除ONS資料庫
- redis cluster節點/新增刪除操作Redis
- mongodb副本集新增刪除節點MongoDB
- Hadoop增加和刪除節點Hadoop
- 【RAC】刪除RAC資料庫節點(三)——刪除監聽資料庫
- 刪除oracle10g rac(rhel4)節點_節點Oracle
- js中dom節點刪除remove方法JSREM
- 利用jQuery如何刪除一個節點jQuery
- javascript刪除元素節點removeChild()函式JavaScriptREM函式
- ORACLE RAC環境下刪除節點Oracle
- 官方文件學習:RAC刪除節點
- 【Mongodb】 replica set 新增和刪除節點。MongoDB
- JZ18刪除表的節點
- oracle 10g rac,刪除故障節點並新增新節點Oracle 10g
- oracle 10g rac 新增節點與刪除節點步驟Oracle 10g
- oracle11g_RAC新增刪除節點Oracle
- 原生js刪除節點程式碼例項JS
- JavaScript刪除元素節點程式碼例項JavaScript
- Oracle 10g RAC刪除、增加節點Oracle 10g
- 【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項資料庫
- 【RAC】刪除RAC資料庫節點(六)——刪除Oracle叢集服務資料庫Oracle
- 【RAC】刪除RAC資料庫節點(七)——刪除Oracle叢集軟體資料庫Oracle
- 工作293:調節刪除順序刪除
- Hyperledger Fabric節點的動態新增和刪除
- 原生javascript如何刪除一個元素節點物件JavaScript物件
- DOM節點刪除之empty和remove區別REM
- 新增和刪除hadoop叢集中的節點Hadoop
- linux下rac環境下刪除節點Linux
- Oracle10g RAC 刪除及加入節點Oracle
- [Kubernetes]node節點pod無法啟動/節點刪除網路重置
- 11G R2 RAC新增刪除節點
- Oracle RAC 10g叢集節點刪除[zt]Oracle