hmaster和datanaode启动后很快停止_Oracle RAC自启动
一:CRS自啟動
二:實例自啟動
一:CRS自啟動
默認情況下,crs是隨著系統啟動自動啟動的。
查看版本
[root@rac01 bin]# ./crsctl query crs softwareversionOracle Clusterware version on node [rac01] is [11.2.0.4.0]啟動自啟動(默認)
[root@rac01 bin]# ./crsctl enable crsCRS-4622: Oracle High Availability Services autostart is enabled.查看
[root@rac01 bin]# cat /etc/oracle/scls_scr/rac01/root/ohasdstr enable禁用自啟動
[root@rac01 ./crsctl disable crsCRS-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 databasecjcdb[root@rac01 bin]# ./srvctl status database -d cjcdbInstance cjcdb1 is running on node rac01Instance cjcdb2 is running on node rac02默認AUTO_START=restore?
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_STARTAUTO_START=restore測試:啟動crs,實例沒有自動啟動(srvctl停庫)
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_STARTAUTO_START=restore[root@rac02 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_STARTAUTO_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 crsSQL> 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 cjcdbInstance cjcdb1 is not running on node rac01Instance cjcdb2 is not running on node rac02測試:啟動crs,實例自動啟動(srvctl)
啟動實例
[root@rac01 bin]# ./srvctl start database -d cjcdb[root@rac01 bin]# ./srvctl status database -d cjcdbInstance cjcdb1 is running on node rac01Instance 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 cjcdbInstance cjcdb1 is running on node rac01Instance 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 cjcdbInstance cjcdb1 is running on node rac01Instance cjcdb2 is running on node rac022.2 AUTO_START=always
實例自啟動?
[root@rac01 bin]# ./crsctl stat res ora.cjcdb.db -p|grep AUTO_STARTAUTO_START=restore實例1修改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_STARTAUTO_START=always查看實例狀態
[root@rac01 bin]# ./srvctl status database -d cjcdbInstance cjcdb1 is not running on node rac01Instance 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 -vInstance cjcdb1 is running on node rac01. Instance status: Open.Instance cjcdb2 is not running on node rac02[root@rac01 bin]# ./srvctl status database -d cjcdbInstance cjcdb1 is running on node rac01Instance 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)更多數據庫相關學習資料,可以查看我的ITPUB博客,網名chenoracle:
http://blog.itpub.net/29785807/
總結
以上是生活随笔為你收集整理的hmaster和datanaode启动后很快停止_Oracle RAC自启动的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: gx works怎么写入from指令_F
- 下一篇: python编写直角三角形边长公式_30