Refer to MOS article:
Unable to Drop a datafile from the tablespace Using Alter tablespace Command (document ID 1050261.1)
Any of the following conditions cannot be datafile by a drop
1) must be empty, otherwise it will be reported: Ora-03262:the file is non-empty. It is important to note that the meaning of non-empty is that there is a extent assigned to table instead of rows in the table.
If you do not use drop table xxx at this time, you must use the drop table XXX purge;
Or if the drop table xxx has been used, and then use purge table "XXX table in the Recycle Bin name" to purge the table, otherwise the space is still not released, DataFile still drop.
2) cannot be the first file of the owning table space
Both of these can be achieved by drop tablespace.
3) cannot be in the Read-only table space.
4) can not be offline, otherwise will be reported: Ora-03264:cannot drop offline datafile of locally managed tablespace
For this error, the workaround is:
[Email protected] 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
[Email protected] u02]$
In Oracle database, the condition that a datafile can be drop