Search code examples
oracleoracle10gcluster-computinginstances

Official way to query the number of instances in an Oracle RAC


According to The Oracle FAQ, you can query the SYS.V_$ACTIVE_INSTANCES and/or SYS.V_$THREAD views to find the number of active RAC instances. I remember reading somewhere that the V_$ views are internal to Oracle and subject to change without notification. Is this true? Is there an "official" way to find the number of running instances in a RAC database in a stored procedure? Is there a way to find out the total number of RAC instances for a database, running or not?


Solution

  • From the same oracle FAQ,

    To list the active instances from PL/SQL, use DBMS_UTILITY.ACTIVE_INSTANCES().

    and yes are "subject to change without notification": someone can draw out the power cable of one machine "without notification"