Geodatabase locks

As users edit and query data, ArcGIS automatically applies and releases locks on datasets in the geodatabase to help users manage changes without causing conflicts with other users. As objects in a geodatabase are locked, access to these objects changes. The Locks tab on the Geodatabase Administration dialog box allows you to view and manage locks in the geodatabase. Through this dialog box, you can see active locks on datasets and versions and which user has acquired the lock. This lets you identify who may be blocking you from editing operations on specific datasets and versions, which can help you coordinate editing processes with other users.

NoteNote:

Whether you can view a given dataset or version is dependent on your level of permissions for those objects.

The geodatabase administrator can use the Locks tab on the Geodatabase Administration dialog box to help manage common maintenance tasks in a geodatabase. By viewing all the locks in a geodatabase, the administrator can see which users may be blocking specific datasets and versions from a maintenance task, such as reconciling data or compressing the geodatabase. The administrator can use the list of locks to judge whether it is safe to disconnect any users to allow those processes to run.

Lock modes

A geodatabase lock will always be in one of two different modes: shared or exclusive.

ArcGIS automatically acquires a shared lock on an individual dataset when it is in use, for example, any time a user is editing or querying the contents of a feature class or table. This mechanism is used so other users cannot make changes to the underlying dataset and its schema while it is in use. Any number of shared locks can be established on a single feature class or table at any given time.

An exclusive lock is used to lock a dataset in the geodatabase from use by others to make necessary changes to it, for example, to reconcile a version. Once a user with proper permissions starts to make changes to a dataset in the geodatabase, ArcGIS automatically establishes an exclusive lock on the individual attribute table, feature class table, raster table, or other dataset. However, if a shared lock exists on that dataset, an exclusive lock cannot be established.

An exclusive lock is promoted from a shared lock and demoted back to a shared lock when no longer needed. Only one exclusive lock is allowed at a time on a dataset or version.

Lock types

There are three different types of locks in an ArcSDE geodatabase: schema locks, session locks, and version locks.

Schema locks

A shared schema lock is acquired any time a dataset is opened in ArcGIS. When the schema of the dataset is modified in any way, that shared schema lock is promoted from shared to exclusive for the duration of the schema changes. This provides consistency in a multiuser environment by preventing the schema of a dataset from changing when other users have that dataset open.

Data owners can see schema locks held on their data. Geodatabase administrators can see all schema locks on the Locks tab of the Geodatabase Administration dialog box.

State locks

A shared state lock is acquired any time a version is opened in ArcGIS. Versions are opened any time a versioned representation of a dataset is open in ArcGIS.

Only geodatabase administrators can see state locks on the Locks tab on the Geodatabase Administration dialog box.

Version locks

A shared version lock is acquired when an edit session is started for a given version. When a version is reconciled with a target version, the shared version lock is promoted to an exclusive lock for the duration of the reconcile operation. If two users are editing the same version, both hold a shared lock on that version. Neither user can reconcile with a target version, which requires an exclusive lock, until the other user stops editing, thereby releasing his shared lock on the version.

Only geodatabase administrators can see version locks on the Locks tab on the Geodatabase Administration dialog box.

Learn more about managing locks in a geodatabase

Related Topics

10/24/2012