【RAC】刪除RAC資料庫節點(二)——刪除ASM
本文介紹刪除資料庫節點的第二個步驟——刪除ASM。
在進行此步刪除操作之前,請確保以下刪除動作已經完成。
《【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項》(http://space.itpub.net/519536/viewspace-676893)。
1.停止並刪除執行在第二節點上的ASM例項
以oracle使用者連線到第一個節點,使用srvctl工具停止並刪除執行在第二節點上的ASM例項,完成後確認相應的資源確實已經從Oracle叢集環境中刪除。
1)確認系統當前狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
2)停止第二節點上的ASM例項
RACDB1@rac1 /home/oracle$ srvctl stop asm -n rac2
3)確認停止第二節點上的ASM例項後的狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application OFFLINE OFFLINE
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
4)刪除第二節點上的ASM
RACDB1@rac1 /home/oracle$ srvctl remove asm -n rac2
5)刪除後的系統狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
2.刪除第二節點上有關ASM例項的初始化引數檔案
1)待刪除檔案列表
有關ASM例項的初始化引數檔案位於$ORACLE_HOME/dbs/目錄下
RACDB2@rac2 /home/oracle$ ls -l $ORACLE_HOME/dbs/*ASM*
-rw-rw---- 1 oracle oinstall 1506 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/ab_+ASM2.dat
-rw-rw---- 1 oracle oinstall 1544 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/hc_+ASM2.dat
lrwxrwxrwx 1 oracle oinstall 41 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/init+ASM2.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora
-rw-r----- 1 oracle oinstall 1536 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/orapw+ASM2
2)刪除上述的檔案
RACDB2@rac2 /home/oracle$ rm -f $ORACLE_HOME/dbs/*ASM*
3)確認刪除
RACDB2@rac2 /home/oracle$ ls -l $ORACLE_HOME/dbs/*ASM*
ls: /u01/app/oracle/product/10.2.0/db_1/dbs/*ASM*: No such file or directory
3.刪除第二節點與ASM例項相關的日誌檔案
RACDB2@rac2 /home/oracle$ rm -rf $ORACLE_BASE/admin/+ASM
4.刪除/etc/oratab檔案中有關ASM的內容
1)刪除檔案中有關ASM的資訊
[root@rac2 ~]# vi /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM2:/u01/app/oracle/product/10.2.0/db_1:N
刪除最後一行內容即可。
建議刪除之前對該檔案進行備份。
2)為防止該檔案的屬主和許可權發生變化,可以重置。
[root@rac2 ~]# chown oracle /etc/oratab
[root@rac2 ~]# chmod 664 /etc/oratab
[root@rac2 ~]# ls -l /etc/oratab
-rw-rw-r-- 1 oracle root 722 Oct 26 19:30 /etc/oratab
到此,ASM的刪除任務已經完成。
5.小結
此ASM的刪除過程可以說是比較通用的做法,只要細心處理ASM出現過的地方,一般不會出現太大的問題。
Good luck.
secooler
10.10.27
-- The End --
在進行此步刪除操作之前,請確保以下刪除動作已經完成。
《【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項》(http://space.itpub.net/519536/viewspace-676893)。
1.停止並刪除執行在第二節點上的ASM例項
以oracle使用者連線到第一個節點,使用srvctl工具停止並刪除執行在第二節點上的ASM例項,完成後確認相應的資源確實已經從Oracle叢集環境中刪除。
1)確認系統當前狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
2)停止第二節點上的ASM例項
RACDB1@rac1 /home/oracle$ srvctl stop asm -n rac2
3)確認停止第二節點上的ASM例項後的狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application OFFLINE OFFLINE
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
4)刪除第二節點上的ASM
RACDB1@rac1 /home/oracle$ srvctl remove asm -n rac2
5)刪除後的系統狀態
RACDB1@rac1 /home/oracle$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora.RACDB.db application ONLINE ONLINE rac2
ora....DB1.srv application ONLINE ONLINE rac1
ora.....taf.cs application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
2.刪除第二節點上有關ASM例項的初始化引數檔案
1)待刪除檔案列表
有關ASM例項的初始化引數檔案位於$ORACLE_HOME/dbs/目錄下
RACDB2@rac2 /home/oracle$ ls -l $ORACLE_HOME/dbs/*ASM*
-rw-rw---- 1 oracle oinstall 1506 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/ab_+ASM2.dat
-rw-rw---- 1 oracle oinstall 1544 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/hc_+ASM2.dat
lrwxrwxrwx 1 oracle oinstall 41 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/init+ASM2.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora
-rw-r----- 1 oracle oinstall 1536 Oct 26 2010 /u01/app/oracle/product/10.2.0/db_1/dbs/orapw+ASM2
2)刪除上述的檔案
RACDB2@rac2 /home/oracle$ rm -f $ORACLE_HOME/dbs/*ASM*
3)確認刪除
RACDB2@rac2 /home/oracle$ ls -l $ORACLE_HOME/dbs/*ASM*
ls: /u01/app/oracle/product/10.2.0/db_1/dbs/*ASM*: No such file or directory
3.刪除第二節點與ASM例項相關的日誌檔案
RACDB2@rac2 /home/oracle$ rm -rf $ORACLE_BASE/admin/+ASM
4.刪除/etc/oratab檔案中有關ASM的內容
1)刪除檔案中有關ASM的資訊
[root@rac2 ~]# vi /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM2:/u01/app/oracle/product/10.2.0/db_1:N
刪除最後一行內容即可。
建議刪除之前對該檔案進行備份。
2)為防止該檔案的屬主和許可權發生變化,可以重置。
[root@rac2 ~]# chown oracle /etc/oratab
[root@rac2 ~]# chmod 664 /etc/oratab
[root@rac2 ~]# ls -l /etc/oratab
-rw-rw-r-- 1 oracle root 722 Oct 26 19:30 /etc/oratab
到此,ASM的刪除任務已經完成。
5.小結
此ASM的刪除過程可以說是比較通用的做法,只要細心處理ASM出現過的地方,一般不會出現太大的問題。
Good luck.
secooler
10.10.27
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-676910/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【RAC】刪除RAC資料庫節點(五)——刪除ONS資料庫
- 【RAC】刪除RAC資料庫節點(三)——刪除監聽資料庫
- 【RAC】刪除RAC資料庫節點(四)——刪除資料庫軟體及ASM軟體資料庫ASM
- 【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項資料庫
- 【RAC】刪除RAC資料庫節點(六)——刪除Oracle叢集服務資料庫Oracle
- 【RAC】刪除RAC資料庫節點(七)——刪除Oracle叢集軟體資料庫Oracle
- Oracle Rac 刪除節點Oracle
- ORACLE RAC環境下刪除節點Oracle
- 官方文件學習:RAC刪除節點
- oracle11g_RAC新增刪除節點Oracle
- Oracle 10g RAC刪除、增加節點Oracle 10g
- 【RAC】Oracle10g rac新增刪除節點命令參考Oracle
- 【RAC】Oracle11g RAC刪除節點相關事項Oracle
- Oracle10203RAC環境刪除節點(二)Oracle
- linux下rac環境下刪除節點Linux
- Oracle10g RAC 刪除及加入節點Oracle
- 刪除oracle10g rac(rhel4)節點_節點Oracle
- 11G R2 RAC新增刪除節點
- Oracle RAC 10g叢集節點刪除[zt]Oracle
- RAC 節點2刪除自己的歸檔指令碼指令碼
- RAC刪除節點失敗重啟大法解決
- Oracle10g RAC 刪除及加入節點 - updatedOracle
- oracle 10g rac,刪除故障節點並新增新節點Oracle 10g
- oracle 10g rac 新增節點與刪除節點步驟Oracle 10g
- oracle rac 12徹底刪除,徹底刪除該死的racOracle
- Oracle10g RAC 刪除節點步驟及原理Oracle
- Oracle10g RAC 刪除已經失效的節點Oracle
- oracle11gr2_rac_刪除節點最佳實踐Oracle
- 【Oracle】 RAC 環境刪除oracle 之二Oracle
- 11gr2 RAC靜默刪除、建立資料庫資料庫
- 刪除oracle10g rac(rhel4)節點_例項Oracle
- Oracle10203RAC環境刪除節點(三)Oracle
- Oracle10203RAC環境刪除節點(一)Oracle
- 虛擬機器環境下RAC刪除節點(Final)虛擬機
- [zt]ORACLE 10gR2 RAC環境增加及刪除節點Oracle 10g
- 刪除Linux非rac環境下的ASM例項LinuxASM
- JavaScript刪除節點自身JavaScript
- indexedDB 刪除資料庫Index資料庫