Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify Locked File

Status
Not open for further replies.

ChuckG

MIS
Feb 28, 2001
211
US
Got a strange issue going on.

Running Server 2000 SP4 for the server.

We have (2) NT4 Workstations which act as a interface between some wireless telnet terminals and the above server.


Basicly these terminals connect back to the NT4 workstations with items they've scanned and await a response.

The NT workstatiosn then use ODBC connections to insert/read information from the 2000 Server. (most of this is accessing Visual Foxpro 6 DBC's)

We've been having an issue of once in a while the Terminals will freeze up and if we check the logs on the NT 4 machines, we have an error basicly saying that a file is in use by another user.

Haven't been able to verify what file is in use. Looking to see if anyone has a good idea how I might be able to set something on either the server or the workstations to monitor and log the file that gets locked and who's got it locked.

The problem is, this doesn't happen every day, sometimes it happens 2-3 times in a day, sometimes not at all, hence the reason I'd like to have something running that's going to monitor and log any file locks.

Anyone have any suggestions?

Thanks
ChuckG

ChuckG
-=-=-=-
Midnight Club BBS
telnet midnight-club.org
 
Have you tried going to computer mgmt->Shared folders->Open Files. This would show you all files that are currently being accessed. Whenever you see a file is locked, you'll see which user is keeping it open.

HTH
 
Yea, I've gone in and taken a look. The problem is, by the time we know a file's been locked and can get to the server, it's not locked any longer.

That's why I was hoping for a way to log all file locks and review them after an incident.

ChuckG

ChuckG
-=-=-=-
Midnight Club BBS
telnet midnight-club.org
 
I may be mistaken, I thought that the # Locks that the open files shows should be that the file is locked against other users writing/deleting the file.

I was just looking through the open files on the 2000 server, and saw a dbf file that had 761 locks on it, from one user.

Now this "user" is the service account for those NT4 Workstations, so this might be a clue into this mystery.

But when I spoke to the programmer, he went in and opened a dbf file on that server in exclusive mode and was activly writing data into it and I refreshed the Open Files and it never said he had that file locked. So we're all a bit confused why when he had it exclusive and activly writing data, it wouldn't be locked and how/why a service account would have 761 locks on a dbf.

ChuckG

ChuckG
-=-=-=-
Midnight Club BBS
telnet midnight-club.org
 
What is this "service account" doing with the dbf? It sounds like it could be leaving connections open after doing its thing. Also, FYI, there is a difference between file locks and record locks when it comes to databases.
 
The service account (from what the programmer has told me) is writing a record into the dbf.

for example, someone with one of the telnet terminals, scans a location and says he's moving part A from location 5 to 6. The terminal comunicates that back to the NT4 workstation who uses that service account to write the record into that DBF file.

Another process continually reads that DBF for new records and when it finds it, processes it into the manufacturing system.



ChuckG
-=-=-=-
Midnight Club BBS
telnet midnight-club.org
 
The locks are prob temp files generated by the DBF file during processing and not being cleared in a timely manner. You said this is a DBF file, so are you running this under ...foxpro, clipper??? Is it possible that the app is not designed correctly to be used under a Windows server env?
 
It could also be that the programmer failed to close and destroy connections properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top