American Database Consulting, LLC

Commands to Validate Your Oracle RAC Configuration
Home
Downloads
BLOG
ORACLE
CommVault Consultation
Support
Useful Tips
Video Training
Contact Information
Resume

Overview

This section provides several srvctl commands and SQL queries that can be used to validate your Oracle10g RAC configuration.

 

There are five node-level tasks defined for SRVCTL:

  • Adding and deleting node level applications.
  • Setting and unsetting the environment for node-level applications.
  • Administering node applications.
  • Administering ASM instances.
  • Starting and stopping a group of programs that includes virtual IP addresses, listeners, Oracle Notification Services, and Oracle Enterprise Manager agents (for maintenance purposes).


Status of all instances and services

$ srvctl status database -d orcl
Instance orcl1 is running
                           on node vmlinux1
Instance orcl2 is running on node
                           vmlinux2


Status of a single instance

$ srvctl status instance -d orcl -i orcl2
Instance orcl2 is
                           running on node vmlinux2


Status of a named service globally across the database

$ srvctl status service -d orcl -s orcltest
Service orcltest is running on instance(s) orcl2, orcl1


Status of node applications on a particular node

$ srvctl status nodeapps -n vmlinux1
VIP
                           is running on node: vmlinux1
GSD is running on
                           node: vmlinux1
Listener is running on node: vmlinux1
ONS daemon is running on node: vmlinux1


Status of an ASM instance

$ srvctl status asm -n vmlinux1
ASM instance +ASM1 is running
                           on node vmlinux1.


List all configured databases

$ srvctl config database
orcl


Display configuration for our RAC database

$ srvctl config database -d orcl
vmlinux1
                           orcl1 /u01/app/oracle/product/10.2.0/db_1
vmlinux2
                           orcl2 /u01/app/oracle/product/10.2.0/db_1


Display all services for the specified cluster database

$ srvctl config service -d orcl
orcltest
                           PREF: orcl2 orcl1 AVAIL:


Display the configuration for node applications - (VIP, GSD, ONS, Listener)

$ srvctl config nodeapps -n vmlinux1 -a -g -s -l
VIP exists.: /vmlinux1-vip/192.168.1.211/255.255.255.0/eth0
GSD exists.
ONS
                           daemon exists.
Listener exists.


Display the configuration for the ASM instance(s)

$ srvctl config asm -n vmlinux1
+ASM1
                           /u01/app/oracle/product/10.2.0/db_1


All running instances in the cluster

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    vmlinux1
       2        2 orcl2     
                           YES OPEN    ACTIVE      
                           NORMAL    vmlinux2


All data files which are in the disk group

select name from v$datafile
union
select member from v$logfile
union
select
                           name from v$controlfile
union
select name
                           from v$tempfile;
 
NAME
-------------------------------------------
+FLASH_RECOVERY_AREA/orcl/controlfile/current.256.578676737
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_1.257.578676745
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_2.258.578676759
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_3.259.578682963
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_4.260.578682987
+ORCL_DATA1/orcl/controlfile/current.256.578676735
+ORCL_DATA1/orcl/datafile/example.263.578676853
+ORCL_DATA1/orcl/datafile/indx.270.578685723
+ORCL_DATA1/orcl/datafile/sysaux.261.578676829
+ORCL_DATA1/orcl/datafile/system.259.578676767
+ORCL_DATA1/orcl/datafile/undotbs1.260.578676809
+ORCL_DATA1/orcl/datafile/undotbs1.271.578685941
+ORCL_DATA1/orcl/datafile/undotbs2.264.578676867
+ORCL_DATA1/orcl/datafile/undotbs2.272.578685977
+ORCL_DATA1/orcl/datafile/users.265.578676887
+ORCL_DATA1/orcl/datafile/users.269.578685653
+ORCL_DATA1/orcl/onlinelog/group_1.257.578676739
+ORCL_DATA1/orcl/onlinelog/group_2.258.578676753
+ORCL_DATA1/orcl/onlinelog/group_3.266.578682951
+ORCL_DATA1/orcl/onlinelog/group_4.267.578682977
+ORCL_DATA1/orcl/tempfile/temp.262.578676841
 
21 rows selected.


All ASM disk that belong to the 'ORCL_DATA1' disk group

SELECT path
FROM  
                           v$asm_disk
WHERE  group_number
                           IN (select group_number
                       
                           from v$asm_diskgroup
                       
                           where name = 'ORCL_DATA1');
 
PATH
----------------------------------
ORCL:VOL1
ORCL:VOL2

How Many Instances are Running?

Let's start by peforming a simple query on all instances:

SQL> select instance_number, instance_name from gv$instance order by 1;
 
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
             
                           1 orcl1
             
                           2 orcl2


Which Instance am I Logged In To?

To answer this question, we can simply query the normal v$instance view:

SQL>
                           select instance_name from v$instance;
 
INSTANCE_NAME
----------------
orcl1
 

American Database Consulting and Service Company
4765 Rustler Ct.
Colorado Springs, CO 80918