【RAC】Oracle11g RAC刪除節點相關事項

dbasdk發表於2017-06-14
RAC delete node 

操作前建議檢查相關資訊,如叢集狀態、資料庫執行情況等,最好最一個備份。

########移除資料庫########
--透過DBCA方式刪除節點(此處舉例rac03),請在rac01/02執行,如不說明,預設情況下rac03執行

點選(此處)摺疊或開啟

  1. dbca -silent -deleteInstance -nodeList rac03 -gdbName racdb -instanceName racdb3 -sysDBAUserName sys -sysDBAPassword oracle


--檢視資料庫執行情況,

點選(此處)摺疊或開啟

  1. --檢視資料庫執行情況
  2. set lines 150
  3. col instance for a30
  4. select t.inst_id,t.thread#,t.status,t.instance from gv$thread t;

  5. ALTER DATABASE DISABLE THREAD 3

---停止監聽

點選(此處)摺疊或開啟

  1. srvctl disable listener -l listener -n rac03
  2. srvctl stop listener -l listener -n rac03
--更新檢視列表

點選(此處)摺疊或開啟

  1. [oracle@rac03 ~]$ cd $ORACLE_HOME/oui/bin
  2. [oracle@rac03 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_home "CLUSTER_NODES={rac03}" -local
  3. Starting Oracle Universal Installer...

  4. Checking swap space: must be greater than 500 MB. Actual 4769 MB Passed
  5. The inventory pointer is located at /etc/oraInst.loc
  6. The inventory is located at /u01/app/oraInventory
  7. 'UpdateNodeList' was successful.
  8. [oracle@rac03 bin]$

--移除資料庫例項節點

點選(此處)摺疊或開啟

  1. ./deinstall -local
  2. …………………………

  3. Cleaning the config for CCR
  4. As CCR is not configured, so skipping the cleaning of CCR configuration
  5. CCR clean is finished
  6. Successfully detached Oracle home '/u02/app/oracle/product/11.2.0/db_home' from the central inventory on the local node.
  7. Successfully deleted directory '/u02/app/oracle/product/11.2.0/db_home' on the local node.
  8. Oracle Universal Installer cleanup was successful.

  9. Oracle deinstall tool successfully cleaned up temporary directories.
  10. #######################################################################


  11. ############# ORACLE DEINSTALL & DECONFIG TOOL END #############
--更新其他的節點的inventory  RAC01/02執行

點選(此處)摺疊或開啟

  1. ./runInstaller -updateNodeList ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_home "CLUSTER_NODES={rac1,rac2}"


###########移除 grid#################

--檢視狀態 olsnodes -s -t

--移除節點grid資源配置  root使用者

點選(此處)摺疊或開啟

  1. /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force
  2. ………………
  3. CRS-2673: Attempting to stop 'ora.cssd' on 'rac03'
  4. CRS-2677: Stop of 'ora.cssd' on 'rac03' succeeded
  5. CRS-2673: Attempting to stop 'ora.gipcd' on 'rac03'
  6. CRS-2677: Stop of 'ora.gipcd' on 'rac03' succeeded
  7. CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac03'
  8. CRS-2677: Stop of 'ora.gpnpd' on 'rac03' succeeded
  9. CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac03' has completed
  10. CRS-4133: Oracle High Availability Services has been stopped.
  11. Successfully deconfigured Oracle clusterware stack on this node

--刪除grid節點  RAC01/02執行   root使用者

點選(此處)摺疊或開啟

  1. /u01/app/11.2.0/grid/bin/crsctl delete node -n rac03

--更新刪除節點目錄資訊

點選(此處)摺疊或開啟

  1. /u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0/grid "CLUSTER_NODES={rac03}" CRS=TRUE -local

--解除安裝叢集

點選(此處)摺疊或開啟

  1. /u01/app/11.2.0/grid/deinstall/deinstall –local

-更新inventory  RAC01/02執行

點選(此處)摺疊或開啟

  1. /u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0/grid "CLUSTER_NODES={rac01,rac02}" CRS=TRUE


--驗證節點是否刪除成功   RAC01/02執行

點選(此處)摺疊或開啟

  1. [grid@rac02 ~]$ cluvfy stage -post nodedel -n rac03 -verbose

  2. Performing post-checks for node removal

  3. Checking CRS integrity...

  4. Clusterware version consistency passed
  5. The Oracle Clusterware is healthy on node "rac02"
  6. The Oracle Clusterware is healthy on node "rac01"

  7. CRS integrity check passed
  8. Result:
  9. Node removal check passed

  10. Post-check for node removal was successful.









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

相關文章