dbadata.sql

 


 rem ======================================================================
 rem Name:  dbadata.sql
 rem Desc:  Tablespace Sizes
 rem
 rem ======================================================================
 
 rem Set the general display parameters for the report:
 set pages 55
 set lines 79
 set pause off
 set echo off
 set feed 1
 set termout on
 
 rem Capture the current date and time:
 set termout off
 col currdate new_value now
 select to_char(sysdate, 'mm/dd/yy hh24:mi') currdate from dual;
 set termout on
 
 rem The title for the report:
 ttitle left   "dbadata.sql" -
        center "dba_data_files info" -
        right  "Page:" sql.pno  skip 1 -
        right  "Date: " now  skip 3 
 
 col file_name form a45 head 'DATA FILE'
 col tablespace_name form a8 head 'NAME'
 col bytes 999,999,999,999 head 'BYTES'
 col status form a10 head 'STATUS'
 
 select file_name, tablespace_name, bytes, status
  from dba_data_files ;
 
 spool dbadata.lst
 /
 spool off
 
 exit