dba_data_files returns a record for each data file.
This view comes in the two variants dba_data_files and cdb_data_files.
select
dtf.tablespace_name,
dtf.status, -- AVAILABLE or INVALID (INVALID indicates the datafile belongs to a dropped tablespace)
dtf.autoextensible,
round(dtf.maxbytes / 1024/1024/1024, 1) max_gb, -- The value of maxbytes is 0 if autoextensibility is turned off
round(dtf.bytes / 1024/1024/1024, 1) gb,
round(dtf.user_bytes / 1024/1024/1024, 1) usr_gb,
dtf.file_name,
dtf.online_status,
dtf.blocks,
dtf.maxblocks,
dtf.user_blocks,
dtf.increment_by, -- Number of blocks the data file grows at a time if autoextensibility is enabled
dtf.lost_write_protect,
dtf.file_id,
dtf.relative_fno
from
sys.dba_data_files dtf
-- where
-- dtf.tablespace_name = '…';
order by
dtf.tablespace_name
;
The following query lists the data files that belong to a given tablespace.
select
fil.file_name,
round(fil.bytes /1024/1024,1) mb,
round(fil.maxbytes /1024/1024,1) max_mb,
round(fil.user_bytes/1024/1024,1) user_mb,
fil.status,
fil.autoextensible
from
dba_data_files fil
where
fil.tablespace_name = 'TS_01';