이 정보는 10g에 있지만, 전혀 노출되지 않았습니다. 그래서 몇 가지 옵션 만 있습니다.
dba_source가있을 것이다 (그에만 ALL 뷰가 아닌 DBA/USER 하나를 11g의 그들은 최근의 패치에 있음을 추가 한 경우 제외)하지만, SQL의 수동 구문 분석은 그게 전부 나가 .
당신은 $를 sys.attribute (이 오라클에 의해 지원되지 않을지라도) decode(bitand(properties, 4096), 4096, 'C', 'B')
는 기존 * type_attr 전망을 수정할 수 있습니다 추출 조인 새보기를 만들 수 있습니다. 뷰 선택 부분에 decode(bitand(a.properties, 4096), 4096, 'C', 'B')
을 추가하기 만하면됩니다. 여기서 "a"는 sys.attribute $에 대한 참조입니다.
새로운 뷰의 일례
..
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> create view type_chars
2 as
3 select ta.owner, ta.type_name, ta.attr_name, decode(bitand(a.properties, 4096), 4096, 'C', 'B') char_used
4 from sys.attribute$ a, sys.type$ t, sys.obj$ o, dba_objects ob, dba_type_attrs ta
5 where ta.owner = ob.owner
6 and ta.type_name = ob.object_name
7 and a.toid = t.toid
8 and a.version# = t.version#
9 and t.toid = o.oid$
10 and o.subname is null
11 and ob.object_id = o.obj#
12 and a.name = ta.attr_name;
View created.
SQL> create type mytype as object (a varchar2(20), b number, c varchar2(30 char));
2/
Type created.
SQL> select * from type_chars where type_name = 'MYTYPE' and owner= user;
OWNER TYPE_NAME ATTR_NAME C
------------------------------ ------------------------------ ------------------------------ -
DTD_TRADE MYTYPE A B
DTD_TRADE MYTYPE B B
DTD_TRADE MYTYPE C C
SQL>