11G RAC檢查各元件狀態
ORACLE 11G RAC常用命令(grid使用者檢視)
1:檢查OHAS狀態和叢集狀態
[root@rac1 ~]# 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
2:檢查所有例項執行狀態
[root@rac1 ~]# srvctl status database -d racdb
Instance racdb1 is running on node rac1
Instance racdb2 is running on node rac2
3:檢查單個例項狀態(例項名分別為racdb1和racdb2,資料庫名為racdb)
[root@rac1 ~]# srvctl status instance -d racdb -i racdb1
Instance racdb1 is running on node rac1
[root@rac1 ~]# srvctl status instance -d racdb -i racdb2
Instance racdb2 is running on node rac2
4:節點應用程式狀態
[root@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
節點應用程式配置(VIP、GSD、ONS、監聽器)
[root@rac1 ~]# srvctl config nodeapps -a -g -s -l
Warning:-l option has been deprecated and will be ignored.
Network exists: 1/192.168.11.0/255.255.255.0/eth0, type static
VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1
VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
Name: LISTENER
Network: 1, Owner: grid
Home:
/u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521
5:列出所有的配置資料庫
[root@rac1 ~]# srvctl config database -d racdb -a
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/racdb/spfileracdb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdb
Database instances: racdb1,racdb2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
6:ASM狀態及ASM配置
[root@rac1 ~]# srvctl status asm
ASM is running on rac2,rac1
[root@rac1 ~]# srvctl config asm -a
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
[root@rac1 ~]#
7:TNS監聽器狀態及配置
[root@rac1 ~]# srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1
[root@rac1 ~]# srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home:
/u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521
[root@rac1 ~]#
8:SCAN狀態及配置
[root@rac1 ~]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
[root@rac1 ~]# srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.11.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rac-scan/192.168.11.199
9:VIP各個節點的狀態及配置
[root@rac1 ~]# srvctl status vip -n rac1
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
[root@rac1 ~]# srvctl status vip -n rac2
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
[root@rac1 ~]# srvctl config vip -n rac1
VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1
[root@rac1 ~]# srvctl config vip -n rac2
VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2
10:叢集中所有正在執行的例項(SQL)
SQL> select inst_id,instance_number,instance_name,parallel,status,database_status,active_state,host_name from gv$instance;
INST_ID INSTANCE_NUMBER INSTANCE_NAME PAR STATUS DATABASE_STATUS ACTIVE_ST HOST_NAME
---------- --------------- ---------------- --- ------------ ----------------- --------- --------------
1 1 racdb1 YES OPEN ACTIVE NORMAL rac1
2 2 racdb2 YES OPEN ACTIVE NORMAL rac2
用root使用者執行以下所有檢查
1:啟動或關閉資料庫例項
[root@rac1 ~]# srvctl stop instance -d racdb -n rac1
[root@rac1 ~]#
[root@rac1 ~]# srvctl stop instance -d racdb -n rac2
[root@rac1 ~]#
[root@rac1 ~]# srvctl status database -d racdb
Instance racdb1 is not running on node rac1
Instance racdb2 is not running on node rac2
也可以透過如下命令,檢查每一個例項的狀態
[root@rac1 ~]# srvctl status instance -d racdb -i racdb1
Instance racdb1 is not running on node rac1
[root@rac1 ~]# srvctl status instance -d racdb -i racdb2
Instance racdb2 is not running on node rac2
2:啟動或關閉asm例項
[root@rac1 ~]# srvctl stop asm -n rac1
PRCR-1014 : Failed to stop resource ora.asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified
[root@rac1 ~]#
可以用 crsctl status resource -t -init 檢查叢集資源的狀態
3:本地伺服器上停止oracle clusterware 使用crsctl stop cluster 命令,這個命令執行之後,如果oracle clusterware管理的資源中有任何一個還在執行,
則整個命令失敗。使用-f選項,表示無條件的停止所有資源,並停止oracle clusterware系統。
另外,可透過指定-all選項在叢集中所有伺服器上停止oracle clusterware系統,如下:
crsctl stop cluster -all -f
也可以使用 crsctl start cluster -n rac1 rac2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2153231/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g RAC 檢查各部分執行狀態Oracle
- RAC常見命令檢查狀態
- 1 Oracle Database 11.2.0.3.0 RAC On Oralce Linux 6.5 使用-檢查RAC狀態OracleDatabaseLinux
- Oracle SCN健康狀態檢查Oracle
- oracle物理dg狀態檢查Oracle
- GitLab 的元件狀態檢視Gitlab元件
- Docker 容器的健康狀態檢查Docker
- 2.檢查網路狀態
- linux檢查埠狀態命令Linux
- 檢查Capital許可狀態API
- 網路狀態的檢查和MJRefresh
- 檢查asm磁碟組狀態的檢視v$asm_diskgroupASM
- 4.2.7 檢視元件狀元件
- crs_stat -v 檢視crs 各application 配置狀態資訊APP
- 【dinghao】asp.net控制元件開發(一)簡單屬性、檢視狀態、控制元件狀態ASP.NET控制元件
- 各種檢視的巢狀巢狀
- RAC指令碼檢查指令碼
- 執行緒各種狀態執行緒
- UIButton基本狀態及各種疊加狀態詳解UI
- 查詢oracle各元件的版本Oracle元件
- 11g RAC Grid 元件及程式元件
- openguass 3.1.0 資料庫啟動,關閉,狀態檢查資料庫
- 檢查Oracle的鎖狀態並清除問題會話Oracle會話
- Memcache 記憶體分配策略和效能(使用)狀態檢查記憶體
- 檢測網路狀態
- goldengate 程式(捕捉,傳輸,複製)的狀態檢查命令Go
- chkdsk 命令引數 檢查磁碟並顯示狀態報告
- oracle狀態查詢(補)Oracle
- oracle常用狀態查詢Oracle
- 查詢網路狀態
- iOS模擬各種網路狀態iOS
- Blazor中的無狀態元件Blazor元件
- 小知識:使用oracle使用者檢視RAC叢集資源狀態Oracle
- HG_REPMGR啟動失敗排查和狀態檢查步驟
- Android 檢查網路連線狀態的程式碼實現Android
- 檢視BW執行狀態
- 檢測網路狀態 - flutterFlutter
- iOS 檢測網路狀態iOS