Solved

Cannot delete dbf file (NT 4.0)

Posted on 1999-01-12
3
1,320 Views
Last Modified: 2006-11-17
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
Listener.

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.





0
Comment
Question by:smoyano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:poncejua
ID: 1083643
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.
0
 
LVL 3

Expert Comment

by:poncejua
ID: 1083644
If forgot to mention that the datafile must be OFFLINE.
0
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 100 total points
ID: 1083645
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question