lock

262
4
12-08-2020 12:37 PM
Labels (1)
MarcelSt-Germain
Regular Contributor

Hi,  for few decade now I'm wondering why, ArcMap leave lock in the file geodatabase.  

It's me or something is wrong there.  Even if all windows of ArcMap are closed, sometime, when trying to do some catalog things I have the lock window.

When looking in my files, I have always .lock file there for nothing.  Have to delete them to make some cleanup.  Why ArcMap doesn't do the job itself?  I know some of these locks are from ArcMap crash or need to kill the process but....

 

0 Kudos
4 Replies
JoshuaBixby
MVP Esteemed Contributor

You have answered your own question, or part of your own question.


  I know some of these locks are from ArcMap crash or need to kill the process but....

 


Regarding the section part of your question, Compact file and personal geodatabases—ArcMap | Documentation (arcgis.com) should clean up orphaned locks.

MarcelSt-Germain
Regular Contributor

Yes but not all, I think.  But basically, why ArcMap doesn't make cleanup of not use lock and leave garbage in the database?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

If ArcMap hard crashes or the user terminates the process, the application has no way of being able to clean up locks.  Orphaned locks are a signal/indicator that something is closing abnormally.  Esri could code ArcMap to clean up all orphaned locks when a user connects to a GDB, but doing so automatically and behind the scenes could hide the fact something isn't closing correctly.

If you have a specific situation where Compact isn't cleaning up orphaned locks and those locks are causing issues, you can elaborate either here or another post for people to help troubleshoot some more.

0 Kudos
MarcelSt-Germain
Regular Contributor

Do not need to see this mark in database.  We always know when process stop or we kill them.

A cleanup at start could only make database cleaner.  But...  have to leave with it.

0 Kudos