datafile4.sql

rem  dfile.sql
rem
rem  linesize = 132
rem
set linesize 132
rem
ttitle 'Data Files by Tablespace'
rem
col tablespace_name format a15 heading 'TABLESPACE'
col file_id format 999 heading 'ID'
col bytes format 9,999,999,999
col blocks format 9,999,999
col status format a9
col file_name format a65 heading 'FILE NAME'
rem
break on tablespace_name
rem
select tablespace_name, file_id, bytes, blocks,
       decode( status, 'AVAILABLE', null, status ) status, file_name
  from sys.dba_data_files
 order by tablespace_name, file_id;
rem
set linesize 80