-- -- free_space.sql -- by Brian Peasland -- 15 May 2001 -- -- This script will display the free space -- for each tablespace in your database. -- column bytes_alloc format 999,999,999,999 column bytes_free format 999,999,999,999 column pct_used format 990.00 SELECT f.tablespace_name, f.bytes AS bytes_free, d.bytes as bytes_alloc, ((d.bytes-f.bytes)/d.bytes)*100 as pct_used FROM (SELECT tablespace_name,SUM(bytes) AS bytes FROM dba_free_space GROUP BY tablespace_name) f, (SELECT tablespace_name,SUM(bytes) AS bytes FROM dba_data_files GROUP BY tablespace_name) d WHERE f.tablespace_name = d.tablespace_name ORDER BY 1;