How to find out if you’re accessing a RAC database

How can you tell if you’re accessing a RAC database? Simple!

(  there is nothing in v$database, You need to check v$instance

PARALLEL VARCHAR2(3) Indicates whether the instance is mounted in cluster database mode (YES) or not (NO)

You can tell if it is a cluster database by looking to see if the cluster database parameter is set:-

SQL> select name, value from v$parameter where name=’cluster_database’;

——————— ———————
cluster_database TRUE
set serveroutput on
IF dbms_utility.is_cluster_database THEN
dbms_output.put_line(‘Running in SHARED/RAC mode.’);
dbms_output.put_line(‘Running in EXCLUSIVE mode.’);

Question. I think we have some data in GV$ views if we are using more then one instance?

ANS: All v$ views are built on top of gv$ views. In single instance mode gv$ views will return the same data as the v$ views.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s