Modify Tablespace (Modify automatic extensibility of data files)
When you create a table space, you can set the automatic extensibility of the data file. When you add a new data file to a tablespace, you also
You can set the automatic extensibility of new data files. For existing data files in the created tablespace, you can use the
The ALTER DATABASE statement modifies its automatic extensibility with the following syntax:
ALTER DATABASE datafile file_name autoextend off|on[next number k| M maxsize
Unlimited|number k| M
Modifying the state of a data file in a table space
There are three main states of data files, Onlne,offline and offline drop. Syntax for setting data file status
As follows:
ALTER DATABASE datafile file_name online|offline|offline drop
Where online indicates the presence of a data file that can be used, offline represents an offline state, and the data
The file is not available for use in the case where the database is running in archive mode, offline drop deletes the data file, and
Offline is used to set the data file to be unavailable, but it is used in cases where the database is running in a non-archive mode.
When the data file is set to the offline state, the state of the tablespace is not affected, but the table space is set to
Offline state, all data files that belong to the tablespace will be ushezhi to the offline state.
The following are the specific actions:
sql> ALTER DATABASE datafile ' F:\\ORACLEDATA\MYSPACE2.DBF '
2 Autoextend on
3 Next 5m maxsize 50m;
The database has changed.
sql> ALTER DATABASE datafile ' F:\\ORACLEDATA\MYSPACE2.DBF ' offline;
sql> ALTER DATABASE datafile ' F:\\ORACLEDATA\MYSPACE2.DBF ' online;
Modify Tablespace (Modify automatic extensibility of data files)