Solved

Sharing violation on NT

Posted on 2001-06-26
8
341 Views
Last Modified: 2013-12-28
I have an MS Access file on Windows NT 4.0 server that cannot be open, deleted or renamed. Anyway, when I copy this file to other directory it can be open, rename, etc. as usual. when I deleted it, no matter in Explorer or in Command line box, it said there's a "sharing violation".

I have taken the ownership of this file, taken ownership of every file in that directory, then, I removed a share on that directory. It didn't work. So,

1. How can I solve this problem? Does rebooting help?
2. How to prevent or identify which files now having this problem (my network has a lot of files that not so frequently used but when it is, it's urgent.)

Thank you in advance
Widya
0
Comment
Question by:widya
8 Comments
 
LVL 1

Expert Comment

by:greebo
Comment Utility
Widya,

Go to Administrative Tools > Server Manager then double-click on the machine you wish to view and go to 'In Use', and you will see all the files that are open and which have been locked, you will also get the opportunity to close the open files.

Hope this helps
0
 

Expert Comment

by:degrea
Comment Utility
you could try installing HandleEx from Sysinternal.com
0
 

Expert Comment

by:cordel417
Comment Utility
Another way is if you have access to the server go into [Control Panel] double click [Server] and click [In Use]
It will show you if a computer or user over the network has the file locked. Also look for a file in the same Directory that has a ".ldb" extension which is a file that keeps track of what is locked in your data base. I don't think this file would be the cause of the problem your having. I have had this problem in the past but I don't remember what the fix was.
0
 
LVL 3

Expert Comment

by:gcauthon
Comment Utility
try this from the command line:

net stop server
del msaccessfile
net start server

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:widya
Comment Utility
I have already restarted the server now. It solves the problem but It's not a good choice because I had to kick out every users. :( There're only 6 users have access to that file and all were offline. I saw no .ldb and no users connected to the resource (I've already tried what you told me, except the HandleEx, before i ask this question) so I was so sure no one accessed it while the problem persisted. So, could you tell me how NT locks the file? And How to solve it without restart the server. If it's not possible, how to prevent it?

Thank you,
widya
0
 

Expert Comment

by:Lemonkid
Comment Utility
I've had this happen when a user has a file open and their PC crashes or drops off the network. The problem's then due to the fact that the file is registered as opened by that user and a sharing violation error ensues.

It cannot be prevented if a pc crashes, to resolve it replace with copy from backup, or copy and after a period of time you'll be able to delete the file.

Lem
0
 
LVL 10

Accepted Solution

by:
Longbow earned 100 total points
Comment Utility
Hi,

Use the Net File /? command from the server.

Net File | find filename.exe
You will have an id, the status (locked or not) and who is using the file
Use Net File ID /Close then you may open it.

Longbow
0
 

Author Comment

by:widya
Comment Utility
Sorry for rejecting your answer but I have a reason to do so.

1. the situation about crash workstation(s) locks the files, rendering the files useless will happen (due to my exp.) only when that station has accessed it exclusively and this file is never open exclusively. It used to happen once and at that time, users can still read the files but they cannot write anything into it.

2. Since it's totally locked. restore from backup cannot replace the file because noone, including backup operator can change the file.

Anyway, I thank you for your genorosity.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Update 11/3/2014 - Although the below article will get you to relocate the WINSXS folder, Microsoft has finally released a utility to reduce the size of the WINSXS folder. For some reason, it's not that straightforward. It only works on Windows 2008…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

762 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

9 Experts available now in Live!

Get 1:1 Help Now