PROBLEM

Unable to assign a domain to a field in a feature class

Last Published: April 27, 2021

Description

After creating coded value domains for a geodatabase, ArcMap is unable to assign the domains to the fields in a feature class. In some cases, when assigning a domain to a field using the Assign Domain To Field tool, the tool fails to execute and the following error is returned:

Error:   
Cannot get exclusive schema lock.

Cause

A schema lock is present on the dataset. This means the database is being accessed by another application, which prevents users other than the data owner to make changes to the dataset (such as assigning domains to fields).

For more information on schema locks, refer to ArcMap: Schema locking.

Solution or Workaround

Disconnect from the database server

Disconnect from the database server and close any other applications using data from the same geodatabase (such as ArcCatalog) to prevent any disconnected locks or detached connections with the database.

For more information on disconnecting from a database, refer to ArcMap: Disconnect from a database server.

Change the ownership of the dataset

Change the ownership of the dataset to acquire the privileges of altering the schema of the dataset. To change the ownership of the dataset, use the following instructions:

  1. Create the dataset with the user as the owner.
  2. Grant privileges such as CREATE FUNCTION, CREATE PROCEDURE, CREATE TABLE, and CREATE VIEW PERMISSION to the user in SQL Server.
  3. In ArcCatalog, establish a connection to the geodatabase with the user.
  4. Copy and paste the original data (feature class or feature dataset) to the connection. A new feature class owned by the user is created with _1 after the original name.
  5. Delete the original feature class owned by the dbo, and rename the new feature class by removing the _1 in the name.
For more information on granting privileges on data, refer to ArcMap: Grant and revoke dataset privileges.
Note:
When assigning a domain to a field, ensure the data type of the field matches with the domain field type. This is because only the domains that match with the data type of the field show up in the drop-down list. For more information about field data type, refer to  ArcMap: ArcGIS field data types.

Article ID:000012978

Software:
  • ArcMap 10 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options