[oracle] linux oracle 语句和状态查询
作者:flymaster
qq:908601287
blog:http://www.cnblogs.com/flymaster500/
Oracle 11g RAC 检查各部分运行状态
[grid@rac1 ~]$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
检查Database实例例状态
[oracle@rac1 ~]$ srvctl status database -d prod
Instance rac1 is running on node rac1
Instance rac2 is running on node rac2
检查节点应用状态及配置
[oracle@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
eONS is enabled
eONS daemon is running on node: rac1
eONS daemon is running on node: rac2
[oracle@rac1 ~]$ srvctl config nodeapps -a -g -s -l
-l option has been deprecated and will be ignored.
VIP exists.:rac1
VIP exists.: /rac1-vip/182.168.8.53/255.255.255.0/eth0
VIP exists.:rac2
VIP exists.: /rac2-vip/182.168.8.54/255.255.255.0/eth0
GSD exists.
ONS daemon exists. Local port 6100, remote port 6200
Name: LISTENER Network: 1, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521
查看数据库配置
[oracle@rac1 ~]$ srvctl config database -d prod -a
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod1,prod2
Disk Groups: DATA,FRA
Services:
Database is enabled
Database is administrator managed
检查 ASM状态及配置
[oracle@rac1 ~]$ srvctl status asm
ASM is running on rac1,rac2
[oracle@rac1 ~]$ srvctl status asm
ASM is running on rac1,rac2
[oracle@rac1 ~]$ srvctl config asm -a
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
检查 TNS的状态及配置
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac1,rac2
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac1,rac2
[oracle@rac1 ~]$ srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521
检查 SCAN 的状态及配置
[oracle@rac1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
[oracle@rac1 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1/182.168.8.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rac-scan.xl.com/182.168.8.55
检查 VIP的状态及配置
[oracle@rac1 ~]$ srvctl status vip -n rac1
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
[oracle@rac1 ~]$ srvctl status vip -n rac2
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
[oracle@rac1 ~]$ srvctl config vip -n rac1
VIP exists.:rac1
VIP exists.: /rac1-vip/182.168.8.53/255.255.255.0/eth0
[oracle@rac1 ~]$ srvctl config vip -n rac2
VIP exists.:rac2
VIP exists.: /rac2-vip/182.168.8.54/255.255.255.0/eth0
作者:flymaster
qq:908601287
blog:http://www.cnblogs.com/flymaster500/