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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locked DB Issue 2

Status
Not open for further replies.

jedel

Programmer
Jan 11, 2003
430
AU
Hi All,

I have a db that I can use quite happily and everything is peachy. It's only when I want to rplace the DB with a BAcked up DB to reduce the "Bloat". The problem is that the Old DB says there is a Sharing violation.

I checked the .ldb file and it says that my workstation has it open. This is not the case.

I've checked the TAsk manager for any rogue MSACCESS.EXE processes, I can't delete any of the Front end files or BAck end files .LDB or .MDB. I can't move them or renamr them. This is becasue the .ldb file says that some else has it open, namely me.

It is a multi user db, but the .ldb file only has my workstation logged.

I have all permissions required for the folder, ie I can delete files and folders from the folder.

So I'm at a loss. I can't update the database becase I can't et rid of the old one until I can get rid of the .ldb file.

Any other suggestions?

Cheers

Dean

"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
I've been through this before, where you can't delete the .ldb file. This is a real pain--I know of no way to delete the .ldb when it's locked like this. You have to reboot and catch it before you or anyone else gets into it.

I have been able to delete the .ldb on rare occasions, even when it shows different users in it, but mostly when you try to delete it and it gives you the locked message--you're SOL, and need to reboot.

I've asked numerous times on this and the OS forums about ways to forcibly delete files locked like that and no one has been able to come up with anything less than a reboot.
--Jim
 
jsteph,
is the db on a server? if so you should be able to kill the connection from there. to reduce 'bloat' why not use compact and repair?
hth
regards,
longhair
 
longhair,
I think you may have meant to address jedel instead of me.

However, I've had this issue with the db on a server, and other users were not only out of the db, but their machine was off. The .ldb file still couldn't be deleted, claiming it was locked.

My wish is for a (granted, very dangerous) utility that will simply delete a file, regardless of what locks, etc may be held for that file. I understand the dangers of such a utility, but in the right hands, it's a far, far better solution than having to reboot a server everytime one of the access db's on needs compacting, etc. and it's held hostage via a locked ldb file.

to reduce 'bloat' why not use compact and repair?
I believe that's part of the problem--you can't compact when the ldb is holding the .mdb hostage with a lock--even though all users are out of the db and even with their machines phyically powered down.

--Jim
 
jsteph,

yep - meant jedel. but anywho-
the .ldb file will not be properly removed if
1) user does not exit cleanly
2) could be network issue
3) could be programming issue
the best way that i have found to administer this is:
make sure everyone is out of the db
from the server
start
settings
control panel
admin tools
cpu management
shared folders
open files
right click on the files - choose close open file
i've also seen this happen at times when a user first opens the db in 'single user' mode then others access ths db.
not sure if it's 'single user' or exclusive - but it's something close to that.
regards,
longhair
 
longhair,
That's the ticket! That admin tools thing is the thing I've been looking for to allow me to delete those 'stuck' .ldb files. Thanks,
--Jim
 
jsteph,
glad to be of help. the only thing i've found with this is that it is a manual process. you may want to check out the vbscript forum, there may be a way to script it.
regards,
longhair
 
lomghair,

Thanks for the tip! It seems that there may be some sort of automation on the server at work. When I went back to work the next morning, the .ldb file was already gone.

Unfortunately, I don't have access to the server at work. The db and all of the associated file are on the server, but on a public drive.

I will have a look at the VB script forum though and see what's there. I may be able to make up some kind of utility to do the same thing.

Thanks to all for the responses

Cheers

Dean

"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top