你好,游客 登录 注册 搜索
背景:
阅读新闻

在Oracle数据库中一个datafile 可以被drop的条件

[日期:2015-02-21] 来源:Linux社区  作者:msdnchina [字体:大 中 小]

参考mos文章:
Unable to Drop a Datafile From the Tablespace Using Alter Tablespace Command (文档 ID 1050261.1)

违反下列任何一个条件,该datafile均不能被drop


1)必须为空,否则会报:ORA-03262: the file is non-empty。值得注意的是,non-empty的含义是有extent被分配给了table,而不是该table中有无rows
此时若是使用drop table xxx是不行的,必须使用 drop table xxx purge;
或者在已经使用了drop table xxx的情况下,再使用purge table “xxx表在回收站中的名称”来purge该表,否则空间还是不释放,datafile依然drop不掉。

2)不能是所属表空间的第一个file
  以上两者可以通过drop tablespace来达到目的。

3)不能在read-only表空间中。
4)不能被offline,否则会报:ORA-03264: cannot drop offline datafile of locally managed tablespace
 针对该报错,解决方法为:
[Oracle@rhel63single u02]$ oerr ora 3264
03264, 00000, "cannot drop offline datafile of locally managed tablespace"
// *Cause:  Trying to drop offline datafile in lmts
// *Action: Try to drop file afetr making it online
[oracle@rhel63single u02]$

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-02/113775.htm

linux
相关资讯       Oracle datafile 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款