drop tablespace

? 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. 

摘自参考资料与官方文档

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29840459/viewspace-1467308/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29840459/viewspace-1467308/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值