Use the ALTER TABLESPACE statement to alter an existing tablespace or one or more of its datafiles or tempfiles.
See Also: for information on creating a tablespace
Prerequisites
If you have ALTER TABLESPACE system privilege, you can perform any of this statement's operations. If you have MANAGE TABLESPACE system privilege, you can only perform the following operations:
Take the tablespace online or offline
Begin or end a backup
Make the tablespace read only or read write
Before you can make a tablespace read only, the following conditions must be met:
The tablespace must be online.
The tablespace must not contain any active rollback segments. For this reason, the SYSTEM tablespace can never be made read only, because it contains the SYSTEM
rollback segment. Additionally, because the rollback segments of a
read-only tablespace are not accessible, Oracle recommends that you
drop the rollback segments before you make a tablespace read only.
The
tablespace must not be involved in an open backup, because the end of a
backup updates the header file of all datafiles in the tablespace.
Performing this function in restricted mode may help you meet these restrictions, because only users with RESTRICTED SESSION system privilege can be logged on.
Syntax
::=
filespec: See .
::=
maxsize_clause::=
storage_clause: See .
Keywords and Parameters
tablespace
Specify the name of the tablespace to be altered.
Note: For locally managed temporary tablespaces, the only clause you can specify in this statement in the ADD clause.
datafile / tempfile_clauses
The datafile and tempfile clauses let you add or modify a datafile or tempfile.
ADD DATAFILE | TEMPFILE
Specify ADD to add to the tablespace a datafile or tempfile specified by filespec.
You can add a datafile or tempfile to a locally
managed tablespace that is online or to a dictionary managed tablespace
that is online or offline. Be sure the file is not in use by another
database.See Also:
Note: For locally managed temporary tablespa