I need to get rid off a data file which created mistakenly, the db is Oracle 10g R2. May I do the following?
alter tablespace abc drop datafile '/abc.dbf'
The data file abc.dbf is in offline (needs recovery) state and 0 byte. Since it is offlined, I think it can’t be dropped this way, so what’s your suggestions?
I would try to bring it back online first, then drop.
you’ll get an ORA error saying that the file needs recovery, do that
bring it online and drop it then
If that doesn’t work for you, do either of:
Note: if you go with dropping the tablespace, don’t forget to also specify to drop the datafiles with it.