• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1357
  • Last Modified:

Cannot delete dbf file (NT 4.0)

We are running oracle 7.34 on Windows NT (4.0 SP3).

I am unable to delete or rename dbf file. The db is
shutdown but I get the following OS message:

Cannot delete filename: there has been a sharing violation. The source or destination file may be in use.

Windows NT diagnostics shows that Oracle service for
the instance is running, as is Oracle Start and Oracle TNS

Do one or all of these services have to be terminated to free the lock on the file? If so, should I delete them from the Oracle instance manager? Or could another service be locking down the file?

Thanks much for your time and help.

  • 2
1 Solution
If the Oracle Instance service is started surely you can't make any move on your datafiles. Also you can't delete them from the Instance Manager because your instance is closed.

Do you drop the tablespace involved with the datafile you want to delete ? Let me suggest you to execute the following statement before to delete the datafile:

alter database backup controlfile to trace;

This command generates a file in your "udump" directory. This file shows you which datafiles are active for your instance. If the datafile you want to delete isn't in the file you can delete it without problems.

Don't hesitate to contact me directly to my e-mail address: jmponcemartinez@hotmail.com.
If forgot to mention that the datafile must be OFFLINE.
Mark GeerlingsDatabase AdministratorCommented:
Yes, you do need to shut down the Oracle Service after dropping the tablespace and shutting down the instance when running Oracle on NT.  Use the NT "Services" from the Control Panel.  The service keeps a lock on the file for some time at least (I've never figured out how long).  Be careful! You may want to rename the datafile first, then restart Oracle and make sure everything is OK.  At that point, you can delete the now unused file even with the database open.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now