Is This Content Helpful?
We're glad to know this article was helpful.
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.
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 the following ArcGIS Web Help page, Schema locking.
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 orphaned locks or orphaned connections with the database.
For more information on disconnecting from a database, refer to the following ArcGIS Web Help page, 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:
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 the following ArcGIS Web Help page, ArcGIS field data types.