/* ************************************************ */
/*                                                  */
/* fnctn:   FREE200 - TS Free Space Report          */
/*                                                  */
/* name:    @c:\oracle\sql\free200.sql              */
/* date:    12-MAY-95                               */
/* creator: Rick Kupcunas (Oracle)                  */
/*                                                  */
/* ************************************************ */

set feedback  off
set wrap      off
set pagesize  60
set space     4 
set linesize  75 
set newpage   0
set trimout   on
set verify    on
set underline =
set echo      off
set termout   off

whenever sqlerror exit failure
spool free200.rslt

ttitle left "PAGE:" sql.pno format 999 -
  center 'FREE200 - TS Free Space Report ' right CWS_DATE skip 2

break on tablespace_name skip 2
column tablespace_name     format a8          heading Tblspace
column file_id             format 99          heading 'File Id'
column block_id            format 999999      heading 'Start Block'
column block_id+blocks     alias EndBlock
column EndBlock            format 999999      heading 'End Block'
column bytes               format 999,999,999 heading Bytes 
column blocks              format 999,999     heading Blocks 

select tablespace_name, 
     file_id, 
     block_id, 
     block_id+blocks, 
     bytes, 
     blocks
from sys.dba_free_space
where tablespace_name <> 'SYSTEM'
order by tablespace_name, file_id, block_id;

spool off
exit
