Solved

Cannot delete dbf file (NT 4.0)

Posted on 1999-01-12
3
1,281 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 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now