1 PROCEDURE dbms_feature_rac
2 (is_used OUT number, nodes OUT number, clob_rest OUT clob)
3 AS
4 cpu_count_current number;
5 cpu_stddev_current number;
6 BEGIN
7 -- initialize
8 clob_rest := NULL;
9 nodes := NULL;
10 cpu_count_current := NULL;
11 cpu_stddev_current := NULL;
12
13 select count(*) into is_used from v$system_parameter where
14 name='cluster_database' and value='TRUE';
15 -- if RAC is used see if only active/passive or active/active
16 if (is_used = 1) then
17 select count(*) into nodes from gv$instance;
18 select sum(cpu_count_current), round(stddev(cpu_count_current),1)
19 into cpu_count_current, cpu_stddev_current from gv$license;
20 -- active_instance_count init.ora has been deprecated
21 -- so 'usage:Active Passive' will no longer be returned
22 clob_rest:='usage:All Active:cpu_count_current:'||cpu_count_current
23 ||':cpu_stddev_current:'||cpu_stddev_current;
24 end if;
25 END;