RAC 雙節點 轉單節點流程

531968912發表於2016-09-19
1 節點2
使用dbca刪除一個節點




2 節點1
alter database disable thread 2;




3 節點1
驗證是否已經刪除一個節點資料庫
[03:49:06 oracle(db)@rac1 ~]$ srvctl config database -d vposrac
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0.3/db
Oracle user: oracle
Spfile: +DATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod1
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed




4 節點1
停止節點2的監聽
srvctl disable listener -l LISTENER -n vposrac2-s1;
srvctl stop listener -l LISTENER -n vposrac2-s1;




5 節點2
更新節點資訊
/u01/app/oracle/product/11.2.0.3/db/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db "CLUSTER_NODES={vposrac2-s1}" -local




6 節點2
刪除節點2的ORACLE軟體
/u01/app/oracle/product/11.2.0.3/db/deinstall/deinstall -local




7 節點1
更新剩餘節點的資訊
/u01/app/oracle/product/11.2.0.3/db/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db "CLUSTER_NODES={vposrac1-s1}"




刪除oracle軟體已經完成
下面來刪除grid軟體
8 節點1
檢視ons的資源情況
[10:19:57 oracle@vposrac1-s1 ~]$ olsnodes -s -t
vposrac1-s1     Active  Unpinned
vposrac2-s1     Active  Unpinned




9 節點2
以root使用者執行rootcrs.pl 指令碼清楚grid的配置資訊
/u01/app/11.2.0.3/grid/crs/install/rootcrs.pl -deconfig -deinstall -force




10 節點1
再次確認ons的資源情況
[10:21:04 oracle@vposrac1-s1 ~]$ olsnodes -s -t
vposrac1-s1     Active  Unpinned
vposrac2-s1     Inactive        Unpinned




11 節點1
root使用者執行
刪除另外一個節點的資訊
 crsctl delete node -n vposrac2-s1




olsnodes -s -t
rac1 Active Unpinned




12 節點2
oracle使用者執行
/u01/app/11.2.0.3/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0.3/grid/ "CLUSTER_NODES=vposrac2-s1" CRS=TRUE -silent -local




13 節點2
解除安裝grid軟體
oracle使用者執行
/u01/app/11.2.0.3/grid/deinstall/deinstall -local
root 使用者下執行
rm -rf /etc/oraInst.loc
rm -rf /opt/ORCLfmap
rm -rf /etc/oratab




14 節點1
更新剩餘節點的資訊
oracle使用者執行:
/u01/app/11.2.0.3/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0.3/grid/ "CLUSTER_NODES=rac1" CRS=TRUE -silent








15 節點1
檢查是否已經刪除
[04:24:28 oracle(db)@rac1 ~]$ cluvfy stage -post nodedel -n rac2 -verbose




Performing post-checks for node removal




Checking CRS integrity...




Clusterware version consistency passed
The Oracle Clusterware is healthy on node "rac1"




CRS integrity check passed
Result:
Node removal check passed




Post-check for node removal was successful.




可以看到節點刪除成功

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25462274/viewspace-2125133/,如需轉載,請註明出處,否則將追究法律責任。

相關文章