Select to view content in your preferred language

lock files exist even after removing data from contents

251
8
12-08-2024 11:44 AM
Michele
Frequent Contributor

Another issue I've encountered since upgrading to 3.3.1 is that lock files remain on datasets even though I've removed them from the contents pane.  This is especially annoying since the only way to get rid of them (and delete the folder they are in) is to completely close out of Arc and do it in windows.  I used to be able to delete the lock file in windows after removing the dataset from any open project to avoid corruption.  Now I can't and arc takes forever to open where I work.  It's not very data management friendly since many times I (and others) forget to delete the files after closing Arc and then we have all of these random files/folders that never get deleted and take up unnecessary space.

Is there any fix/workaround to this without having to close ArcPro?

8 Replies
Robert_LeClair
Esri Notable Contributor

I've seen this occur in file geodatabases before.  One way to remove them easily is exit out of all applications using the geodatabase, then start a new blank ArcGIS Pro project file and run the Compact (Data Management) tool.  This will remove orphaned LOCK files in the geodatabase.

0 Kudos
Michele
Frequent Contributor

@Robert_LeClairwhen I close the project the lock is released, however there should be a way for the lock to be released manually without having to do that.  More experienced users understand the ramifications of doing such a thing.  Restarting the application just isn't efficient.

0 Kudos
Robert_LeClair
Esri Notable Contributor

Question - are you using a file or enterprise geodatabase?  I know in an Enterprise Geodatabase, if you're the SDE, you can manage and delete locks.  In a file geodatabase, I see no way of doing this.

0 Kudos
RTPL_AU
Frequent Contributor

FGDB - Hence mentioning the Idea.

0 Kudos
Michele
Frequent Contributor

I use both, so maybe that's why sometimes it works and other times it doesn't.  I didn't know you could do it in one and not the other.

0 Kudos
Robert_LeClair
Esri Notable Contributor

So Enterprise Geodatabases allow the SDE to view SDE connections and clear the locks on feature classes and tables.  Unfortunately, there is no similar workflow for File Geodatabases.  Simply a different architecture as it were.

0 Kudos
RTPL_AU
Frequent Contributor

@Michele Welcome to ArcGIS..... 
This is a common, and old! issue. I'm sure there is an Idea to add a "delete locks" button to Pro to have it remove locks from anything it has its fingers in at that point in time.

@Robert_LeClair the issue isn't orphaned lock files - it is the old story of Map or Pro keeping a lock file established to a dataset that is no longer in use in the project or mxd; only resolvable by closing and re-opening the application.  This way of doing things may have been OK in the 60's but wastes time in 2024. 

I do understand the potential data risks, so it should be a deliberate process with appropriate warnings to the user. - make it an add-in that can be enabled by users that understand the risks and are willing to accept them. Something similar to the "Stop what you're doing button" Idea.

0 Kudos
Michele
Frequent Contributor

@RTPL_AU so annoying.  I understand the potential data risks as well, but the more experienced users should have an option other then having to close out and restart to release the lock.  It's not efficient.  I swear at one point I was able to delete the lock file after removing from the the catalog pane. 

An add-in wouldn't solve my issue since I cannot add anything outside of the software where I work.

0 Kudos