? You cannot drop a tablespace if it:
– Is the SYSTEM tablespace
– Has active segments
? INCLUDING CONTENTS drops the segments.
? INCLUDING CONTENTS AND DATAFILES deletes
data files.
? CASCADE CONSTRAINTS drops all referential
integrity constraints.
DROP TABLESPACE userdata
INCLUDING CONTENTS AND DATAFILES;
语法:
DROP TABLESPACE tablespace
[INCLUDING CONTENTS [AND DATAFILES] [CASCADE CONSTRAINTS]]
where:
tablespace: Specifies the name ofthe tablespace to be dropped
INCLUDING CONTENTS: Drops all the segments in the tablespace
AND DATAFILES: Deletes the associated operating system files(这会真正os级别
删除)
CASCADE CONSTRAINTS: Drops referential integrity constraints from tables
outside the tablespace that refer to primary and unique keys in the tables in the
dropped tablespace
Guidelines
? A tablespace that still contains datacannot be dropped without the INCLUDING
CONTENTS option. This option may generate a lot of undo when the tablespace
contains many objects.
? After a tablespace has been dropped, its data is no longer in the database.
? When a tablespace is dropped, only the file pointers in the control file of the
associated database are dropped. The operating system files still exist and must be
deleted explicitly using the appropriate operating system command unless the AND
DATAFILES clause is used or data files are OMF.
?Even if a tablespace is switched to read-only, it can still be dropped, along with
segments within it.
? It is recommended that you take the tablespace offline before dropping it to ensure
that no transactions access any ofthe segments in the tablespace.
摘自参考资料与官方文档
– Is the SYSTEM tablespace
– Has active segments
? INCLUDING CONTENTS drops the segments.
? INCLUDING CONTENTS AND DATAFILES deletes
data files.
? CASCADE CONSTRAINTS drops all referential
integrity constraints.
DROP TABLESPACE userdata
INCLUDING CONTENTS AND DATAFILES;
语法:
DROP TABLESPACE tablespace
[INCLUDING CONTENTS [AND DATAFILES] [CASCADE CONSTRAINTS]]
where:
tablespace: Specifies the name ofthe tablespace to be dropped
INCLUDING CONTENTS: Drops all the segments in the tablespace
AND DATAFILES: Deletes the associated operating system files(这会真正os级别
删除)
CASCADE CONSTRAINTS: Drops referential integrity constraints from tables
outside the tablespace that refer to primary and unique keys in the tables in the
dropped tablespace
Guidelines
? A tablespace that still contains datacannot be dropped without the INCLUDING
CONTENTS option. This option may generate a lot of undo when the tablespace
contains many objects.
? After a tablespace has been dropped, its data is no longer in the database.
? When a tablespace is dropped, only the file pointers in the control file of the
associated database are dropped. The operating system files still exist and must be
deleted explicitly using the appropriate operating system command unless the AND
DATAFILES clause is used or data files are OMF.
?Even if a tablespace is switched to read-only, it can still be dropped, along with
segments within it.
? It is recommended that you take the tablespace offline before dropping it to ensure
that no transactions access any ofthe segments in the tablespace.
摘自参考资料与官方文档
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29840459/viewspace-1467308/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29840459/viewspace-1467308/