select o.owner#, t.obj#, ts.name -- unpartitioned heap tables
from sys.obj$ o, sys.tab$ t, sys.ts$ ts
where t.ts# = ts.ts#
and o.obj# = t.obj#
and bitand(t.property, 32+64+512) = 0
UNION ALL
select o.owner#, t.obj#, ts.name -- simple partitions
from sys.obj$ o, sys.tab$ t, sys.tabpart$ tp, sys.ts$ ts
where tp.ts# = ts.ts#
and t.obj# = tp.bo#
and o.obj# = t.obj#
and bitand(t.property, 32+64+512) = 32
UNION ALL
select o.owner#, t.obj#, ts.name -- composite partitions
from sys.obj$ o, sys.tab$ t,
sys.tabcompart$ tcp, sys.tabsubpart$ tsp, sys.ts$ ts
where tsp.ts# = ts.ts#
and tcp.obj# = tsp.pobj#
and t.obj# = tcp.bo#
and o.obj# = t.obj#
and bitand(t.property, 32+64+512) = 32
UNION ALL
select o.owner#, t.obj#, ts.name -- unpartitioned IOTs
from sys.obj$ o, sys.tab$ t, sys.ind$ i, sys.ts$ ts
where i.ts# = ts.ts#
and i.obj# = t.pctused$
and o.obj# = t.obj#
and bitand(t.property, 32+64+512) = 64
UNION ALL
select o.owner#, t.obj#, ts.name -- PIOTs
from sys.obj$ o, sys.tab$ t, sys.indpart$ ip, sys.ts$ ts
where ip.ts# = ts.ts#
and ip.bo# = t.pctused$
and o.obj# = t.obj#
and bitand(t.property, 32+64+512) = 32 + 64
SELECT O.OWNER#
, T.OBJ#
, TS.NAME -- UNPARTITIONED HEAP TABLES
FROM SYS.OBJ$ O
, SYS.TAB$ T
, SYS.TS$ TS
WHERE T.TS# = TS.TS#
AND O.OBJ# = T.OBJ#
AND BITAND(T.PROPERTY
, 32+64+512) = 0
UNION ALL
SELECT O.OWNER#
, T.OBJ#
, TS.NAME -- SIMPLE PARTITIONS
FROM SYS.OBJ$ O
, SYS.TAB$ T
, SYS.TABPART$ TP
, SYS.TS$ TS
WHERE TP.TS# = TS.TS#
AND T.OBJ# = TP.BO#
AND O.OBJ# = T.OBJ#
AND BITAND(T.PROPERTY
, 32+64+512) = 32
UNION ALL
SELECT O.OWNER#
, T.OBJ#
, TS.NAME -- COMPOSITE PARTITIONS
FROM SYS.OBJ$ O
, SYS.TAB$ T
,
SYS.TABCOMPART$ TCP
, SYS.TABSUBPART$ TSP
, SYS.TS$ TS
WHERE TSP.TS# = TS.TS#
AND TCP.OBJ# = TSP.POBJ#
AND T.OBJ# = TCP.BO#
AND O.OBJ# = T.OBJ#
AND BITAND(T.PROPERTY
, 32+64+512) = 32
UNION ALL
SELECT O.OWNER#
, T.OBJ#
, TS.NAME -- UNPARTITIONED IOTS
FROM SYS.OBJ$ O
, SYS.TAB$ T
, SYS.IND$ I
, SYS.TS$ TS
WHERE I.TS# = TS.TS#
AND I.OBJ# = T.PCTUSED$
AND O.OBJ# = T.OBJ#
AND BITAND(T.PROPERTY
, 32+64+512) = 64
UNION ALL
SELECT O.OWNER#
, T.OBJ#
, TS.NAME -- PIOTS
FROM SYS.OBJ$ O
, SYS.TAB$ T
, SYS.INDPART$ IP
, SYS.TS$ TS
WHERE IP.TS# = TS.TS#
AND IP.BO# = T.PCTUSED$
AND O.OBJ# = T.OBJ#
AND BITAND(T.PROPERTY
, 32+64+512) = 32 + 64
|
|
|