Question Database file locked/in use (1 Viewer)

TJBernard

Registered User.
Local time
Today, 05:19
Joined
Mar 28, 2002
Messages
176
I have a strange issue.

I have an MS Access .mde file that seems to have corrupted on me. The .mde file sits on a network server, and when I try to open the database I get the message...

"The database Cars.mde is read only.

You won't be able to save changes made to data or object definitions in this database."

It appears that a user has locked the database accidentally. But in fact, I can check the processes and there is no one in the .mde file. Add to this, there is no locking file for the .mde file.

I have tried to compact and repair the .mde, and I just get an error saying I cannot compact and repair the file becaue it is read only.

To get around the error, I just created a new .mde file, with a slightly different name "cars_08.mde" and had the users point to the new .mde file. All the issues are resolved.

But now I am trying to figure out how to kill the process locking the .mde file up, so I can delete it off the network server.

Has anyone run into this issue, and if so, is there anyway I can delete the file or kill the locking process?

Thank you for your time.

T.J.
 

donbettis

Old User Gone Astray
Local time
Today, 00:19
Joined
Jan 23, 2001
Messages
103
It sounds like the properties of the orginal file itself may have been set to read only. Right click the file...go to properties and see if is has been set to Read Only.

I have had this happen several times...
 

TJBernard

Registered User.
Local time
Today, 05:19
Joined
Mar 28, 2002
Messages
176
It sounds like the properties of the orginal file itself may have been set to read only. Right click the file...go to properties and see if is has been set to Read Only.

I have had this happen several times...

Thank you for your time. I forgot to include that I had check this as well. The file is not read only.

It is like a user was in the database, and some how did not close it correctly (maybe a Ctrl - Alt - Del) and it corrupted the file.

I am not sure, this DB has been around for almost 3 years, and this is the first issue we have had like this.
 

MSAccessRookie

AWF VIP
Local time
Today, 00:19
Joined
May 2, 2008
Messages
3,428
I have a strange issue.

I have an MS Access .mde file that seems to have corrupted on me. The .mde file sits on a network server, and when I try to open the database I get the message...

"The database Cars.mde is read only.

You won't be able to save changes made to data or object definitions in this database."

It appears that a user has locked the database accidentally. But in fact, I can check the processes and there is no one in the .mde file. Add to this, there is no locking file for the .mde file.

I have tried to compact and repair the .mde, and I just get an error saying I cannot compact and repair the file becaue it is read only.

To get around the error, I just created a new .mde file, with a slightly different name "cars_08.mde" and had the users point to the new .mde file. All the issues are resolved.

But now I am trying to figure out how to kill the process locking the .mde file up, so I can delete it off the network server.

Has anyone run into this issue, and if so, is there anyway I can delete the file or kill the locking process?

Thank you for your time.

T.J.

Have you tried creating a NEW BLANK Database and importing all of the existing database into it? You said that you can read the database but not write to it, so this might be something that you would be able to do. I tried it as an experiment before replying, and it worked for me.
 

TJBernard

Registered User.
Local time
Today, 05:19
Joined
Mar 28, 2002
Messages
176
Have you tried creating a NEW BLANK Database and importing all of the existing database into it? You said that you can read the database but not write to it, so this might be something that you would be able to do. I tried it as an experiment before replying, and it worked for me.

This would probably work to create a new .mde file, but my problem is not so much that I cannot use the .mde file, I have created a new .mde file that works just fine with a slightly different name.

My problem is that I cannot delete the old .mde file off my network server. It says the file is locked, though I cannot find any processes running against the file, and there is no locking file for the .mde.

Thank you for your time. This is very strange, I have never run into this problem in 8 years of MS Access development.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:19
Joined
Feb 28, 2001
Messages
27,321
The first thing that occurs to me is to ask how long it has been since the server was rebooted? A reboot generally clears all dynamic locks because they are built in Windows scratchpad memory. Rebooting definitely clears that.

Along those lines, rebooting all the clients of this database would clear the network-based lock if that is what is doing it to you. If everyone you can find will reboot and it is still locked, you have a persistent lock that can only be cleared by a server reboot.

The second thing is that your server's administrator should be able to do a netstat command to determine all links inbound on that box. Having that and a list of the IP addresses at your site, it should be possible to know who has every connection to that box.

The third thing to consider is that what has the file open MIGHT be part of the Windows Task Scheduler if anyone has been using the "Scheduling a Macro to Run After Hours" trick posted on this forum as a way to run a nightly reporting or cleanup process. If the macro is written without a QUIT command at its end, or if it didn't execute to completion, that would do it in a hearbeat.

I did a quick search of Google for some keywords involved in the search. Basically, there is no public utility that I've found so far that can determine who opened a given file after the fact. It is just something somewhere in dynamic memory, and there is no utility to do a forced unlock for someone else's lock. (I know it must be possible for reasons I'd rather not elaborate, but I don't know the command you would need.

One thing I did note is that if you are running a server, it makes a difference if you are just "sharing" files on an "ordinary" Windows version or if you are actually running some sort of "MS 200x Server Edition." According to what I've found, Server Edition versions are allowed to delete a locked file anyway.
 

TJBernard

Registered User.
Local time
Today, 05:19
Joined
Mar 28, 2002
Messages
176
Thank you The_Doc_Man.

The IT team is looking into any server issues, or any processes running against this file. Sounds like it might be beyond the powers I am given.

I will let you know what the final solution is. I, at first, thought it was something I could get to.
 

boblarson

Smeghead
Local time
Yesterday, 21:19
Joined
Jan 12, 2001
Messages
32,059
And another thing to consider is that you should not be sharing a single mde file on a server. The database should be split and the backend on the server and a copy of the front end on each user's machine. If you don't do that then you are running a huge risk of losing everything. See here for more about splitting your database:
http://www.members.shaw.ca/AlbertKallal/Articles/split/
 

cdoyle

Registered User.
Local time
Yesterday, 21:19
Joined
Jun 9, 2004
Messages
383
I'm having the same type of problem with a db right now, only my backend is locked.

There is no .ldb file, but if I try and rename the backend or open it. I get a warning about the file being in use.

I'm going to see if IT can reboot and hopefully that fixes the problem.
 

TJBernard

Registered User.
Local time
Today, 05:19
Joined
Mar 28, 2002
Messages
176
I'm having the same type of problem with a db right now, only my backend is locked.

There is no .ldb file, but if I try and rename the backend or open it. I get a warning about the file being in use.

I'm going to see if IT can reboot and hopefully that fixes the problem.

I never did find a solution. But that evening, when the servers performed their nightly processes, the file unlocked itself (not sure how).

I then was able to delete the file the next day.

Some process on the server must have been hung up, and caused the file to be locked.
 

Users who are viewing this thread

Top Bottom