|
1 SQL>
2 SQL>
3 SQL> select text from dba_views where view_name like 'DBA_TABLES';
4
5 TEXT
6 --------------------------------------------------------------------------------
7 select u.name, o.name,
8 decode(bitand(t.property,2151678048), 0, ts.name,
9 decode(t.ts#, 0, null, ts.name)),
10 decode(bitand(t.property, 1024), 0, null, co.name),
11 decode((bitand(t.property, 512)+bitand(t.flags, 536870912)),
12 0, null, co.name),
13 decode(bitand(t.trigflag, 1073741824), 1073741824, 'UNUSABLE', 'VALID'),
14 decode(bitand(t.property, 32+64), 0, mod(t.pctfree$, 100), 64, 0, null),
15 decode(bitand(ts.flags, 32), 32, to_number(NULL),
16 decode(bitand(t.property, 32+64), 0, t.pctused$, 64, 0, null)),
17 decode(bitand(t.property, 32), 0, t.initrans, null),
18
19 TEXT
20 --------------------------------------------------------------------------------
21 decode(bitand(t.property, 32), 0, t.maxtrans, null),
22 decode(bitand(t.property, 17179869184), 17179869184,
23 ds.initial_stg * ts.blocksize,
24 s.iniexts * ts.blocksize),
25 decode(bitand(t.property, 17179869184), 17179869184,
26 ds.next_stg * ts.blocksize,
27 s.extsize * ts.blocksize),
28 decode(bitand(t
29
30
31 SQL> set long 2048;
32 SQL>
33 SQL>
34 SQL> select text from dba_views where view_name like 'DBA_TABLES';
35
36 TEXT
37 --------------------------------------------------------------------------------
38 select u.name, o.name,
39 decode(bitand(t.property,2151678048), 0, ts.name,
40 decode(t.ts#, 0, null, ts.name)),
41 decode(bitand(t.property, 1024), 0, null, co.name),
42 decode((bitand(t.property, 512)+bitand(t.flags, 536870912)),
43 0, null, co.name),
44 decode(bitand(t.trigflag, 1073741824), 1073741824, 'UNUSABLE', 'VALID'),
45 decode(bitand(t.property, 32+64), 0, mod(t.pctfree$, 100), 64, 0, null),
46 decode(bitand(ts.flags, 32), 32, to_number(NULL),
47 decode(bitand(t.property, 32+64), 0, t.pctused$, 64, 0, null)),
48 decode(bitand(t.property, 32), 0, t.initrans, null),
49
50 TEXT
51 --------------------------------------------------------------------------------
52 decode(bitand(t.property, 32), 0, t.maxtrans, null),
53 decode(bitand(t.property, 17179869184), 17179869184,
54 ds.initial_stg * ts.blocksize,
55 s.iniexts * ts.blocksize),
56 decode(bitand(t.property, 17179869184), 17179869184,
57 ds.next_stg * ts.blocksize,
58 s.extsize * ts.blocksize),
59 decode(bitand(t.property, 17179869184), 17179869184,
60 ds.minext_stg, s.minexts),
61 decode(bitand(t.property, 17179869184), 17179869184,
62 ds.maxext_stg, s.maxexts),
63
64 TEXT
65 --------------------------------------------------------------------------------
66 decode(bitand(ts.flags, 3), 1, to_number(NULL),
67 decode(bitand(t.property, 17179869184), 17179869184,
68 ds.pctinc_stg, s.extpct)),
69 decode(bitand(ts.flags, 32), 32, to_number(NULL),
70 decode(bitand(o.flags, 2), 2, 1,
71 decode(bitand(t.property, 17179869184), 17179869184,
72 ds.frlins_stg, decode(s.lists, 0, 1, s.lists)))),
73 decode(bitand(ts.flags, 32), 32, to_number(NULL),
74 decode(bitand(o.flags, 2), 2, 1,
75 decode(bitand(t.property, 17179869184), 17179869184,
76 ds.maxins_stg, decode(s.groups, 0, 1, s.groups)))),
77
78 TEXT
79 --------------------------------------------------------------------------------
80 decode(bitand(t.property, 32+64), 0,
81 decode(bitand(t.flags, 32), 0, 'YES', 'NO'), null),
82 decode(bitand(t.flags,1), 0, 'Y', 1, 'N', '?'),
83 t.rowcnt,
84
85
86 SQL> set long 65535;
87 SQL>
88 SQL>
89 SQL> select text from dba_views where view_name like 'DBA_TABLES';
90
91 TEXT
92 --------------------------------------------------------------------------------
93 select u.name, o.name,
94 decode(bitand(t.property,2151678048), 0, ts.name,
95 decode(t.ts#, 0, null, ts.name)),
96 decode(bitand(t.property, 1024), 0, null, co.name),
97 decode((bitand(t.property, 512)+bitand(t.flags, 536870912)),
98 0, null, co.name),
99 decode(bitand(t.trigflag, 1073741824), 1073741824, 'UNUSABLE', 'VALID'),
100 decode(bitand(t.property, 32+64), 0, mod(t.pctfree$, 100), 64, 0, null),
101 decode(bitand(ts.flags, 32), 32, to_number(NULL),
102 decode(bitand(t.property, 32+64), 0, t.pctused$, 64, 0, null)),
103 decode(bitand(t.property, 32), 0, t.initrans, null),
104
105 TEXT
106 --------------------------------------------------------------------------------
107 decode(bitand(t.property, 32), 0, t.maxtrans, null),
108 decode(bitand(t.property, 17179869184), 17179869184,
109 ds.initial_stg * ts.blocksize,
110 s.iniexts * ts.blocksize),
111 decode(bitand(t.property, 17179869184), 17179869184,
112 ds.next_stg * ts.blocksize,
113 s.extsize * ts.blocksize),
114 decode(bitand(t.property, 17179869184), 17179869184,
115 ds.minext_stg, s.minexts),
116 decode(bitand(t.property, 17179869184), 17179869184,
117 ds.maxext_stg, s.maxexts),
118
119 TEXT
120 --------------------------------------------------------------------------------
121 decode(bitand(ts.flags, 3), 1, to_number(NULL),
122 decode(bitand(t.property, 17179869184), 17179869184,
123 ds.pctinc_stg, s.extpct)),
124 decode(bitand(ts.flags, 32), 32, to_number(NULL),
125 decode(bitand(o.flags, 2), 2, 1,
126 decode(bitand(t.property, 17179869184), 17179869184,
127 ds.frlins_stg, decode(s.lists, 0, 1, s.lists)))),
128 decode(bitand(ts.flags, 32), 32, to_number(NULL),
129 decode(bitand(o.flags, 2), 2, 1,
130 decode(bitand(t.property, 17179869184), 17179869184,
131 ds.maxins_stg, decode(s.groups, 0, 1, s.groups)))),
132
133 TEXT
134 --------------------------------------------------------------------------------
135 decode(bitand(t.property, 32+64), 0,
136 decode(bitand(t.flags, 32), 0, 'YES', 'NO'), null),
137 decode(bitand(t.flags,1), 0, 'Y', 1, 'N', '?'),
138 t.rowcnt,
139 decode(bitand(t.property, 64), 0, t.blkcnt, null),
140 decode(bitand(t.property, 64), 0, t.empcnt, null),
141 t.avgspc, t.chncnt, t.avgrln, t.avgspc_flb,
142 decode(bitand(t.property, 64), 0, t.flbcnt, null),
143 lpad(decode(t.degree, 32767, 'DEFAULT', nvl(t.degree,1)),10),
144 lpad(decode(t.instances, 32767, 'DEFAULT', nvl(t.instances,1)),10),
145 lpad(decode(bitand(t.flags, 8), 8, 'Y', 'N'),5),
146
147 TEXT
148 --------------------------------------------------------------------------------
149 decode(bitand(t.flags, 6), 0, 'ENABLED', 'DISABLED'),
150 t.samplesize, t.analyzetime,
151 decode(bitand(t.property, 32), 32, 'YES', 'NO'),
152 decode(bitand(t.property, 64), 64, 'IOT',
153 decode(bitand(t.property, 512), 512, 'IOT_OVERFLOW',
154 decode(bitand(t.flags, 536870912), 536870912, 'IOT_MAPPING', null
155 ))),
156 decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
157 decode(bitand(o.flags, 16), 0, 'N', 16, 'Y', 'N'),
158 decode(bitand(t.property, 8192), 8192, 'YES',
159 decode(bitand(t.property, 1), 0, 'NO', 'YES')),
160
161 TEXT
162 --------------------------------------------------------------------------------
163 decode(bitand(o.flags, 2), 2, 'DEFAULT',
164 decode(bitand(decode(bitand(t.property, 17179869184), 17179869184,
165
166 ds.bfp_stg, s.cachehint), 3),
167 1, 'KEEP', 2, 'RECYCLE', 'DEFAULT')),
168 decode(bitand(o.flags, 2), 2, 'DEFAULT',
169 decode(bitand(decode(bitand(t.property, 17179869184), 17179869184,
170
171 ds.bfp_stg, s.cachehint), 12)/4,
172 1, 'KEEP', 2, 'NONE', 'DEFAULT')),
173 decode(bitand(o.flags, 2), 2, 'DEFAULT',
174
175 TEXT
176 --------------------------------------------------------------------------------
177 decode(bitand(decode(bitand(t.property, 17179869184), 17179869184,
178
179 ds.bfp_stg, s.cachehint), 48)/16,
180 1, 'KEEP', 2, 'NONE', 'DEFAULT')),
181 decode(bitand(t.flags, 131072), 131072, 'ENABLED', 'DISABLED'),
182 decode(bitand(t.flags, 512), 0, 'NO', 'YES'),
183 decode(bitand(t.flags, 256), 0, 'NO', 'YES'),
184 decode(bitand(o.flags, 2), 0, NULL,
185 decode(bitand(t.property, 8388608), 8388608,
186 'SYS$SESSION', 'SYS$TRANSACTION')),
187 decode(bitand(t.flags, 1024), 1024, 'ENABLED', 'DISABLED'),
188
189 TEXT
190 --------------------------------------------------------------------------------
191 decode(bitand(o.flags, 2), 2, 'NO',
192 decode(bitand(t.property, 2147483648), 2147483648, 'NO',
193 decode(ksppcv.ksppstvl, 'TRUE', 'YES', 'NO'))),
194 decode(bitand(t.property, 1024), 0, null, cu.name),
195 decode(bitand(t.flags, 8388608), 8388608, 'ENABLED', 'DISABLED'),
196 case when (bitand(t.property, 32) = 32) then
197 null
198 when (bitand(t.property, 17179869184) = 17179869184) then
199 decode(bitand(ds.flags_stg, 4), 4, 'ENABLED', 'DISABLED')
200 else
201 decode(bitand(s.spare1, 2048), 2048, 'ENABLED', 'DISABLED')
202
203 TEXT
204 --------------------------------------------------------------------------------
205 end,
206 case when (bitand(t.property, 32) = 32) then
207 null
208 when (bitand(t.property, 17179869184) = 17179869184) then
209 decode(bitand(ds.flags_stg, 4), 4,
210 case when bitand(ds.cmpflag_stg, 3) = 1 then 'BASIC'
211 when bitand(ds.cmpflag_stg, 3) = 2 then 'OLTP'
212 else decode(ds.cmplvl_stg, 1, 'QUERY LOW',
213 2, 'QUERY HIGH',
214 3, 'ARCHIVE LOW',
215 'ARCHIVE HIGH') end,
216
217 TEXT
218 --------------------------------------------------------------------------------
219 null)
220 else
221 decode(bitand(s.spare1, 2048), 0, null,
222 case when bitand(s.spare1, 16777216) = 16777216
223 then 'OLTP'
224 when bitand(s.spare1, 100663296) = 33554432 -- 0x2000000
225 then 'QUERY LOW'
226 when bitand(s.spare1, 100663296) = 67108864 -- 0x4000000
227 then 'QUERY HIGH'
228 when bitand(s.spare1, 100663296) = 100663296 -- 0x2000000+0x400000
229 0
230
231 TEXT
232 --------------------------------------------------------------------------------
233 then 'ARCHIVE LOW'
234 when bitand(s.spare1, 134217728) = 134217728 -- 0x8000000
235 then 'ARCHIVE HIGH'
236 else 'BASIC' end)
237 end,
238 decode(bitand(o.flags, 128), 128, 'YES', 'NO'),
239 decode(bitand(t.trigflag, 2097152), 2097152, 'YES', 'NO'),
240 decode(bitand(t.property, 17179869184), 17179869184, 'NO',
241 decode(bitand(t.property, 32), 32, 'N/A', 'YES')),
242 decode(bitand(t.property,16492674416640),2199023255552,'FORCE',
243 4398046511104,'MANUAL','DEFAULT')
244
245 TEXT
246 --------------------------------------------------------------------------------
247 from sys.user$ u, sys.ts$ ts, sys.seg$ s, sys.obj$ co, sys.tab$ t, sys.obj$ o,
248 sys.obj$ cx, sys.user$ cu, x$ksppcv ksppcv, x$ksppi ksppi,
249 sys.deferred_stg$ ds
250 where o.owner# = u.user#
251 and o.obj# = t.obj#
252 and bitand(t.property, 1) = 0
253 and bitand(o.flags, 128) = 0
254 and t.bobj# = co.obj# (+)
255 and t.ts# = ts.ts#
256 and t.obj# = ds.obj# (+)
257 and t.file# = s.file# (+)
258
259 TEXT
260 --------------------------------------------------------------------------------
261 and t.block# = s.block# (+)
262 and t.ts# = s.ts# (+)
263 and t.dataobj# = cx.obj# (+)
264 and cx.owner# = cu.user# (+)
265 and ksppi.indx = ksppcv.indx
266 and ksppi.ksppinm = '_dml_monitoring_enabled'
267
268
269 SQL>
270 SQL> |
|