1 PROCEDURE DBMS_FEATURE_SECUREFILES_USR
2 ( feature_boolean OUT NUMBER,
3 aux_count OUT NUMBER,
4 feature_info OUT CLOB)
5 AS
6 feature_count NUMBER;
7 BEGIN
8 -- initialize
9 feature_info := NULL;
10 feature_count := 0;
11
12 -- skip internal usage by flashback archive
13 select count(*) into feature_count from (
14 select l.obj#, l.lobj#, l.lobj#, l.lobj#, 'U' fragtype
15 from tab$ t, lob$ l, obj$ o
16 where l.obj#=t.obj# and
17 decode(bitand(l.property, 2048), 0, 'NO', 'YES')='YES' and
18 decode(bitand(t.property, 8589934592), 0, 'NO', 'YES')='NO' and
19 o.obj# = t.obj# and
20 o.owner# not in (select user# from user$
21 where name in ('SYS', 'SYSTEM', 'XDB'))
22 union
23 select pl.tabobj#, pl.lobj#, fragobj#, parentobj#, fragtype$
24 from lobfrag$ lf, partlob$ pl, tab$ t, obj$ o
25 where decode(bitand(lf.fragpro, 2048), 0, 'NO', 'YES')='YES' and
26 lf.parentobj#=pl.lobj# and pl.tabobj#=t.obj# and
27 decode(bitand(t.property, 8589934592), 0, 'NO', 'YES')='NO' and
28 o.obj# = t.obj# and
29 o.owner# not in (select user# from user$
30 where name in ('SYS', 'SYSTEM', 'XDB'))
31 union
32 select l.obj#, lc.lobj#, fragobj#, parentobj#, fragtype$
33 from lobfrag$ lf, lobcomppart$ lc, lob$ l, tab$ t, obj$ o
34 where decode(bitand(lf.fragpro, 2048), 0, 'NO', 'YES')='YES' and
35 lf.parentobj#=lc.partobj# and l.lobj#=lc.lobj# and
36 t.obj#=l.obj# and
37 decode(bitand(t.property, 8589934592), 0, 'NO', 'YES')='NO' and
38 o.obj# = t.obj# and
39 o.owner# not in (select user# from user$
40 where name in ('SYS', 'SYSTEM', 'XDB'))
41 );
42
43 feature_boolean := feature_count;
44 aux_count := feature_count;
45 END;