DBA Data[Home] [Help]
Skip to content

VIEW: SYS.DBA_CAPTURE_PREPARED_TABLES

Source

View Text - Preformatted

select u.name, o.name, co.ignore_scn, co.timestamp,
       decode(bitand(cd.flags, 1), 1,
              decode(bitand(co.flags, 1), 1, 'IMPLICIT', 'EXPLICIT'), 'NO'),
       decode(bitand(cd.flags, 2), 2,
              decode(bitand(co.flags, 2), 2, 'IMPLICIT', 'EXPLICIT'), 'NO'),
       decode(bitand(cd.flags, 4), 4,
              decode(bitand(co.flags, 4), 4, 'IMPLICIT', 'EXPLICIT'), 'NO'),
       decode(bitand(cd.flags, 8), 8,
              decode(bitand(co.flags, 8), 8, 'IMPLICIT', 'EXPLICIT'), 'NO')
  from obj$ o, user$ u, streams$_prepare_object co,
       (select obj#, sum(DECODE(type#, 14, 1, 15, 2, 16, 4, 17, 8, 0)) flags
          from sys.cdef$ group by obj#) cd
  where o.obj# = co.obj# and o.owner# = u.user# and co.obj# = cd.obj#(+)
    and co.cap_type = 0 and bitand(o.flags,128) = 0 -- skip recyclebin obj
View Text - HTML Formatted

SELECT U.NAME
, O.NAME
, CO.IGNORE_SCN
, CO.TIMESTAMP
, DECODE(BITAND(CD.FLAGS
, 1)
, 1
, DECODE(BITAND(CO.FLAGS
, 1)
, 1
, 'IMPLICIT'
, 'EXPLICIT')
, 'NO')
, DECODE(BITAND(CD.FLAGS
, 2)
, 2
, DECODE(BITAND(CO.FLAGS
, 2)
, 2
, 'IMPLICIT'
, 'EXPLICIT')
, 'NO')
, DECODE(BITAND(CD.FLAGS
, 4)
, 4
, DECODE(BITAND(CO.FLAGS
, 4)
, 4
, 'IMPLICIT'
, 'EXPLICIT')
, 'NO')
, DECODE(BITAND(CD.FLAGS
, 8)
, 8
, DECODE(BITAND(CO.FLAGS
, 8)
, 8
, 'IMPLICIT'
, 'EXPLICIT')
, 'NO')
FROM OBJ$ O
, USER$ U
, STREAMS$_PREPARE_OBJECT CO
, (SELECT OBJ#
, SUM(DECODE(TYPE#
, 14
, 1
, 15
, 2
, 16
, 4
, 17
, 8
, 0)) FLAGS
FROM SYS.CDEF$ GROUP BY OBJ#) CD
WHERE O.OBJ# = CO.OBJ#
AND O.OWNER# = U.USER#
AND CO.OBJ# = CD.OBJ#(+)
AND CO.CAP_TYPE = 0
AND BITAND(O.FLAGS
, 128) = 0 -- SKIP RECYCLEBIN OBJ