Conditions in Oracle databases where a datafile can be dropped
Conditions in Oracle databases where a datafile can be dropped
Refer to the mos article:
Unable to Drop a Datafile From the Tablespace Using Alter Tablespace Command (Document ID 1050261.1)
This datafile cannot be dropped because of any of the following conditions:
1) It must be null, otherwise it will report: ORA-03262: the file is non-empty. It is worth noting that the meaning of non-empty is that extent is assigned to a table, instead of having rows in the table.
In this case, if you use drop table xxx, you must use drop table xxx purge;
You can also use the purge table "xxx table name in the recycle bin" to purge the table when drop table xxx is used. Otherwise, the space is not released, datafile still cannot be dropped.
2) The table space cannot be the first file.
The above two can be achieved through drop tablespace.
3) it cannot be in the read-only tablespace.
4) cannot be offline, otherwise it will report: ORA-03264: cannot drop offline datafile of locally managed tablespace
For this error, the solution is:
[Oracle @ rhel63single u02] $ oerr ora 3264
03264,000 00, "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] $