Modify tablespaces (modify the automatic scalability of data files) and Data scalability
Modify tablespaces (modify the automatic scalability of data files)
When creating a tablespace, you can set the automatic scalability of the data file. When a new data file is added to the tablespace
You can set Automatic scalability for new data files. You can use
Alter database statement to modify its automatic scalability. Its syntax is as follows:
Alter database datafile file_name autoextend off | on [next number K | M maxsize
Unlimited | number K | M]
Modify the status of data files in a tablespace
There are three main statuses of data files: onlne, offline, and offline drop. Syntax for setting the data file status
As follows:
Alter database datafile file_name online | offline drop
Online indicates the online status. In this case, the data file can be used. offline indicates the offline status.
Files are not available and used when the database is running in archive mode. offline drop deletes the data file
The same as offline is used to set that the data file is unavailable, but it is used when the database runs in non-archive mode.
When the data file is set to offline, The tablespace status is not affected, but the tablespace status is set
When the table is in the offline status, all data files belonging to the tablespace are in the offline status by ushezhi.
The specific operations are as follows:
SQL> alter database datafile 'f: \ oracledata \ myspace2.dbf'
2 autoextend on
3 next 5 m maxsize 50 m;
The database has been changed.
SQL> alter database datafile 'f: \ oracledata \ myspace2.dbf' offline;
SQL> alter database datafile 'f: \ oracledata \ myspace2.dbf' online;