一.啟動和停止集群
在Oracle 11gR2 下的RAC,架構發生了變化。CRS的信息也是放在ASM 實例里的,所以要關asm,必須關閉crs, 如果還使用了acfs的話,一關crs那么acfs里的信息也不能訪問了,所以一般不重啟機器,不輕易關crs, 其他的service可以根據自己的需要去stop/start。
注意:
11g RAC 開啟資源相對比較慢(即使命令后面顯示的資源都start succeeded,通過crs_stat -t查看都不一定online), 需要耐心並查看log。
在Oracle 11gR2 里引入了Oracle Restart的特性,其用來管理Cluster Resource。關於Oracle Restart,參考我的Blog:
Oracle 11g 新特性 -- Oracle Restart 說明
http://blog.csdn.net/tianlesoftware/article/details/8435670
1.1 使用crsctl stop has/crsctl stopcrs
用root用戶,在Oracle11gR2中停止和啟動集群的命令如下:
#crsctl stop has [-f]
#crsctl start has
注意:
對於crsctl stop has 只有一個可選的參數就是-f,該命令只能停執行該命令服務器上的HAS.而不能停所有節點上的。所以要把RAC 全部停掉,需要在所有節點執行該命令。
下面的2個命令:使用crs 和 使用has 效果是完全一樣的:
#crsctl stop crs [-f]
#crsctl start crs
示例:
--停止HAS
[root@rac1 bin]# ./crsctl stophas
CRS-2791:Starting shutdown of Oracle High Availability Services-managed resources on'rac1'
CRS-2673:Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790:Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673:Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2673:Attempting to stop 'ora.OCRVOTING.dg' on 'rac1'
CRS-2673:Attempting to stop 'ora.sdd.db' on 'rac1'
CRS-2673:Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673:Attempting to stop 'ora.oc4j' on 'rac1'
CRS-2673:Attempting to stop 'ora.cvu' on 'rac1'
CRS-2677: Stopof 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stopof 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stopof 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.rac1.vip' on 'rac2'
CRS-2677: Stopof 'ora.scan1.vip' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.scan1.vip' on 'rac2'
CRS-2676:Start of 'ora.scan1.vip' on 'rac2' succeeded
CRS-2676:Start of 'ora.rac1.vip' on 'rac2' succeeded
CRS-2672:Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac2'
CRS-2677: Stopof 'ora.sdd.db' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2673:Attempting to stop 'ora.FRA.dg' on 'rac1'
CRS-2676:Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac2' succeeded
CRS-2677: Stopof 'ora.FRA.dg' on 'rac1' succeeded
CRS-2677: Stopof 'ora.DATA.dg' on 'rac1' succeeded
CRS-2677: Stopof 'ora.oc4j' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.oc4j' on 'rac2'
CRS-2677: Stopof 'ora.cvu' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.cvu' on 'rac2'
CRS-2676:Start of 'ora.cvu' on 'rac2' succeeded
CRS-2677: Stopof 'ora.OCRVOTING.dg' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stopof 'ora.asm' on 'rac1' succeeded
CRS-2676:Start of 'ora.oc4j' on 'rac2' succeeded
CRS-2673:Attempting to stop 'ora.ons' on 'rac1'
CRS-2677: Stopof 'ora.ons' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.net1.network' on 'rac1'
CRS-2677: Stopof 'ora.net1.network' on 'rac1' succeeded
CRS-2792:Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stopof 'ora.crsd' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2673:Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673:Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673:Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stopof 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stopof 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stopof 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stopof 'ora.asm' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stopof 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stopof 'ora.cssd' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.crf' on 'rac1'
CRS-2677: Stopof 'ora.crf' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stopof 'ora.gipcd' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stopof 'ora.gpnpd' on 'rac1' succeeded
CRS-2793:Shutdown of Oracle High Availability Services-managed resources on 'rac1' hascompleted
CRS-4133:Oracle High Availability Services has been stopped.
[root@rac1bin]#
注意:
我這里測試的是Oracle11gR2的環境,我們在節點1上執行該命令,只把節點1上的進程停了,而把相關的資源轉移到我們的節點2上了,因此也證實了我們上面的說的,該命令只爭對當前服務器有效。
--啟動HAS:
[root@rac1bin]# ./crsctl start has
CRS-4123:Oracle High Availability Services has been started.
[root@rac1bin]#
從上面看只是啟動了HAS。實際上后面會把Oracle Restart 管理的資源都會啟動。這個可以使用crs_stat命令來進程驗證,不過Oracle 11g的進程啟動過程比較慢,需要耐心等待。
[root@rac1u01]# sh crs_stat.sh
Name Target State Host
---------------------------------------- --------- -------
ora.DATA.dg ONLINE ONLINE rac1
ora.FRA.dg ONLINE ONLINE rac1
ora.LISTENER.lsnr ONLINE ONLINE rac1
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE rac2
ora.OCRVOTING.dg ONLINE ONLINE rac1
ora.asm ONLINE ONLINE rac1
ora.cvu ONLINE ONLINE rac2
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE rac1
ora.oc4j ONLINE ONLINE rac2
ora.ons ONLINE ONLINE rac1
ora.rac1.ASM1.asm ONLINE ONLINE rac1
ora.rac1.LISTENER_RAC1.lsnr ONLINE ONLINE rac1
ora.rac1.gsd OFFLINE OFFLINE
ora.rac1.ons ONLINE ONLINE rac1
ora.rac1.vip ONLINE ONLINE rac1
ora.rac2.ASM2.asm ONLINE ONLINE rac2
ora.rac2.LISTENER_RAC2.lsnr ONLINE ONLINE rac2
ora.rac2.gsd OFFLINE OFFLINE
ora.rac2.ons ONLINE ONLINE rac2
ora.rac2.vip ONLINE ONLINE rac2
ora.scan1.vip ONLINE ONLINE rac2
ora.sdd.db ONLINE ONLINE rac2
1.2 使用crsctl stop cluster [-all]…
該命令的語法如下:
crsctl stop cluster [[-all]|[-n<server>[...]]] [-f]
crsctl start cluster [[-all]|[-n<server>[...]]]
與1.1 節最大的不同,該參數支持的選項更多,可以同時操控所有的節點。如果不指定參數,那么只對當前節點有效。
如:
[root@rac1 ~]# ./crsctl start cluster -n rac1 rac2
--停止當前節點集群:
[root@rac1 bin]# ./crsctl stop cluster
CRS-2673: Attempting to stop 'ora.crsd' on'rac1'
CRS-2790: Starting shutdown of ClusterReady Services-managed resources on 'rac1'
CRS-2673: Attempting to stop'ora.LISTENER.lsnr' on 'rac1'
CRS-2673: Attempting to stop'ora.OCRVOTING.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.sdd.db'on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on'rac1' succeeded
CRS-2673: Attempting to stop 'ora.rac1.vip'on 'rac1'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac1'succeeded
CRS-2672: Attempting to start'ora.rac1.vip' on 'rac2'
CRS-2677: Stop of 'ora.sdd.db' on 'rac1'succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg'on 'rac1'
CRS-2673: Attempting to stop 'ora.FRA.dg'on 'rac1'
CRS-2676: Start of 'ora.rac1.vip' on 'rac2'succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'rac1'succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1'succeeded
CRS-2677: Stop of 'ora.OCRVOTING.dg' on'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded
CRS-2673: Attempting to stop 'ora.ons' on'rac1'
CRS-2677: Stop of 'ora.ons' on 'rac1'succeeded
CRS-2673: Attempting to stop'ora.net1.network' on 'rac1'
CRS-2677: Stop of 'ora.net1.network' on'rac1' succeeded
CRS-2792: Shutdown of Cluster ReadyServices-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1'succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on'rac1'
CRS-2673: Attempting to stop 'ora.asm' on'rac1'
CRS-2677: Stop of 'ora.evmd' on 'rac1'succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1'succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded
CRS-2673: Attempting to stop'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1'succeeded
[root@rac1 bin]#
這里只停了節點1,相關進程全飄到節點2了,如下:
[root@rac2 u01]# sh crs_stat.sh
Name Target State Host
------------------------------ ------------------- -------
ora.DATA.dg ONLINE ONLINE rac2
ora.FRA.dg ONLINE ONLINE rac2
ora.LISTENER.lsnr ONLINE ONLINE rac2
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE rac2
ora.OCRVOTING.dg ONLINE ONLINE rac2
ora.asm ONLINE ONLINE rac2
ora.cvu ONLINE ONLINE rac2
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE rac2
ora.oc4j ONLINE ONLINE rac2
ora.ons ONLINE ONLINE rac2
ora.rac1.ASM1.asm ONLINE OFFLINE
ora.rac1.LISTENER_RAC1.lsnr ONLINE OFFLINE
ora.rac1.gsd OFFLINE OFFLINE
ora.rac1.ons ONLINE OFFLINE
ora.rac1.vip ONLINE ONLINE rac2
ora.rac2.ASM2.asm ONLINE ONLINE rac2
ora.rac2.LISTENER_RAC2.lsnr ONLINE ONLINE rac2
ora.rac2.gsd OFFLINE OFFLINE
ora.rac2.ons ONLINE ONLINE rac2
ora.rac2.vip ONLINE ONLINE rac2
ora.scan1.vip ONLINE ONLINE rac2
ora.sdd.db ONLINE ONLINE rac2
--啟用當前節點:
[root@rac1 bin]#./crsctl start cluster
CRS-2672: Attempting to start'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on'rac1'
CRS-2672: Attempting to start 'ora.diskmon'on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1'succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1'succeeded
CRS-2672: Attempting to start 'ora.ctssd'on 'rac1'
CRS-2672: Attempting to start'ora.cluster_interconnect.haip' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1'succeeded
CRS-2672: Attempting to start 'ora.evmd' on'rac1'
CRS-2676: Start of 'ora.evmd' on 'rac1'succeeded
CRS-2676: Start of'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1'succeeded
CRS-2672: Attempting to start 'ora.crsd' on'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1'succeeded
[root@rac1 bin]#
1.3 檢查集群的狀態
--簡單的輸出:
[root@rac1 bin]# ./crsctl check cluster
[root@rac1 bin]# ./crsctl check crs
--詳細的信息:
# crs_stat -t
使用crsctl check crs命令,如下:
[root@rac1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Servicesis online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Servicesis online
CRS-4533: Event Manager is online
[root@rac1 bin]# ./crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Servicesis online
CRS-4533: Event Manager is online
二.停止和啟動Resource
在第一節中,看到直接停止集群,相關的Resource 也會被停止。 但一些實際情況下,我們操作更多的是對某些資源的操作。具體就是使用SRVCTL 命令
1.1. 官網說明
SRVCTL Command Reference for Oracle Restart
http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm
查看命令幫助:
Srvclt –h
這個命令顯示的結果太長,不好查看,可以進一步的查看幫助:
--使用-h:
[grid@rac1 ~]$ srvctl start -h
The SRVCTL start command starts, OracleClusterware enabled, non-running objects.
Usage: srvctl start database -d<db_unique_name> [-o <start_options>] [-n <node>]
Usage: srvctl start instance -d <db_unique_name>{-n <node_name> [-i <inst_name>] | -i <inst_name_list>} [-o<start_options>]
Usage: srvctl start service -d<db_unique_name> [-s "<service_name_list>" [-n<node_name> | -i <inst_name>] ] [-o <start_options>]
Usage: srvctl start nodeapps [-n <node_name>][-g] [-v]
Usage: srvctl start vip { -n<node_name> | -i <vip_name> } [-v]
Usage: srvctl start asm [-n<node_name>] [-o <start_options>]
Usage: srvctl start listener [-l<lsnr_name>] [-n <node_name>]
Usage: srvctl start scan [-i<ordinal_number>] [-n <node_name>]
Usage: srvctl start scan_listener [-n<node_name>] [-i <ordinal_number>]
Usage: srvctl start oc4j [-v]
Usage: srvctl start home -o<oracle_home> -s <state_file> -n <node_name>
Usage: srvctl start filesystem -d<volume_device> [-n <node_name>]
Usage: srvctl start diskgroup -g<dg_name> [-n "<node_list>"]
Usage: srvctl start gns [-l<log_level>] [-n <node_name>] [-v]
Usage: srvctl start cvu [-n<node_name>]
For detailed help on each command andobject and its options use:
srvctl <command> <object> -h
--或者命令不敲全:
[grid@rac1 ~]$ srvctl database
Usage: srvctl <command><object> [<options>]
commands:enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config|convert|upgrade
objects: database|instance|service|nodeapps|vip|network|asm|diskgroup|listener|srvpool|server|scan|scan_listener|oc4j|home|filesystem|gns|cvu
For detailed help on each command andobject and its options use:
srvctl <command> -h or
srvctl <command> <object> -h
1.2 示例
1.2.1 檢查集群狀態
[grid@rac1 ~]$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Servicesis online
CRS-4533: Event Manager is online
1.2.2 所有Oracle實例(數據庫狀態)
[grid@rac1 ~]$ srvctl status database -dsdd
Instance sdd1 is running on node rac1
Instance sdd2 is running on node rac2
1.2.3 檢查單個實例狀態
[grid@rac1 ~]$ srvctl status instance -dsdd -i sdd1
Instance sdd1 is running on node rac1
[grid@rac1 ~]$
1.2.4節點應用程序狀態
[grid@rac1 ~]$ srvctl status nodeapps
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
Network is enabled
Network is running on node: rac1
Network is running on node: rac2
GSD is disabled
GSD is not running on node: rac1
GSD is not running on node: rac2
ONS is enabled
ONS daemon is running on node: rac1
ONS daemon is running on node: rac2
1.2.5 列出所有的配置數據庫
[grid@rac1 ~]$ srvctl config database
sdd
1.2.6 數據庫配置
[grid@rac1 ~]$ srvctl config database -dsdd -a
Database unique name: sdd
Database name: sdd
Oracle home: /u01/app/oracle/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/sdd/spfilesdd.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: sdd
Database instances: sdd1,sdd2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
1.2.7 ASM狀態以及ASM配置
[grid@rac1 ~]$ srvctl status asm
ASM is running on rac2,rac1
[grid@rac1 ~]$ srvctl status asm -a
ASM is running on rac2,rac1
ASM is enabled.
1.2.8 TNS監聽器狀態以及配置
[grid@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s):rac2,rac1
[grid@rac1 ~]$ srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/grid/11.2.0 on node(s) rac2,rac1
End points: TCP:1521
1.2.8 SCAN狀態以及配置
[grid@rac1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
[grid@rac1 ~]$ srvctl config scan
SCAN name: rac-scan, Network:1/192.168.16.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP:/rac-scan/192.168.16.207
1.2.9 VIP各個節點的狀態以及配置
[grid@rac1 ~]$ srvctl status vip -n rac1
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
[grid@rac1 ~]$ srvctl status vip -n rac2
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
[grid@rac1 ~]$ srvctl config vip -n rac1
VIP exists: /rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0,hosting node rac1
[grid@rac1 ~]$ srvctl config vip -n rac2
VIP exists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0, hosting node rac2
[grid@rac1 ~]$
1.2.10 節點應用程序配置(VIP、GSD、ONS、監聽器)
[grid@rac1 ~]$ srvctl config nodeapps -a -g-s -l
Warning:-l option has been deprecated andwill be ignored.
Network exists:1/192.168.16.0/255.255.255.0/eth0, type static
VIP exists:/rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0, hosting node rac1
VIP exists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0, hosting node rac2
GSD exists
ONS exists: Local port 6100, remote port6200, EM port 2016
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/grid/11.2.0 on node(s) rac2,rac1
End points: TCP:1521
1.3 語法簡匯
1.3.1 數據庫與實例
srvctl config database # 列出安裝的數據庫
srvctl config database -d rac -a # 檢查數據庫相關的信息
srvctlstatus database -d RAC # 檢查數據庫的狀態
srvctl status instance -d RAC -i rac1 # 檢查指定實例的狀態
srvctl config asm -a # ASM配置
srvctl status asm # ASM的狀態
srvctl start database -d rac # 啟動數據庫
srvctl stop database -d rac # 關閉數據庫
srvctl start instance -d rac -i rac1 # 啟動指定的實例
srvctl stop instance -d rac -i rac2 # 關閉指定實例
1.3.2 網絡相關的命令
srvctl status listener # 檢查TNS listener的狀態
srvctl config scan # SCAN的配置
srvctl status scan # SCAN listener狀態, 包含當前運行節點的信息
# 檢查VIP的配置及狀態
srvctl status vip -n rac1
srvctl config vip -n rac1
1.3.3 查看各資源狀態(nodeapps節點應用程序,ASM實例,數據庫等)
[root@db02 u01]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE db02
ora.FRA.dg ora....up.type ONLINE ONLINE db02
ora....ER.lsnr ora....er.type ONLINE ONLINE db02
ora....N1.lsnr ora....er.type ONLINE ONLINE db02
ora....N2.lsnr ora....er.type ONLINE ONLINE db02
ora....N3.lsnr ora....er.type ONLINE ONLINE db02
ora.OCR.dg ora....up.type ONLINE ONLINE db02
ora.asm ora.asm.type ONLINE ONLINE db02
ora....-01.vip ora....t1.type ONLINE ONLINE db02
ora....SM2.asm application ONLINE ONLINE db02
ora....02.lsnr application ONLINE ONLINE db02
ora....-02.gsd application OFFLINE OFFLINE
ora....-02.ons application ONLINE ONLINE db02
ora....-02.vip ora....t1.type ONLINE ONLINE db02
ora.cvu ora.cvu.type ONLINE ONLINE db02
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE db02
ora.oc4j ora.oc4j.type ONLINE ONLINE db02
ora.ons ora.ons.type ONLINE ONLINE db02
ora.orcl.db ora....se.type ONLINE ONLINE db02
ora....taf.svc ora....ce.type ONLINE ONLINE db02
ora.scan1.vip ora....ip.type ONLINE ONLINE db02
ora.scan2.vip ora....ip.type ONLINE ONLINE db02
ora.scan3.vip ora....ip.type ONLINE ONLINE db02
在11g R2中,默認 oc4j和gsd資源是 disable的;oc4j 是用於WLM 的一個資源, WLM在 11.2.0.2 才可用;gsd是 CRS 用於跟 9i RAC 進行通信的一個模塊,是為了向后兼容才保留的,不影響性能;建議不要刪除, 也不要嘗試開啟他們, 忽略即可。
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.
狀態檢查也可以使用如下命令:
crsctl stat resource –t
或者
crsctl stat resource
更多內容參考:
http://blog.csdn.net/tianlesoftware/article/details/6009962
1.3.4 綜合
1、通過SRVCTL命令來start/stop/check所有的實例:
srvctl start|stop|status database -d<db_name>
2、start/stop指定的實例:
srvctl start|stop|statusinstance -d <db_name> -i <instance_name>
3、列出當前RAC下所有的
srvctl config database -d <db_name>
4、start/stop/check 所有的nodeapps,比如:VIP, GSD, listener, ONS:
srvctl start|stop|status nodeapps -n<node_name>
5、如果你使用ASM,srvctl也可以start/stop ASM實例:
srvctl start|stop asm -n <node_name>[-i <asm_inst_name>] [-o<oracle_home>]
6、可以獲取所有的環境信息:
srvctl getenv database -d <db_name> [-i<instance_name>]
7、設置全局環境和變量:
srvctl setenv database -d<db_name> -t LANG=en
8、從OCR中刪除已有的數據庫:
srvctl remove database -d <db_name>
9、向OCR中添加一個數據庫的實例:
srvctl add instance -d <db_name> -i<instance_name> -n <node1>
srvctl add instance -d <db_name> -i<instance_name> -n <node2>
轉:http://blog.csdn.net/tianlesoftware/article/details/8435772