2

I have an access database that is on a network drive that multiple users can access. The database corrupted this morning and I am in the process of trying to fix it. The problem I am having is when I attempt to rename the database it says it is currently in use by someone. There is no .ldb file associated with this file so at this point and am dead in the water because I can't rename it, compact it or anything.

Does anyone have any suggestions?

Thanks

Taryn
  • 242,637
  • 56
  • 362
  • 405
  • How did it get corrupted? You don't have anyone accessing the database over wifi or with a Windows Home edition, do you? – James May 24 '11 at 13:34
  • 1
    Such is the joy of putting a file-based database on a network drive - it is 100% certain it will get corrupted sooner or later. –  May 24 '11 at 13:39
  • I don't know how it got corrupted. It happens sometimes which is why we are in the process of rewriting it to SQL server – Taryn May 24 '11 at 13:54
  • @Neil That does seem to be the case with Access. You can reduce the likelihood of that happening by only allowing the database to be used through terminal services. – James May 24 '11 at 14:18
  • No, it is NOT 100% certain that it will get corrupted. That only happens when the environment is not reliable or you're doing things wrong. – David-W-Fenton May 28 '11 at 23:36
  • In the server control panel, go to Administrative Tools and open the Computer Management and look in Shares and see what files are open and who has them open. Have those users reboot their computers. If the file lock remains, close it manually. – David-W-Fenton May 28 '11 at 23:37

3 Answers3

5

Copy the database to another location. The copy wont be locked. Then you can work in ways to save your work until you solve the lock problem in the original file. If your problem is due to VB code file corruption, try to open the database with the "/decompile" option:

Start-Run:

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\example.mdb" /decompile

If you haven't any ldb file associated with the mdb, it will be difficult to discover what user is locking your database. If you have few users, you should restart their machines. It would be prehistoric but should be fastest than trying to unlock the file through other ways.

Alex
  • 3,325
  • 11
  • 52
  • 80
  • I had each and everyone one of them reboot their machines. Finally the darn thing unlocked. This is one of many reason I can't stand access. Thanks for this tip for future reference. :) – Taryn May 24 '11 at 14:08
  • This is not good advice, because the disk image may not include all the data that is represented by the state of the file in the temp files that users have open. – David-W-Fenton May 28 '11 at 23:36
  • You hate Access because it keeps files open when something bad happens to the client workstations? You should be grateful it does that. If it didn't, you'd have corruption for sure. – David-W-Fenton May 28 '11 at 23:37
0

Just had to do this, Try "F11" then select "tables", select topic and click open, from there it a simple C&P into excel sheet.

Hope this helps Dave Pragnell

0

ldb file is automatically created when first user opens the DB, it tracks the number of users who have opened the DB and locking status of every object so if one user is open in read only then 2nd user can edit db

this file automatically deleted when last user close connection to the db file.

You dont manually delete/modify this file, as it may result into inconsistent state of DB

You can open this file in Notepad and check how many users have opened this file, But DONT change anything.