Tablespace Usage
--
-- Tablespace Usage
--
CLEAR BREAKS
CLEAR COLUMNS
CLEAR COMPUTES
SET VERIFY OFF
COL tablespace_name HEA 'Tablespace Name' FOR a20
COL ambytecount HEA 'Available' FOR 99999999999.999
COL umbytecount HEA ' Used ' FOR 99999999999.999
SELECT ddf.tablespace_name,
SUM( distinct ddf.ddfbytes )/1048576 ambytecount,
SUM( NVL( ds.bytes , 0 ) / 1048576 ) umbytecount
FROM
( SELECT tablespace_name, SUM( bytes ) ddfbytes
FROM dba_data_files
GROUP BY tablespace_name ) ddf,
dba_segments ds
WHERE ddf.tablespace_name = ds.tablespace_name (+)
GROUP BY ddf.tablespace_name
/
Related Scripts
- Segment Space Usage By Owner
- Shows Temporary Tablespace Usage
- View Datafile Info
- Displays Space Usage for Each Datafile
- Show the High Water Mark for a Given Table
- List the Number of Extents for All Indexes for a Given Table
- List Tables with More than One Extent
- Show Gaps in Tablespace or Specific Datafile
- Displays Temp Space Currently in use by Users