How can you tell if you're accessing a RAC database? Simple!
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';
NAME VALUE
--------------------- ---------------------
cluster_database TRUE
or
set serveroutput on
BEGIN
IF dbms_utility.is_cluster_database THEN
dbms_output.put_line('Running in SHARED/RAC mode.');
ELSE
dbms_output.put_line('Running in EXCLUSIVE mode.');
END IF;
END;
/
You can tell how many instances are active by:-
SQL> SELECT * FROM V$ACTIVE_INSTANCES;
INST_NUMBER INST_NAME
----------- -----------------------
1 c1718-6-45:AXIOSS1
2 c1718-6-46:AXIOSS2
No comments:
Post a Comment