1. Benefits of Automatic data file expansion
1) does not appear because there is no remaining space available to the data cannot be written
2) Minimize man-made maintenance
3) can be used in databases where important levels are not very large, such as test databases, etc.
2. The drawbacks of automatic data file extension
1) If you allow it to expand, it can cause a data file to become abnormally large in the process of increasing the volume of data
2) databases that are not managed by people are very dangerous.
3. Query whether the table space sec_d in the current database is auto-extended
[Email protected]> Select tablespace_name,file_name,autoextensible from dba_data_files where tablespace_name = ' SEC_ D ';
Tablespace_name file_name AUT
----------------- ----------------------------------------- ---
SEC_D/U01/APP/ORACLE/ORADATA/ORCL/SEC_D01.DBF NO
4. By modifying the Sec_d data file to automatically expand to the table space Sec_d for automatic expansion purposes
[Email protected]> ALTER DATABASE datafile '/U01/APP/ORACLE/ORADATA/ORCL/SEC_D01.DBF ' autoextend on;
Database altered.
5. Confirm that the modification was successful
[Email protected]> Select tablespace_name,file_name,autoextensible from dba_data_files where tablespace_name = ' SEC_ D ';
Tablespace_name file_name AUT
----------------- ----------------------------------------- ---
SEC_D/U01/APP/ORACLE/ORADATA/ORCL/SEC_D01.DBF YES
6. Summarize modification statement syntax
To turn on the auto-expand feature Syntax:
ALTER DATABASE datafile ' corresponding data file path information ' autoextend on;
Turn off the auto-extend feature syntax:
ALTER DATABASE datafile ' corresponding data file path information ' autoextend off;
Oracle Modified table space is automatically extended