DBA Data[Home] [Help]
Skip to content

VIEW: SYS.TBS_SPACE_USAGE

Source

View Text - Preformatted

select tsq$.ts#, tsq$.user#,
          NVL(sum(decode(bitand(seg$.spare1, 131072), 131072, seg$.blocks,
                         (decode(bitand(seg$.spare1, 1), 1,
                            dbms_space_admin.segment_number_blocks(tsq$.ts#,
                                   seg$.file#, seg$.block#, seg$.type#,
                                   seg$.cachehint, seg$.spare1,
                                   seg$.hwmincr, seg$.blocks), seg$.blocks)))),
              0),
          tsq$.maxblocks
from seg$, tsq$
where tsq$.ts# = seg$.ts# (+)
and   tsq$.user# = seg$.user# (+)
group by tsq$.ts#, tsq$.user#, tsq$.maxblocks
View Text - HTML Formatted

SELECT TSQ$.TS#
, TSQ$.USER#
, NVL(SUM(DECODE(BITAND(SEG$.SPARE1
, 131072)
, 131072
, SEG$.BLOCKS
, (DECODE(BITAND(SEG$.SPARE1
, 1)
, 1
, DBMS_SPACE_ADMIN.SEGMENT_NUMBER_BLOCKS(TSQ$.TS#
, SEG$.FILE#
, SEG$.BLOCK#
, SEG$.TYPE#
, SEG$.CACHEHINT
, SEG$.SPARE1
, SEG$.HWMINCR
, SEG$.BLOCKS)
, SEG$.BLOCKS))))
, 0)
, TSQ$.MAXBLOCKS FROM SEG$
, TSQ$ WHERE TSQ$.TS# = SEG$.TS# (+) AND TSQ$.USER# = SEG$.USER# (+) GROUP BY TSQ$.TS#
, TSQ$.USER#
, TSQ$.MAXBLOCKS