sde locks

218
16
04-01-2020 06:49 AM
New Contributor III

SDE Feature classes continue to get schema locks put on them even when no one is in them or have ever even opened them. It's driving me a bit nuts. Has anyone else seen this?

SDE 10.6.1 SQL 2012.

Reply
0 Kudos
16 Replies
Esri Frequent Contributor

Are they part of a feature dataset or related table?

Schema locking—ArcGIS Help | Documentation 

Are you attempting to update the schema?

Are there any active map services using that feature class?

You are going to need to provide some more information to get more responses .

Geodatabase

--- George T.
Esri Esteemed Contributor

Locks, by their very nature, tell you who has obtained them (host and connection user). This will tell you why they exist.  The biggest offenders are feature dataset use (lock one, lock them all) and ArcGIS Server map services, but simply having ArcCatalog and ArcMap open at the same time can suffice (which is why I only use the Catalog window of ArcMap, not ArcCatalog).

- V

Reply
0 Kudos
New Contributor III

Hey Vince,

The locks are pretty much all over the place. I understand that Catalog or a service or just an ArcMap session can lock something.

The offending server is where Enterprise is installed. The lock owner is Enterpriseservername.10.6.1.9270

We are enterprise 10.6.1 so the first part makes sense. 9270 makes no sense to me though. I plan on booting the server tomorrow morning for Win updates and that may give me a way to target in on it.

Note that this is also happening on a new feature class that I just created for testing. NO one is in it. Some refresh process I suspect.

Doug Pare

GIS Programmer/Analyst

Summit County Government

970-668-4221

Reply
0 Kudos
Esri Frequent Contributor

The ".9270" part is the build number of the client that was used to upgrade / create the enterprise geodatabase.

Are the locks preventing you from doing any work or more just curious (or annoyed) about them?

--- George T.
New Contributor III

Thanks about info about build number.

The locks are not keeping us from updating data. There are only three of us and all is versioned.

What is so odd is that the general username for READERS with select privileges only will lock a feature class and I’m not able to modify schema such as add a field/column.

Not a big deal really, but –

Why is a reader locking the SDE feature class?

The locks are being put on at 1:02 am 1:03 am 1:05 am and then stops for a few hours. Then 5am. I can guarantee that no one is in this test feature class. Other feature classes get the same.

Thanks

Doug

Reply
0 Kudos
Esri Frequent Contributor

Ok, good to know that information. Any user (viewer, editor, data owner) when connected will place a lock on the tables they are looking at.

Based on your time stamps, my guess is that the locks are from map services that are being "recycled" at those times. Even if no one is looking / using the map service, I believe that there is a lock placed from the ArcGIS Server machine service name (ServerName) because the service is active. There is also an option to disable schema locks on the map service: https://enterprise.arcgis.com/en/server/latest/administer/windows/disabling-schema-locking-on-a-map-...   Now there are pros & cons to both ways.

Hope this helps!

--- George T.
Esteemed Contributor

Can you disable schema locks on all types of services or just specific types?  I do not see this capability on a geocode service.

Reply
0 Kudos
Esri Frequent Contributor

I know that it is available for map services. My guess why is related to not having the ability to "change" data via a map service it is more a "reading" function.

I am not sure for other services but would guess it is not available. 

--- George T.
Reply
0 Kudos
New Contributor III

On 10.4.1 on 2016 sQL Server, I have the same issue.  Recycling causes a lock on the dataset that never clears, so sometimes there will be multiple locks from the sam set of ArcGIS Servers.  This seems to be a bigger problem when using a multi-server site.

Reply
0 Kudos