Oracle 11gR2 RAC集群服務(wù)啟動(dòng)與關(guān)閉是怎樣的,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),黔西企業(yè)網(wǎng)站建設(shè),黔西品牌網(wǎng)站建設(shè),網(wǎng)站定制,黔西網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷(xiāo),網(wǎng)絡(luò)優(yōu)化,黔西網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M(mǎn)足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專(zhuān)業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶(hù)成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
Oracle 11gR2 RAC集群服務(wù)啟動(dòng)與關(guān)閉總結(jié)
關(guān)閉過(guò)程(CRS集群關(guān)閉->關(guān)閉數(shù)據(jù)庫(kù))
1.關(guān)閉數(shù)據(jù)庫(kù):
用oracl用戶(hù)執(zhí)行srvctl命令
語(yǔ)法:srvctl stop database -d dbname [-o immediate]
作用:可以一次性關(guān)閉dbname的所有實(shí)例
[oracle@rac1 ~]$ srvctl stop database -d racdb -停止所有節(jié)點(diǎn)上的實(shí)例
然后查看狀態(tài):
[oracle@rac1 ~]$ srvctl status database -d racdb
Instance rac1 is not running on node rac1
Instance rac2 is not running on node race
2.停止HAS(High Availability Services),必須以root用戶(hù)操作
[root@rac1 oracle]# cd /u01/grid/11.2.0/grid/bin
[root@rac1 bin]# ./crsctl stop has -f
[root@rac1 bin]# ./crsctl stop crs -f
本命令只能關(guān)閉當(dāng)前節(jié)點(diǎn)的CRS服務(wù),因此需要在RAC的所有節(jié)點(diǎn)上執(zhí)行,啟動(dòng)也一樣。has與crs等同
3.停止節(jié)點(diǎn)集群服務(wù),必須以root用戶(hù):
[root@rac1 oracle]# cd /u01/grid/11.2.0/grid/bin
[root@rac1 bin]# ./crsctl stop cluster ----停止本節(jié)點(diǎn)集群服務(wù)
[root@rac1 bin]# ./crsctl stop cluster -all ---停止所有節(jié)點(diǎn)服務(wù)
也可以如下控制所停節(jié)點(diǎn):
[root@rac1 bin]# crsctl stop cluster -n rac1 rac2
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
省略日志輸出
你如果想一條命令把所有的進(jìn)程全部停止可以使用上述命令。如果不指定參數(shù)的話(huà)對(duì)當(dāng)前節(jié)點(diǎn)有效,如果指定參數(shù)的話(huà)對(duì)相關(guān)參數(shù)節(jié)點(diǎn)有效。
4.檢查集群進(jìn)程狀態(tài)
[root@rac1 bin]# crsctl check cluster
詳細(xì)輸出
[root@rac1 bin]# crs_stat -t -v
只檢查本節(jié)點(diǎn)的集群狀態(tài)
[root@rac1 bin]# crsctl check crs
啟動(dòng)過(guò)程(CRS集群?jiǎn)?dòng)->啟動(dòng)數(shù)據(jù)庫(kù))
1.啟動(dòng)HAS
單一節(jié)點(diǎn)啟動(dòng)
[root@rac2 ~]# crsctl start has
[root@rac2 ~]# crsctl start crs
[root@rac2 ~]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
所有節(jié)點(diǎn)啟動(dòng)
[root@rac1 bin]# crsctl start cluster -n rac1 rac2
CRS-4123: Oracle High Availability Services has been started.
[root@rac1 bin]# crsctl start cluster -all
[root@rac2 ~]# crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
此命令會(huì)在后臺(tái)啟動(dòng)所有RAC CRS相關(guān)進(jìn)程
[root@rac2 ~]# crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
因?yàn)閟tart has啟動(dòng)的crs進(jìn)程比較多因此會(huì)啟動(dòng)的比較慢,我的機(jī)器等待了5分鐘,在沒(méi)有完全啟動(dòng)成功之前會(huì)報(bào)上述錯(cuò)誤,需要耐心等待一段時(shí)間后執(zhí)行下面命令即可查看到所有CRS相關(guān)進(jìn)程服務(wù)已經(jīng)啟動(dòng)。
[root@rac2 ~]# crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac1
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac1
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
說(shuō)明:
英文解釋
ora.gsd is OFFLINE by default ifthere is no 9i database in the cluster.
ora.oc4j is OFFLINE in 11.2.0.1 as DatabaseWorkload Management(DBWLM) is unavailable. these can be ignored in11gR2 RAC.
中文解釋
ora.gsd是集群服務(wù)中用于與9i數(shù)據(jù)庫(kù)進(jìn)行通信的一個(gè)進(jìn)程,在當(dāng)前版本中為了向后兼容才保存下來(lái),狀態(tài)為OFFLINE不影響CRS的正常運(yùn)行與性能,我們忽略即可
ora.oc4j是在11.2.0.2以上版本中有效的服務(wù)進(jìn)程,用于DBWLM的資源管理,因此在11.2.0.1以下版本并沒(méi)有使用
2.啟動(dòng)數(shù)據(jù)庫(kù):
oracl用戶(hù)執(zhí)行srvctl命令:
語(yǔ)法:srvctl start|stop|status database -d dbname [-o immediate]
作用:可以一次性啟動(dòng)dbname的所有實(shí)例
[oracle@rac1 ~]$ srvctl start database -d racdb -啟動(dòng)所有節(jié)點(diǎn)上的實(shí)例
然后查看狀態(tài):
[oracle@rac1 ~]$ srvctl status database -d racdb
3.詳細(xì)輸出資源全名稱(chēng)并檢查狀態(tài)
crsctl status resource -t
crsctl status resource
4.常用srvctl命令
指定dbname上某個(gè)實(shí)例
srvctl start|stop|status instance -d
5.顯示RAC下所有實(shí)例配置與狀態(tài)
srvctl status|config database -d
6.顯示所有節(jié)點(diǎn)的應(yīng)用服務(wù)(VIP,GSD,listener,ONS)
srvctl start|stop|status nodeapps -n
7.ASM進(jìn)程服務(wù)管理
srvctl start|stop|status|config asm -n
srvctl config asm -a
srvctl status asm -a
6.可以獲取所有的環(huán)境信息:
srvctl getenv database -d
7.設(shè)置全局環(huán)境和變量:
srvctl setenv database -d
8.在OCR中刪除已有的數(shù)據(jù)庫(kù)信息
srvctl remove database -d
9.向OCR中添加一個(gè)數(shù)據(jù)庫(kù)的實(shí)例:
srvctl add instance -d
srvctl add instance -d
10.檢查監(jiān)聽(tīng)的狀態(tài)
srvctl status listener
srvctl config listener -a
SCAN配置信息
srvctl config scan
SCAN listener狀態(tài)信息
srvctl status scan
小結(jié):crsctl命令是一個(gè)集群級(jí)別命令,可以對(duì)所有集群資源進(jìn)行統(tǒng)一啟動(dòng)、停止等管理操作
srvctl命令是一個(gè)服務(wù)級(jí)別命令,可以對(duì)單一服務(wù)資源進(jìn)行統(tǒng)一啟動(dòng)、停止等管理操作
附:srvctl命令啟動(dòng)與停止的詳細(xì)幫助
[root@rac2 ~]# srvctl start -h
The SRVCTL start command starts, Oracle Clusterware enabled, non-running objects.
Usage: srvctl start database -d
Usage: srvctl start instance -d
Usage: srvctl start service -d
Usage: srvctl start nodeapps [-n
Usage: srvctl start vip { -n
Usage: srvctl start asm [-n
Usage: srvctl start listener [-l
Usage: srvctl start scan [-i
Usage: srvctl start scan_listener [-n
Usage: srvctl start oc4j [-v]
Usage: srvctl start home -o
Usage: srvctl start filesystem -d
Usage: srvctl start diskgroup -g
Usage: srvctl start gns [-l
Usage: srvctl start cvu [-n
For detailed help on each command and object and its options use:
srvctl
關(guān)于Oracle 11gR2 RAC集群服務(wù)啟動(dòng)與關(guān)閉是怎樣的問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。