I had a spatial db connection open in arcmap. While exporting to SDE with a console app I get an error in the console:

Lock request conflicts with an established lock [DBO].

Does this just mean someone is using the same ArcSDE connection or is it the feature dataset?

Of course when I closed arcmap, and fired the console app again, my feature class exported to ArcSDE successfully.

Can I kill any locks programmatically if I am DBO (when other users are using the same FD)?

If that's not smart, how can I avoid this lock?

How does the GIS community deal with this issue, wait till all users are off and run it at 2am?

The console app will become a batch process updating FCs on a regular basis.


Your console app has its own connection since it is running on a different process - there is no "sharing of connections" in that use case.

Anytime ArcMap connects and opens a dataset, it creates a shared schema lock on a FC (and all related versioning, history, relationship clases, etc, tables). This is just to make sure that the schema doesn't change. Another thing to keep in mind is that if you open a FC inside FeatureDataset, this will cause your workspace to get a shared lock of all the FCs inside that FD as well.

On the other hand, exclusive locks are used for DDL operations (i.e. changing schema).

So I assume that your "load" operation is actually dropping the entire table (a schema change) and then recreating the table. For that, you would need an exclusive schema lock.

Consider just truncating the table using sdetable –o truncate before loading the new one. You may not need to kick anyone out.

Oh yeah, and don't remove locks just because. If you are, kick the users out instead of changing locks underneath them which will lead to bad things.


You can kill any active connections to the database from SQL Server, however this will also kill the connection you have opened in ArcMap.

Here is a link to a site with a stored procedure for clearing all connections to the DB:


Before firing that off, you can use the sp_who command to check if any other users are working with that database.

  • I avoid using SQL tools to kill ArcSDE connections; just cause you never know what it might impact the ESRI business tables. The ESRI command line tools are really best for killing connections or processes if you really need. – D.E.Wright Apr 27 '11 at 18:27
  • Are you talking about using sdemon -o kill on the database connection? If so, I'm not sure how that's different from killing them directly from the database. – Britt Wescott Apr 27 '11 at 18:40
  • sdemon will use ESRI logic; to kill the connections; its not doing a brute-force kill on a running connection. Its just less volatile in my experience. – D.E.Wright Apr 27 '11 at 18:53

The ESRI commandline tools for ArcSDE are your best option to kill a process or connection without risking a corruption or damage to your Geodatabase.

From the looks of what your message says; it does appear that someone is reading/connected to that feature dataset. And you are not able to make changes to a FD while any of the containing layers are in use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.