I would like to unlock a gdb in order to "add fields".

3243
9
Jump to solution
03-03-2016 12:27 PM
JarrettCziesch1
New Contributor II

The .gbd I am working with is locked and when I attempt to add a field I get a message stating "cannot acquire schema lock because of an existing lock". Thx

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi Jarrett,

The feature class in the File Geodatabase is being used by another user.  If no users are accessing the geodatabase, make sure the feature class does not participate in a service that is running.  If it does, you will need to stop the service in order to update the schema.

View solution in original post

9 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Jarrett,

The feature class in the File Geodatabase is being used by another user.  If no users are accessing the geodatabase, make sure the feature class does not participate in a service that is running.  If it does, you will need to stop the service in order to update the schema.

JarrettCziesch1
New Contributor II

Thanks Jake,

The Feature Class is not open by other users while attempting to add a field. The gdb is on a shared network and some other users do have older versions of ArcMap so its possible that those could be issues but not 100%.

0 Kudos
JarrettCziesch1
New Contributor II

The Feature Class is not open by other users while attempting to add a field. The gdb is on a shared network and some other users do have older versions of ArcMap so its possible that those could be issues but not 100%.

0 Kudos
MichaelVolz
Esteemed Contributor

Does the lock have the current time or is it an old time?

I have file gdbs that have multiple locks where 1 is the current lock and the other locks are there because ArcMap might have crashed in the past while someone or an ArcGIS Server service was accessing the file gdb when it crashed.  I was able to delete the older locks, but the current lock could not be deleted as it indicated that the file gdb was in use.

0 Kudos
ChrisDonohue__GISP
MVP Frequent Contributor

If the feature class is in a File or Personal Geodatabase and you still get the lock even after checking that it is not being used, there is another solution to clearing the lock.  Here's what you do - run the Compact (Data Management) Tool.  ESRI Support passed this on to me when I had a similar issue several months ago with File Geodatabases showing as locked even though no one else was using them.  Compact will resolve the locks as it has a built in process to clear locks as part of it's running.  To be clear, the Compact tool is being run for the desirable side effect of lock-clearing, not because compaction (or lack of) has anything to do with causing the locks.

Note to avoid potential confusion - the Compact geoprocessing tool needs to be run, not the Administration - Compact Database process from ArcCatalog, which sound like it is the same (but is not), as the latter process does not have the lock-clearing functionality.

ArcGIS Help 10.2 - Compact (Data Management)

Chris Donohue, GISP

JarrettCziesch1
New Contributor II

Thx Chris,

I will try to use the compact tool once Im done exporting this monster gdb to my hard drive. I believe it is good practice to compact large gdb's as it is. Thanks!

Jarrett

0 Kudos
Rudy_Stricklan
New Contributor III

Another solution is to use a utility like Unlocker. It also helps during ArcPy debugging sessions when locks persist.

Rudy Stricklan

0 Kudos
JarrettCziesch1
New Contributor II

"Uncompress" (even though results stated that gdb had already been uncompressed?) and "add field" from the Arc Catalog data management toolset works. Still cannot add field from attribute table but I have not attempted using the "compact" tool as of yet.

0 Kudos
JarrettCziesch1
New Contributor II

OK,

"Uncompress" (even though results stated that gdb had already been uncompressed?) and "add field" from the Arc Catalog data management toolset works. Still cannot add field from attribute table but I have not attempted using the "compact" tool as of yet.

Thanks to everyone

0 Kudos