Oracle11g RAC啟動關閉情況大概總結
1. [grid@RAC01 ~]$ crsctl stop database -d RACwh
資料庫關閉ok後此時我們進行關閉crs服務,切忌不要直接關閉ASM例項,在11g中 11.2.0.2 中 ocr 服務的資訊存放在asm 磁碟上,是依賴於asm的 ,所以要關閉crs 而不是直接關閉asm例項,若在此處強行關閉asm例項,很有可能造成的後果是asm磁碟損壞或者丟失,導致整個叢集徹底崩潰。我在測試RAC時,曾dismount某個磁碟組後,首先關閉了資料庫,接著直接關閉了asm例項,關閉時一切正常。無報錯,但當啟動時,發現asm無法啟動crs提示CRS-0184: Cannot communicate with the CRS daemon.無論如何也是無法啟動CRS的,意識到可能是表決磁碟或者OCR出現問題,隨即檢視asm磁碟情況:oracleasm listdisks,沒有任何磁碟資訊,oracleasm scandisks也是同樣的情況,這下估計麻煩了。在登入到另外一個節點上,同樣命令檢視asm磁碟,發現磁碟正常。故此此時我也將該節點的資料庫及asm例項關閉,然後重啟伺服器,之後悲劇的一幕想當然的發生了,兩個節點都無法掃描到asm磁碟資訊。整個叢集破壞的很徹底,丟失資料。也許是我個人原因造成這種異常的資料丟失,但個人還是建議按照常規的順序來關閉啟動RAC。
2. [root@RAC01 bin]# ./crsctl stop crs
如果你足夠細心,你可以透過下面的關閉日誌看出在RAC的CRS關閉的過程中是一個怎樣的順序以及關閉crs的時候都會有那些服務會同時關閉。此外你可能還會發現我們的這個命令是在RAC01這個節點執行的,所以這時候應該RAC02這個節點還是可以正常使用的。強烈建議大家對下面的日誌進行研究。
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac01'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.OCRVD.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac01'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'rac01'
CRS-2677: Stop of 'ora.scan3.vip' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'rac02'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'rac01'
CRS-2677: Stop of 'ora.scan2.vip' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'rac02'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac01'
CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02'
CRS-2677: Stop of 'ora.scan1.vip' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac02'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac01' succeeded
CRS-2677: Stop of 'ora.FLASH.dg' on 'rac01' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'rac02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'rac02'
CRS-2676: Start of 'ora.scan2.vip' on 'rac02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'rac02'
CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'rac02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac02'
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'rac02' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'rac02' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded
CRS-2677: Stop of 'ora.OCRVD.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'rac02'
CRS-2676: Start of 'ora.oc4j' on 'rac02' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'rac01'
CRS-2673: Attempting to stop 'ora.ons' on 'rac01'
CRS-2677: Stop of 'ora.ons' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac01'
CRS-2677: Stop of 'ora.net1.network' on 'rac01' succeeded
CRS-2677: Stop of 'ora.eons' on 'rac01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac01'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac01'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac01'
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac01'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac01'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac01'
CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac01'
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac01'
CRS-2677: Stop of 'ora.gpnpd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac01'
CRS-2677: Stop of 'ora.gipcd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'rac01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@RAC01 bin]#
3. 驗證關閉情況:
[root@RAC01 bin]# ./crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
[root@RAC01 bin]#
4. 啟動crs服務:
[root@RAC01 bin]# ./crsctl start crs-------------此處可能需要等待一段時間。
CRS-4123: Oracle High Availability Services has been started.
[root@RAC01 bin]#
5. 檢視啟動情況:
[grid@RAC02 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac02
ora.FLASH.dg ora....up.type 0/5 0/ ONLINE ONLINE rac02
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac01
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac01
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02
ora....N4.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac02
ora.OCRVD.dg ora....up.type 0/5 0/ ONLINE ONLINE rac01
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac01
ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE rac01
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac01
ora.oc4j ora.oc4j.type 0/5 0/0 ONLINE ONLINE rac02
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac01
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac01
ora....01.lsnr application 0/5 0/0 ONLINE ONLINE rac01
ora.rac01.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac01.ons application 0/3 0/0 ONLINE ONLINE rac01
ora.rac01.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac01
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac02
ora....02.lsnr application 0/5 0/0 ONLINE ONLINE rac02
ora.rac02.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac02.ons application 0/3 0/0 ONLINE ONLINE rac02
ora.rac02.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac02
ora.racwh.db ora....se.type 0/2 0/1 OFFLINE OFFLINE
ora....f01.svc ora....ce.type 0/0 1/0 OFFLINE OFFLINE-----------我個人新增的STAF服務。
ora....f02.svc ora....ce.type 0/0 0/0 OFFLINE OFFLINE-----------我個人新增的STAF服務。
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac01
ora.scan1.vip ora....ip.type 0/0 1/0 ONLINE ONLINE rac01
ora.scan2.vip ora....ip.type 0/0 1/0 ONLINE ONLINE rac02
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac02
ora.scan4.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac02
[grid@RAC02 ~]$
6. 啟動資料庫:
[grid@RAC02 ~]$ srvctl start database -d RACwh
PRCR-1079 : Failed to start resource ora.racwh.db
ORA-16038: log 3 sequence# 41 cannot be archived
ORA-19504: failed to create file ""
ORA-00312: online log 3 thread 2: '+DATA/racwh/redo03.log'
CRS-2674: Start of 'ora.racwh.db' on 'rac01' failed
CRS-2632: There are no more servers to try to place resource 'ora.racwh.db' on that would satisfy its placement policy
[grid@RAC02 ~]$
針對上述的報錯,經檢視原來是歸檔日誌所在的asm未能mount所致,執行該磁碟的mount後重新執行資料庫啟動即可。
此外給大家推薦幾個日常的啟動關閉命令:
其他管理維護指南
一.透過srvctl管理
1.關閉RAC資料庫服務順序
[oracle@dbp ~] $ srvctl stop database -d RACwh
[oracle@dbp ~] $ srvctl stop asm -n RAC01
[oracle@dbp ~] $ srvctl stop asm -n RAC02
[oracle@dbp ~] $ srvctl stop nodeapps -n RAC01
[oracle@dbp ~] $ srvctl stop nodeapps -n RAC02
2.啟動RAC資料庫服務順序
[oracle@RAC01 ~] $ srvctl start nodeapps -n RAC01
[oracle@RAC01 ~] $ srvctl start nodeapps -n RAC02
[oracle@RAC01 ~] $ srvctl start asm -n RAC01
[oracle@RAC01 ~] $ srvctl start asm -n RAC02
[oracle@RAC01 ~] $ srvctl start database -d RACwh
3.其他命令
例項管理
[oracle@RAC01 ~] $ srvctl status instance -d RACwh -i RACwh1
[oracle@RAC01 ~] $ srvctl stop instance -d RACwh -i RACwh1
[oracle@RAC01 ~] $ srvctl start instance -d RACwh -i RACwh1
監聽管理
[oracle@RAC01 ~] $ srvctl status listener -n RAC01
[oracle@RAC01 ~] $ srvctl stop listener -n RAC01
[oracle@RAC01 ~] $ srvctl start listener -n RAC01
二.透過crsctl工具管理
[oracle@RAC01 ~] $ crs_stat -t
[oracle@RAC01 ~] $ crs_stat
[oracle@RAC01 ~] $ crs_start -all
[oracle@RAC01 ~] $ crs_stop -all
[oracle@RAC01 ~] $ crs_stop "ora. RACwh.db"
Crs_stat命令在oracle11g後逐漸趨於廢棄,如下即可明白:
[grid@RAC02 ~]$ crs_stat -h
This command is deprecated and has been replaced by 'crsctl status resource'
This command remains for backward compatibility only
Usage: crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_member]
crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_member]
crs_stat -p [resource_name [...]] [-q]
crs_stat [-a] application -g
crs_stat [-a] application -r [-c cluster_member]
crs_stat -f [resource_name [...]] [-q] [-c cluster_member]
crs_stat -ls [resource_name [...]] [-q]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2151492/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL啟動和關閉命令總結MySql
- Oracle RAC 啟動與關閉Oracle
- Oracle 11g RAC的啟動、關閉及修改歸檔總結Oracle
- Oracle 11gR2 RAC叢集服務啟動與關閉總結Oracle
- Oracle 11gR2 RAC 叢集服務啟動與關閉總結Oracle
- 月結各模組關閉情況查詢SQLSQL
- 如何在cmd視窗關閉情況下保持後臺啟動docsify?
- rac 管理 啟動關閉資料庫資料庫
- Oracle11g RAC在例項關閉後自動在啟動例項上歸檔Oracle
- [RAC] Oracle11g RAC禁止DB自動啟動Oracle
- RAC 資料庫的啟動與關閉資料庫
- 【rac】實驗一:啟動關閉歸檔
- Oracle 10g RAC 啟動與關閉Oracle 10g
- ORACLE RAC 的啟動和關閉順序Oracle
- Oracle10g RAC 關閉及啟動Oracle
- Oracle11g RAC (ASM) 及Active Dataguard開啟與關閉 [final]OracleASM
- Oracle10g RAC (OCFS) 開啟關閉及日常檢查(總結)Oracle
- rac下啟動關閉與更改歸檔模式模式
- Oracle 11gR2 RAC的關閉和啟動Oracle
- Oracle10g RAC 關閉及啟動步驟Oracle
- rac下啟動關閉與更改歸檔模式(zt)模式
- 【RAC】啟動/關閉CRS, OHAS, ASM & RDBMS 的步驟ASM
- 【轉載】RAC User Equivalence Check Failed (後加個人實際情況總結)UIAI
- AIX上安裝、升級Oracle 10g RAC的情況總結AIOracle 10g
- 瀏覽器攔截開啟新視窗情況總結瀏覽器
- oracle11g RAC 啟動歸檔模式Oracle模式
- Oracle 10g RAC正常關閉及啟動順序Oracle 10g
- Oracle9i / 10g RAC 啟動與關閉Oracle
- oracle結構梳理----checkpoint——啟動與關閉Oracle
- Oracle日常運維操作總結-資料庫的啟動和關閉Oracle運維資料庫
- Qt 彈出的子頁面在未關閉的情況下,關閉主窗體,程式不退出的情況解決QT
- Oracle:RAC關閉、啟動、重啟步驟:10g、11gOracle
- RAC常用開啟關閉命令 – SRVCTL用法
- oracle啟動與關閉Oracle
- ORACLE DataGuard 關閉啟動Oracle
- 啟動/關閉 dynamic viewView
- nginx啟動,重啟,關閉命令Nginx
- oracle 10g rac下啟動關閉與更改歸檔模式Oracle 10g模式