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

参考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]$

0b1331709591d260c1c78e86d0c51c18.png

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值