Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cannot delete dbf file (NT 4.0)

Posted on 1999-01-12
3
Medium Priority
?
1,339 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
  • 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 400 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

Technology Partners: 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

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…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

824 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