Solved

Sharing violation on NT

Posted on 2001-06-26
8
345 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
ID: 6227203
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
ID: 6227655
you could try installing HandleEx from Sysinternal.com
0
 

Expert Comment

by:cordel417
ID: 6229465
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
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!

 
LVL 3

Expert Comment

by:gcauthon
ID: 6231225
try this from the command line:

net stop server
del msaccessfile
net start server

0
 

Author Comment

by:widya
ID: 6233659
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
ID: 6238534
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
ID: 6339602
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
ID: 6379559
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

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

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…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

679 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