Find Autoextensible Datafiles in Oracle Database (SQL Included)

How to Find Autoextensible Datafiles in Oracle Database (SQL Included)

Are you managing an Oracle database and want to identify datafiles configured for automatic extension? This post will guide you through a simple SQL query to achieve that. We'll break down the code, explain its purpose, and offer valuable insights into autoextensible datafiles.

Sample SQL Command

1select	file_name
2from	dba_data_files
3where	autoextensible = 'YES'


The provided SQL code retrieves a list of filenames for datafiles that are set to autoextend in your Oracle database.


  • SELECT file_name: This clause specifies the column we want to retrieve data from, which is the file_name of the datafile.
  • FROM dba_data_files: This clause defines the source table from which we'll extract data. The dba_data_files is a built-in view that provides information about datafiles in the database.
  • WHERE autoextensible = 'YES': This clause filters the results to only include datafiles where the autoextensible column value is set to 'YES'. This indicates the datafile is configured to automatically grow when it reaches its current size.

Key Points:

  • This query requires appropriate privileges to access the dba_data_files view.
  • The autoextensible property can be enabled or disabled for individual datafiles.
  • Autoextensible datafiles can be useful for accommodating growing data volumes but require monitoring to avoid excessive disk usage.


  • Identifying autoextensible datafiles helps you understand your database's storage configuration and potential growth patterns.
  • It's essential to monitor the size and free space of autoextensible datafiles to ensure sufficient disk space is available for expansion.


The query leverages the dba_data_files view, which offers comprehensive details about datafiles within the database. We filter this data using the WHERE clause to focus specifically on datafiles with the autoextensible property set to 'YES'. This effectively isolates the filenames of datafiles configured for automatic extension.


By running this SQL code and understanding the concepts behind it, you can effectively identify and manage autoextensible datafiles in your Oracle database.


You can find more information about the dba_data_files view in the Oracle documentation:

For a deeper understanding of autoextensible datafiles, refer to the Oracle documentation on datafile management:

Posts in this series