Moneycontrol Brokerage Recos

Tuesday, June 7, 2016

How to find number of instances configured in your RAC Environment?



Below are the ways you can find out how many number of instances configured in your Oracle RAC cluster Environment.


1 - Query the V$ACTIVE_INSTANCES view to determine the number of instances involved in your RAC configuration.


SQL> desc v$active_instances;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 INST_NUMBER                                        NUMBER
 INST_NAME                                          VARCHAR2(60)



SQL> select * from v$active_instances;

INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
          1 rac1.rajdbsolutions.com:ractst1
          2 rac2.rajdbsolutions.com:ractst2







2 - You can find the same answer at OS level SRVCTL command line utility as below.


-bash-3.2$ srvctl config database -d ractst
Database unique name: ractst
Database name: ractst
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/ractst/spfileractst.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: ractst
Database instances: ractst1,ractst2
Disk Groups: DATA
Services:
Database is administrator managed


Note : - In the above srvctl config command output you can see the number of instances (ractst1,ractst2) are listed by comma at Database Instances clause that are configured in current RAC configuration environment.

No comments:

Post a Comment