参考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来达到目的。