set linesize 200
set pages 40
--
break on report
compute sum of tot_GB tot_freeGB on report
col tablespace_name format A30 heading tablespace
col tot_GB format 999,999,999,999.99
col tot_freeGB format 999,999,999.99
col Kb_max format 999,999,999
select f.tablespace_name
,f.bytes/1024/1024/1024 tot_GB
,sum(nvl(s.bytes,0)/1024/1024/1024) tot_freeGB
,max(nvl(s.bytes,0)/1024) maxextent_freeKB
,( (sum(nvl(s.bytes,0)/1024/1024/1024)) / (f.bytes/1024/1024/1024) )*100 Pct_available
from dba_data_files f
,dba_free_space s
where f.file_id = s.file_id(+)
group by f.tablespace_name, f.bytes/1024/1024/1024
order by 2 desc ;
|