应在集群的所有节点上执行以下 RAC 核实检查!对于本指南,我将只从 linux1 中执行这些检查。
本节提供了几个可用于验证 Oracle RAC 10g 配置的 srvctl 命令和 SQL 查询。
有五个为 SRVCTL 定义的节点级任务:
添加和删除节点级应用程序
设置和取消设置节点级应用程序的环境
管理节点应用程序
管理 ASM 实例
启动和停止一组包含虚拟 IP 地址、监听器、Oracle 通知服务和 Oracle 企业管理器代理的程序(出于维护目的)。
所有实例和服务的状态
$ srvctl status database -d orcl
Instance orcl1 is running on node linux1
Instance orcl2 is running on node linux2
单个实例的状态
$ srvctl status instance -d orcl -i orcl2
Instance orcl2 is running on node linux2
在数据库全局命名服务的状态
$ srvctl status service -d orcl -s orcltest
Service orcltest is running on instance(s) orcl2, orcl1
特定节点上节点应用程序的状态
$ srvctl status nodeapps -n linux1
VIP is running on node:linux1
GSD is running on node:linux1
Listener is running on node:linux1
ONS daemon is running on node:linux1
ASM 实例的状态
$ srvctl status asm -n linux1
ASM instance +ASM1 is running on node linux1.
列出配置的所有数据库
$ srvctl config database
orcl
显示 RAC 数据库的配置
$ srvctl config database -d orcl
linux1 orcl1 /u01/app/oracle/product/10.1.0/db_1
linux2 orcl2 /u01/app/oracle/product/10.1.0/db_1
显示指定集群数据库的所有服务
$ srvctl config service -d orcl
orcltest PREF:orcl2 orcl1 AVAIL:
显示节点应用程序的配置 -(VIP、GSD、ONS、监听器)
$ srvctl config nodeapps -n linux1 -a -g -s -l
VIP exists.:/vip-linux1/192.168.1.200/255.255.255.0/eth0:eth1
GSD exists.
ONS daemon exists.
Listener exists.
显示 ASM 实例的配置
$ srvctl config asm -n linux1
+ASM1 /u01/app/oracle/product/10.1.0/db_1
集群中所有正在运行的实例
SELECT
inst_id
, instance_number inst_no
, instance_name inst_name
, parallel
, status
, database_status db_status
, active_state state
, host_name host
FROM gv$instance
ORDER BY inst_id;
INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST
-------- -------- ---------- --- ------- ------------ --------- -------
1 1 orcl1 YES OPEN ACTIVE NORMAL linux1
2 2 orcl2 YES OPEN ACTIVE NORMAL linux2
位于磁盘组中的所有数据文件
select name from v$datafile
union
select member from v$logfile
union
select name from v$controlfile
union
select name from v$tempfile;
NAME
-------------------------------------------
+ORCL_DATA1/orcl/controlfile/current.256.1
+ORCL_DATA1/orcl/datafile/indx.269.1
+ORCL_DATA1/orcl/datafile/sysaux.261.1
+ORCL_DATA1/orcl/datafile/system.259.1
+ORCL_DATA1/orcl/datafile/undotbs1.260.1
+ORCL_DATA1/orcl/datafile/undotbs1.270.1
+ORCL_DATA1/orcl/datafile/undotbs2.263.1
+ORCL_DATA1/orcl/datafile/undotbs2.271.1
+ORCL_DATA1/orcl/datafile/users.264.1
+ORCL_DATA1/orcl/datafile/users.268.1
+ORCL_DATA1/orcl/onlinelog/group_1.257.1
+ORCL_DATA1/orcl/onlinelog/group_2.258.1
+ORCL_DATA1/orcl/onlinelog/group_3.265.1
+ORCL_DATA1/orcl/onlinelog/group_4.266.1
+ORCL_DATA1/orcl/tempfile/temp.262.1