— free spc.sql
— mdw – check free space for (possibly) stated tablespace

set veri off
set pause on
set pause ‘Any Key…>’
set pages 24
spool free_spc.lst
break on t_name skip 1
select tablespace_name t_name
      ,blocks          blocks
      ,bytes           bytes
      ,to_char(bytes/1024,’9,999,999′) k_free
from sys.dba_free_space
where tablespace_name like upper(‘&tab_space’||’%’)
and    blocks > nvl(to_number(‘&blk_lim’),0)
order by tablespace_name,blocks desc
/
spool off