Select to view content in your preferred language

AGO and Exclusive Locks on Feature Classes

2042
1
07-17-2012 07:26 AM
LisaShertz
Occasional Contributor
I have found it necessary it edit a Feature Class in SDE after I have published it and added it to a map on AGO. With brilliant lack of planning I failed to register the data as versioned. When I try to register the FC or delete it to make a new one, I am informed that there is a lock on the table. I stop the service on Server, thinking that that will release the lock; it does not, even after clearing the cache. It is only after I remove the service from the AGO map, that I can make schema changes to the feature class.

This is a bit awkward. This is a very complicated map with lots of layers, and popups. It is also a map about a highly controversial and volatile topic. The people that I am working with are very uptight that I cannot make almost instant changes; I have to completely rebuild the FC and the service. I don't mind stopping the service, that makes sense, but how can AGO still have a lock on the FC if the service is stopped?

Is there something I have missed? I could of course plan better and register the data, but most of the time this isn't necessary. Is there a way to turn off the connection from AGO or stop the AGO map while I make changes?

Lisa Shertz
Tags (2)
0 Kudos
1 Reply
MikeMinami
Esri Notable Contributor
By default a feature class accessed by a service will have a shared lock in the geodatabase. This allows others to do DML (insert, update, delete records) but not DDL (add field, drop field, version etc.). The shared lock prevents clients from getting the exclusive lock they need to do the DDL. You can turn this off on a map service such that it does not get a shared lock and thus allows DDL (not recommended unless you really know what you are doing!).

The fact that you can�??t version after stopping the service means that something else likely has a lock. It seems unlikely that the web map is causing the problem because the web map goes through the service.  I suspect that it was just coincidence that the lock was released as you removed the layer from the AGO map. What I would recommend is the new admin tools in the geodatabase at 10.1. These allow you to see the existing locks and delete them if needed. If you don't have 10.1, you can look at the SDE admin commands.

Hope this helps,

Mike
0 Kudos