Solved

Cannot delete dbf file (NT 4.0)

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

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.

Join & Write a Comment

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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.

707 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

17 Experts available now in Live!

Get 1:1 Help Now