PROBLEM

Unable to edit a shapefile or feature class in a file geodatabase

Last Published: July 19, 2021

Description

When saving edits to shapefiles or feature classes, the following error message may be returned:

Error:
Unable to save edits. Cannot acquire a lock.

Cause

  • The issue occurs if one or more processes attempts edit a shapefile or feature class simultaneously. When a shapefile or feature class is accessed by an application, a shared or exclusive schema lock is applied based on the operation being executed. These locks are needed to prevent other processes from modifying the same data and possibly corrupting the data. Refer to ArcMap: File geodatabases and locking for more information.​​​​​​
Note:
Feature classes only support a single editor and multiple readers.
  • The file geodatabase is corrupt.

Solution or Workaround

Use one of the following solutions depending on the cause.

One or more processes attempts to edit a shapefile or feature class simultaneously

  • Ensure that only a single user is editing a shapefile or feature class.
  • If the shapefile or feature class is within an application that has stopped responding, terminate the process to release the lock.

Once the locks are removed it should be possible to persist edits to the data.

The file geodatabase is corrupt

Use the Recover File Geodatabase tool to recover corrupted file geodatabases. Follow these steps to do so.

  1. In the Catalog window, navigate to Toolboxes > System Toolboxes > Data Management Tools > File Geodatabase > Recover File Geodatabase.
  2. For Input File Geodatabase, specify the corrupted file geodatabase.
  3. For Output Location, specify the save location for the output file geodatabase.
  4. For File GDB Name, specify a name for the output file geodatabase.
  5. Click OK.
  6. Add a folder connection to the recovered file geodatabase in the Catalog window. Refer to ArcMap: Using folder connections for steps to do so.

Article ID:000012457

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic