2

I need help deleting a DB file from Oracle. I suppose I should use the DROP command, but I cannot make it work.

I tried dropping all the users, except system user, from dba_users, hoping that this will result in getting rid of the databases, but I find that some .dbf file is still there.

Can someone give me an example for dropping .dbf file?

karla
  • 259

2 Answers2

1

Database files in Oracle typically represent a table space, so you'll need to use the DROP TABLESPACE command.

IMPORTANT NOTE: Do not try to delete these files outside of Oracle, or else Oracle might not start at all.

An example could be:

  • DROP TABLESPACE tablespace_name;

You shouldn't need to drop users or any other objects for this to work (if there are any dependencies, Oracle will let you know when you attempt to drop the table space).

-1

ALTER DATABASE DATAFILE 'C:\ORACLE\PRODUCT\ORADATA\UKOUG\DATAFILE\O1_MF_USERS_35HCKNFO_.DBF' OFFLINE DROP;