← Space Management
Oracle · Space Management

How to list all datafiles in Oracle

List every Oracle datafile with file id, path, size, max size, autoextend, and status from DBA_DATA_FILES.

Tested on11g12c18c19c21c23ai26ai

Flat list of every datafile in the database: file id, path, current size, max size, autoextend flag, and status. Broader view than the per-tablespace variant — useful for backup planning and disk allocation reviews.

SET LINESIZE 200
COLUMN file_name FORMAT a70

SELECT file_id,
       file_name,
       ROUND(bytes    / 1024 / 1024 / 1024) AS size_gb,
       ROUND(maxbytes / 1024 / 1024 / 1024) AS max_size_gb,
       autoextensible,
       increment_by,
       status
FROM   dba_data_files
ORDER BY file_name;
spacedatafiledba_data_files