tabsztsp.sql

--==================================================================
--
-- Title       :   tabsztsp.sql
-- Description :   To display all segments stored in the requested
--                 tablespace, and summation of size of those
--                 segments.
--
-- Usage/Notes : 
-- 
-- Copyright :   ABCdba.com 2008 
--
--==================================================================
 
CLEAR BREAKS
CLEAR COLUMNS
CLEAR COMPUTES
 
SET PAUSE ON
SET PAUSE More...
SET VERIFY OFF
 
COL owner HEA "Owner" FOR a10
COL segment_name HEA "Name" FOR a24 TRUNC
COL segment_type HEA "Type" FOR a8
 
COL tablespace_name HEA "Tablespace" FOR a10 TRUNC
COL mbytes HEA "Mbytes" FOR 999999.999
COL extents HEA "Extents" FOR 99999
 
BREAK ON owner ON tablespace_name ON segment_type ON REPORT
 
COMPUTE SUM OF mbytes ON REPORT
 
SELECT owner, segment_type, tablespace_name, segment_name,
        ( bytes/1048576 ) mbytes, extents
FROM dba_segments
WHERE tablespace_name = UPPER('&Tablespace')
ORDER BY owner, tablespace_name, segment_type, segment_name
/
 
SET VERIFY ON
SET PAUSE OFF

© copyright 2001-2014 ABCdba.com | all rights reserved