ORACLE RAC環境下刪除節點
環境配置:
OS版本:Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)
DB版本:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
由於節點rac2的磁碟損壞了,RAC叢集資料庫也就成了單例項的資料庫,我決定刪除損壞的節點,增加新的可用節點。
刪除節點
1.停掉刪除節點(rac2)的資料庫例項(HHPEN12)、ASM例項(+ASM2)和一些後臺程式服務
[oracle@rac1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....11.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....12.inst application 0/5 0/0 ONLINE OFFLINE
ora....N11.srv application 0/0 0/0 ONLINE ONLINE rac1
ora...._TAF.cs application 0/0 0/1 ONLINE ONLINE rac1
ora.HHPEN1.db application 0/0 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE OFFLINE
ora....C2.lsnr application 0/5 0/0 ONLINE OFFLINE
ora.rac2.gsd application 0/5 0/0 ONLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE OFFLINE
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac1
OS版本:Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)
DB版本:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
由於節點rac2的磁碟損壞了,RAC叢集資料庫也就成了單例項的資料庫,我決定刪除損壞的節點,增加新的可用節點。
刪除節點
1.停掉刪除節點(rac2)的資料庫例項(HHPEN12)、ASM例項(+ASM2)和一些後臺程式服務
[oracle@rac1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....11.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....12.inst application 0/5 0/0 ONLINE OFFLINE
ora....N11.srv application 0/0 0/0 ONLINE ONLINE rac1
ora...._TAF.cs application 0/0 0/1 ONLINE ONLINE rac1
ora.HHPEN1.db application 0/0 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE OFFLINE
ora....C2.lsnr application 0/5 0/0 ONLINE OFFLINE
ora.rac2.gsd application 0/5 0/0 ONLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE OFFLINE
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac1
2.修改spfile檔案相關引數
[oracle@rac1 ~]export ORACLE_SID=HHPEN11
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Sep 25 14:25:03 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +RAC_GROUP/hhpen1/spfilehhpen1 .ora
[oracle@rac1 ~]export ORACLE_SID=HHPEN11
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Sep 25 14:25:03 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +RAC_GROUP/hhpen1/spfilehhpen1 .ora
SQL> col name for a35;
SQL> col value for a35;
SQL> select name,value from v$spparameter where sid='HHPEN12';
NAME VALUE
----------------------------------- -----------------------------------
log_archive_dest_1 location=/u01/app/rac2_arch
log_archive_dest_2 service=HHPEN11
thread 2
instance_number 2
undo_tablespace UNDOTBS2
SQL> col value for a35;
SQL> select name,value from v$spparameter where sid='HHPEN12';
NAME VALUE
----------------------------------- -----------------------------------
log_archive_dest_1 location=/u01/app/rac2_arch
log_archive_dest_2 service=HHPEN11
thread 2
instance_number 2
undo_tablespace UNDOTBS2
SQL> alter system reset thread scope=spfile sid='HHPEN12';
System altered.
SQL> alter system reset instance_number scope=spfile sid='HHPEN12';
System altered.
SQL> alter system reset undo_tablespace scope=spfile sid='HHPEN12';
System altered.
System altered.
SQL> alter system reset instance_number scope=spfile sid='HHPEN12';
System altered.
SQL> alter system reset undo_tablespace scope=spfile sid='HHPEN12';
System altered.
SQL> select sid,name,value from v$spparameter where name='cluster_database_instances';
SID NAME VALUE
--------------- ----------------------------------- ----------
* cluster_database_instances 2
SID NAME VALUE
--------------- ----------------------------------- ----------
* cluster_database_instances 2
3.刪除目標節點(rac2)的監聽服務
可以透過netca 刪除目標節點中的監聽服務,在rac1上執行netca,刪除監聽
4.刪除目標節點(rac2)資料庫軟體
在保留的任意一個結點上執行操作,更新Oracle Inventory,例如,在rac1上執行
5.刪除ONS配置
在任意保留節點(此處也就剩下節點rac1)中執行racgons 命令,刪除ONS 配置,操作如下:
批註:要查詢目標節點的ONS 埠號,可以透過下列命令
[oracle@rac1 ~]$ more /u01/app/oracle/crs/opmn/conf/ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
可以透過netca 刪除目標節點中的監聽服務,在rac1上執行netca,刪除監聽
4.刪除目標節點(rac2)資料庫軟體
在保留的任意一個結點上執行操作,更新Oracle Inventory,例如,在rac1上執行
5.刪除ONS配置
在任意保留節點(此處也就剩下節點rac1)中執行racgons 命令,刪除ONS 配置,操作如下:
批註:要查詢目標節點的ONS 埠號,可以透過下列命令
[oracle@rac1 ~]$ more /u01/app/oracle/crs/opmn/conf/ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
6.刪除NODEAPPS
目標節點中包括GSD、ONS、VIP 等應用此時已經可以被刪除了,刪除這些應用可以透過srvctl 命令,注意要以root 身份執行,操作如下:
[oracle@rac1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....11.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....12.inst application 0/5 0/0 ONLINE OFFLINE
ora....N11.srv application 0/0 0/0 OFFLINE OFFLINE
ora...._TAF.cs application 0/0 0/1 OFFLINE OFFLINE
ora.HHPEN1.db application 0/0 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE OFFLINE
ora.rac2.gsd application 0/5 0/0 ONLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE OFFLINE
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac1
[oracle@rac1 ~]$ crs_stop -f ora.rac2.vip
Attempting to stop `ora.rac2.vip` on member `rac1`
Stop of `ora.rac2.vip` on member `rac1` succeeded.
7.刪除目標節點clusterware軟體
接下來要做的是刪除目標節點上的clusterware 軟體,本步操作與刪除資料庫軟體類似,首先仍是在任意保留的節點中操作,在rac1上執行:
8.從OCR中刪除目標節點資訊
在任意一臺保留的節點執行,在rac1上執行:
[oracle@rac1 ~]$ cd $CRS_HOME/bin
[oracle@rac1 bin]$ olsnodes -n -i
rac1 1 rac1-vip
rac2 2
目標節點中包括GSD、ONS、VIP 等應用此時已經可以被刪除了,刪除這些應用可以透過srvctl 命令,注意要以root 身份執行,操作如下:
[oracle@rac1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....11.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....12.inst application 0/5 0/0 ONLINE OFFLINE
ora....N11.srv application 0/0 0/0 OFFLINE OFFLINE
ora...._TAF.cs application 0/0 0/1 OFFLINE OFFLINE
ora.HHPEN1.db application 0/0 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE OFFLINE
ora.rac2.gsd application 0/5 0/0 ONLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE OFFLINE
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac1
[oracle@rac1 ~]$ crs_stop -f ora.rac2.vip
Attempting to stop `ora.rac2.vip` on member `rac1`
Stop of `ora.rac2.vip` on member `rac1` succeeded.
7.刪除目標節點clusterware軟體
接下來要做的是刪除目標節點上的clusterware 軟體,本步操作與刪除資料庫軟體類似,首先仍是在任意保留的節點中操作,在rac1上執行:
8.從OCR中刪除目標節點資訊
在任意一臺保留的節點執行,在rac1上執行:
[oracle@rac1 ~]$ cd $CRS_HOME/bin
[oracle@rac1 bin]$ olsnodes -n -i
rac1 1 rac1-vip
rac2 2
儘管透過前面的操作,ORACLE 軟體以及叢集件均已被刪除,節點資訊也更新過了,不過OCR 中還是保留有rac2節點的資訊,因此這塊也需要刪除,執行
指令碼如下:
[oracle@rac1 ~]$ olsnodes -n -i
rac1 1 rac1-vip
指令碼如下:
[oracle@rac1 ~]$ olsnodes -n -i
rac1 1 rac1-vip
9.刪除目標節點資料庫例項和ASM例項
[oracle@rac1 ~]$ srvctl status database -d HHPEN1
Instance HHPEN11 is running on node rac1
Instance HHPEN12 is not running on node rac2
[oracle@rac1 ~]$ srvctl remove instance -d HHPEN1 -i HHPEN12
Remove instance HHPEN12 from the database HHPEN1? (y/[n]) y
[oracle@rac1 ~]$ srvctl status database -d HHPEN1
Instance HHPEN11 is running on node rac1
Instance HHPEN12 is not running on node rac2
[oracle@rac1 ~]$ srvctl remove instance -d HHPEN1 -i HHPEN12
Remove instance HHPEN12 from the database HHPEN1? (y/[n]) y
[oracle@rac1 ~]$ crs_stop -f ora.rac2.ASM2.asm
Target set to OFFLINE for `ora.rac2.ASM2.asm`
Target set to OFFLINE for `ora.rac2.ASM2.asm`
[oracle@rac1 ~]$ srvctl remove asm -n rac2
PRKC-1056 : Failed to get the hostname for node rac2 --由於另一個系統我已經清除,所以此處找不到目標主機
PRKH-1001 : HASContext Internal Error
[OCR Error(Native: getHostName:[21])]
[oracle@rac1 ~]$ crs_unregister ora.rac2.ASM2.asm --使用crs_unregister登出掉該資源
PRKC-1056 : Failed to get the hostname for node rac2 --由於另一個系統我已經清除,所以此處找不到目標主機
PRKH-1001 : HASContext Internal Error
[OCR Error(Native: getHostName:[21])]
[oracle@rac1 ~]$ crs_unregister ora.rac2.ASM2.asm --使用crs_unregister登出掉該資源
批註:至此節點rac2刪除完成。
新增節點可以參考我之前總結的這篇文章:http://blog.itpub.net/29634949/viewspace-1163338/
新增節點可以參考我之前總結的這篇文章:http://blog.itpub.net/29634949/viewspace-1163338/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29634949/viewspace-1280640/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux下rac環境下刪除節點Linux
- 虛擬機器環境下RAC刪除節點(Final)虛擬機
- Oracle10203RAC環境刪除節點(三)Oracle
- Oracle10203RAC環境刪除節點(二)Oracle
- Oracle10203RAC環境刪除節點(一)Oracle
- Oracle Rac 刪除節點Oracle
- [zt]ORACLE 10gR2 RAC環境增加及刪除節點Oracle 10g
- 【Oracle】 RAC 環境刪除oracle 之二Oracle
- 【Oracle】 RAC 環境刪除oracle 之一Oracle
- ORACLE 10gR2 RAC環境增加及刪除節點-(1)初始化第3臺節點Oracle 10g
- oracle11g r2 rac環境刪除節點步驟(靜默方式)Oracle
- oracle11g_RAC新增刪除節點Oracle
- Oracle 10g RAC刪除、增加節點Oracle 10g
- 【RAC】刪除RAC資料庫節點(六)——刪除Oracle叢集服務資料庫Oracle
- 【RAC】刪除RAC資料庫節點(七)——刪除Oracle叢集軟體資料庫Oracle
- 刪除oracle10g rac(rhel4)節點_節點Oracle
- 【RAC】刪除RAC資料庫節點(二)——刪除ASM資料庫ASM
- 【RAC】刪除RAC資料庫節點(五)——刪除ONS資料庫
- Solaris下修改RAC環境節點IP地址
- Oracle10g RAC 刪除及加入節點Oracle
- oracle 10g rac,刪除故障節點並新增新節點Oracle 10g
- oracle 10g rac 新增節點與刪除節點步驟Oracle 10g
- 【RAC】刪除RAC資料庫節點(三)——刪除監聽資料庫
- 【RAC】Oracle10g rac新增刪除節點命令參考Oracle
- 【RAC】Oracle11g RAC刪除節點相關事項Oracle
- 虛擬機器環境下RAC加入節點虛擬機
- ORACLE RAC環境下節點自動重啟問題總結Oracle
- Oracle RAC 10g叢集節點刪除[zt]Oracle
- Oracle10g RAC 刪除及加入節點 - updatedOracle
- (轉)windows環境下rac節點時間同步方法Windows
- 刪除Linux非rac環境下的ASM例項LinuxASM
- 官方文件學習:RAC刪除節點
- Oracle10g RAC 刪除節點步驟及原理Oracle
- Oracle10g RAC 刪除已經失效的節點Oracle
- oracle11gr2_rac_刪除節點最佳實踐Oracle
- Windows環境下刪除MySQLWindowsMySql
- 【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項資料庫
- ORACLE RAC環境下某節點的+ASM註冊到CRS資源中OracleASM