在oracle database中,一個datafile 可以被drop的條件,databasedatafile

來源:互聯網
上載者:User

在oracle database中,一個datafile 可以被drop的條件,databasedatafile

參考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 326403264, 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]$ 

5) Cannot be a datafile that is part of the system tablespace, even if it is not the first datafile of the system tablespace
--該條來源於How to Drop a Datafile From a Tablespace (文檔 ID 111316.1) 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.