Find the column of a LOB (even in dropped objects)

select u.name, o.name TABLENAME, decode(bitand(c.property, 1), 1, ac.name, c.name) as column_name,s.bytes/1024/1024 MB
from sys.obj$ o, sys.col$ c, sys.attrcol$ ac,sys.lob$ l,sys.obj$ lo,sys.obj$ io,
sys.user$ u,sys.ts$ ts, DBA_SEGMENTS s  
where o.owner# = u.user#
and o.obj# = c.obj#
and c.obj# = l.obj# and c.intcol# = l.intcol#
and l.lobj# = lo.obj# and l.ind# = io.obj# and l.ts# = ts.ts# and c.obj# =
ac.obj#(+)
and c.intcol# = ac.intcol#(+) and lo.name = s.SEGMENT_name
ORDER BY s.bytes DESC fetch FIRST 10 ROW ONLY;

Leave a Reply

Your email address will not be published. Required fields are marked *