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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11gR2 RAC 叢集服務啟動與關閉總結Oracle
- MySQL啟動和關閉命令總結MySql
- 如何在cmd視窗關閉情況下保持後臺啟動docsify?
- 月結各模組關閉情況查詢SQLSQL
- 瀏覽器攔截開啟新視窗情況總結瀏覽器
- Qt 彈出的子頁面在未關閉的情況下,關閉主窗體,程式不退出的情況解決QT
- 3 啟動和關閉
- iOS RAC總結iOS
- win10系統快速啟動怎麼關閉 關閉Windows快速啟動Win10Windows
- 9. 啟動、關閉tomcatTomcat
- 啟動與關閉服務
- 01啟動(關閉)套接字
- centos下nginx啟動、重啟、關閉CentOSNginx
- 在duplicate時,出現監聽BLOCKED的情況,導致監聽自動關閉BloC
- win10快速啟動怎麼關閉_win10如何關閉快速啟動Win10
- 關於Android安裝apk出現解析包異常問題情況總結AndroidAPK
- windows10怎麼關閉快速啟動_windows10關閉快速啟動的方法Windows
- 訂單超時自動關閉的實現方案總結
- oracle11g RAC新增節點Oracle
- win10 自動重啟關閉方法_win10自動重啟怎麼關閉Win10
- 如何關閉win10快速啟動_win10系統快速啟動怎麼關閉Win10
- Oracle RAC中驗證LUN_ID對應情況Oracle
- nginx關閉/重啟/啟動的操作方法Nginx
- Oracle RAC DRM介紹和關閉DRMOracle
- Oracle RAC自啟動Oracle
- SpringBoot啟動流程總結Spring Boot
- Oracle 11g RAC之HAIP相關問題總結OracleAI
- Scrcpy v1.9可以在螢幕關閉的情況下映象螢幕
- Oracle RAC啟動失敗-軟連結惹的禍Oracle
- [20211203]演示job啟動時間改變的情況.txt
- win10啟動管理器關閉的方法_win10關閉啟動管理器的方法Win10
- win10開機自啟動程式關閉方法_win10怎麼關閉開機啟動項Win10
- Mac操作指南:Mac Monterey實況文字功能如何開啟和關閉?Mac
- Android 書本開啟和關閉動畫Android動畫
- Linux下的MongoDB安裝&啟動&關閉LinuxMongoDB
- 4.2.1.11 學習如何啟動和關閉CDB
- redhat7.6安裝Oracle11G RACRedhatOracle
- ryu啟動問題總結