← Space Management
Oracle · Space Management
How to enable autoextend on a datafile in Oracle
Enable autoextend on an Oracle datafile with a growth step and a max size, then verify.
Tested on11g12c19c21c23ai26ai
Let a datafile grow on its own up to a ceiling instead of erroring when it fills.
This changes datafile growth behavior. Review the increment and max size before running.
ALTER DATABASE DATAFILE '&&datafile_path'
AUTOEXTEND ON NEXT 256M MAXSIZE 16G;
-- To turn it off:
-- ALTER DATABASE DATAFILE '&datafile_path' AUTOEXTEND OFF;
-- Verify (read-only)
SELECT file_name, autoextensible, ROUND(bytes/1024/1024) AS size_mb,
ROUND(maxbytes/1024/1024) AS max_mb, increment_by
FROM dba_data_files
WHERE file_name = '&datafile_path';datafileautoextendalter-database