Oracle RAC自啟動
Oracle RAC自啟動
一:CRS自啟動
二:例項自啟動
一:CRS自啟動
預設情況下,crs是隨著系統啟動自動啟動的。
檢視版本
[root@rac01 bin]# ./crsctl query crs softwareversion Oracle Clusterware version on node [rac01] is [11.2.0.4.0]
啟動自啟動(預設)
[root@rac01 bin]# ./crsctl enable crs CRS-4622: Oracle High Availability Services autostart is enabled.
檢視
[root@rac01 bin]# cat /etc/oracle/scls_scr/rac01/root/ohasdstr enable
禁用自啟動
[root@rac01 ./crsctl disable crs CRS-4621: Oracle High Availability Services autostart is disabled.
檢視
[root@rac01 bin]# cat /etc/oracle/scls_scr/rac01/root/ohasdstr disable
二:例項自啟動
預設情況下,AUTO_START值為restore。
2.1 AUTO_START=restore
其中restore表示還原、恢復的含義,即將例項狀態恢復到crs停止前的狀態。
(1)如果crs停止前,手動通過sqlplus或srvctl停止了例項,那麼在crs重啟後,例項不會跟著自動啟動。
(2)如果crs停止前,例項處於open狀態,那麼重啟crs(或作業系統重啟),例項會跟著crs啟動而啟動。
注意: 在沒有停止例項前直接停止crs,例項是以abort方式停止的[Shutting down instance (abort)]
2.2 AUTO_START=always
將AUTO_START由restore改成always後,無論crs停止前例項是open還是close狀態,例項都會跟著crs啟動而啟動。
實驗過程如下:
2.1 AUTO_START=restore
測試AUTO_START=restore下,例項啟動情況。
檢視資料庫資訊
[root@rac01 bin]# ./crsctl start crs [root@rac01 bin]# ./srvctl config database cjcdb [root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is running on node rac01 Instance cjcdb2 is running on node rac02
預設AUTO_START=restore
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_START AUTO_START=restore
測試:啟動crs,例項沒有自動啟動(srvctl停庫)
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_START AUTO_START=restore [root@rac02 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_START AUTO_START=restore [root@rac01 bin]# ./srvctl stop database -d cjcdb ###[root@rac01 bin]# ./srvctl stop instance -d cjcdb -i cjcdb1 [root@rac01 bin]# ./crsctl stop crs [root@rac02 bin]# ./crsctl stop crs [root@rac01 bin]# ./crsctl start crs [root@rac02 bin]# ./crsctl start crs
檢視例項狀態
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cjcdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE Instance Shutdown
測試:啟動crs,例項沒有自動啟動(SQLPLUS停庫)
停止例項
SQL> shutdown immediate [root@rac01 bin]# ./crsctl stop crs SQL> shutdown immediate [root@rac02 bin]# ./crsctl stop crs
重啟crs
[root@rac01 bin]# ./crsctl start crs [root@rac02 bin]# ./crsctl start crs
檢視例項狀態
[root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is not running on node rac01 Instance cjcdb2 is not running on node rac02
測試:啟動crs,例項自動啟動(srvctl)
啟動例項
[root@rac01 bin]# ./srvctl start database -d cjcdb [root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is running on node rac01 Instance cjcdb2 is running on node rac02
重啟crs
[root@rac01 bin]# ./crsctl stop crs [root@rac01 bin]# ./crsctl start crs [root@rac02 bin]# ./crsctl stop crs [root@rac02 bin]# ./crsctl start crs
檢視例項狀態
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cjcdb.db 1 ONLINE ONLINE rac01 Open 2 ONLINE ONLINE rac02 Open
檢視例項狀態
[root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is running on node rac01 Instance cjcdb2 is running on node rac02
啟動crs,例項自動啟動(sqlplus)
###節點1###
SQL> startup
###節點2###
SQL> startup
重啟crs
[root@rac01 bin]# ./crsctl stop crs [root@rac01 bin]# ./crsctl start crs [root@rac02 bin]# ./crsctl stop crs [root@rac02 bin]# ./crsctl start crs
檢視例項狀態
[root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is running on node rac01 Instance cjcdb2 is running on node rac02
2.2 AUTO_START=always
例項自啟動
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_START AUTO_START=restore
修改AUTO_START=always
[root@rac01 bin]# ./crsctl modify resource ora.cjcdb.db -attr "AUTO_START=always" [root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_START AUTO_START=always
檢視例項狀態
[root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is not running on node rac01 Instance cjcdb2 is not running on node rac02
重啟crs
[root@rac01 bin]# ./crsctl stop crs [root@rac01 bin]# ./crsctl start crs
檢視例項狀態
[root@rac01 bin]# ./srvctl status instance -d cjcdb -i cjcdb1,cjcdb2 -f -v Instance cjcdb1 is running on node rac01. Instance status: Open. Instance cjcdb2 is not running on node rac02 [root@rac01 bin]# ./srvctl status database -d cjcdb Instance cjcdb1 is running on node rac01 Instance cjcdb2 is not running on node rac02
參考:
SRVCTL : Disabled DB Instance Status Changed to Online when ASM Restarted (Doc ID 2299664.1) Instance Does not Start After 11gR2 Grid Infrastructure Restart or Node Reboot (Doc ID 1149003.1)
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!
!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2707024/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC的自定義service自啟動Oracle
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- Oracle RAC常見啟動失敗故障分析Oracle
- 【RAC】Oracle19.13之後的grid,節點重啟後不會自動驅動Oracle
- Oracle RAC啟動因CTSS導致的異常Oracle
- Oracle 11g RAC自動打GI PSU補丁Oracle
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- Oracle RAC啟動失敗-軟連結惹的禍Oracle
- oracle配置開機自啟動Oracle
- oracle RAC手動配置互信Oracle
- ORACLE RAC的全自動 打補丁標準化文件Oracle
- Oracle RAC 環境 引數檔案的啟動順序Oracle
- 4 配置Oracle資料庫自動啟動Oracle資料庫
- Oracle RAC DG手動切換Oracle
- Oracle11g RAC啟動關閉情況大概總結Oracle
- Oracle 12c RAC CSSD程式無法啟動real time模式OracleCSS模式
- ORA-29702複製RAC Oracle軟體啟動單例項Oracle單例
- linux7 開機自啟動oracleLinuxOracle
- oracle RACOracle
- 【ASK_ORACLE】RAC節點自動重啟但日誌裡未報錯的原因和解決方法Oracle
- 【OEM】Oracle oem取消開機自動啟動(linux)OracleLinux
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- ORACLE RAC 11.2.0.4 FOR RHEL6叢集無法啟動的處理Oracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- Oracle RAC 11gR2開啟歸檔Oracle
- OracleLinux上的Oracle開關機自啟動OracleLinux
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- Oracle 19c rac安裝,只能啟動一個節點的ASMOracleASM
- ORACLE RAC clusterwareOracle
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- Oracle 11g RAC手動新增serviceOracle
- oracle-rac出問題需要重灌,自動清理安裝痕跡指令碼Oracle指令碼
- ORACLE 12C RAC資料庫的啟停Oracle資料庫
- Linux平臺Oracle開機自啟動設定LinuxOracle
- 私有IP丟失造成Oracle 12C RAC叢集節點不能啟動Oracle
- oracle 12c RAC安裝,例項不能多節點同時啟動Oracle
- Oracle 11gR2 RAC 叢集服務啟動與關閉總結Oracle