1 PROCEDURE dbms_feature_rond
2 (is_used OUT number, aux_count OUT number, feature_info OUT clob)
3 AS
4 is_rac_on number;
5 d_type varchar2(15);
6 q_status number;
7 ops_enabled number;
8 BEGIN
9 is_used := 0;
10 aux_count := 0;
11 feature_info := NULL;
12 d_type := NULL;
13 q_status := 0;
14 ops_enabled := 0;
15
16 select count(*) into ops_enabled from x$kjidt;
17
18 if (ops_enabled > 0) then
19 select kjidtv, kjidtqs into d_type, q_status from x$kjidt;
20 if (q_status = 0) then
21 feature_info := to_clob('Database is not in RAC');
22 elsif (q_status = 1) then
23 if (upper(d_type) = 'RACONENODE') then
24 is_used := 1;
25 feature_info := to_clob('Database is of type RACOneNode');
26 elsif (upper(d_type) = 'RAC') then
27 feature_info := to_clob('Database is of type RAC');
28 elsif (upper(d_type) = 'SINGLE') then
29 feature_info := to_clob('Database is of type SINGLE');
30 end if;
31 elsif (q_status = 2) then
32 feature_info := to_clob('Database type query failed');
33 elsif (q_status = 3) then
34 feature_info := to_clob('Database type query returned warning');
35 end if;
36 else
37 feature_info := to_clob('Database is not RAC One Node');
38 end if;
39 END;