/* ************************************************ */
/*                                                  */
/* format the report:                               */
/*        DBAFILES - DATA FILES REPORT              */
/*                                                  */
/* name:    @c:\oracle\sql\dbafiles.sql             */
/* date:    12-MAY-95                               */
/* creator: Rick Kupcunas (Oracle)                  */
/*                                                  */
/* ************************************************ */

set WRAP      off
set linesize  76
set newpage   0
set pagesize  62
set trimout   on
set verify    on
set wrap      off
set echo      off
set termout   off

whenever sqlerror exit failure
spool dbafiles.rslt

ttitle left "PAGE:" sql.pno format 999 -
center 'DBAFILES - DATA FILES REPORT ' right CWS_DATE skip 2
 column file_name        format A39
 column tablespace_name  format A8 heading Tablespace
 column status           format A5
 column bytes            format 999,999,999
 column blocks           format 999,999

 compute sum of bytes  on tablespace_name
 compute sum of blocks on tablespace_name

 break   on  tablespace_name skip 1

select tablespace_name,
      file_name,
      status,
      bytes,
      blocks
from sys.dba_data_files
order by 1 asc,
       2 asc;

spool off;
