<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3 in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25545#M1342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Having the same problem with a 10.2 geodb on SQL server... has there been any resolution or suggestion for this?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael, we were never able to convince ESRI that it was a real problem. Our final solution was to patch [sde].[SDE_state_lock_def_insert] (and to cross our fingers!!). This has proved to be a great success on 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are just about to start on 10.2 migration and so we will be reviewing situation to see if our patch is still required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a side note we have recently started to see occasional deadlocks in pinfo_tran and table_lock_del_tran (Still on 10.0). I have not yet had a chance to investigate&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 00:50:41 GMT</pubDate>
    <dc:creator>JohnCuthbertson</dc:creator>
    <dc:date>2014-04-23T00:50:41Z</dc:date>
    <item>
      <title>Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25542#M1339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Under very heavy load (we were refreshing lots of cached area all at the same time) we get the following warning and error in ArcGIS log&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Layer xxxx; in Map yyyy; is invalid. The base table definition string &amp;amp;quot;zzzzzz&amp;amp;quot; is invalid.&amp;nbsp; Underlying DBMS error [sde.DEFAULT][STATE_ID = 513].&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Container&amp;nbsp; process xxx has crashed on machine xxxx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We also see the following in some of the FME jobs running at the same time&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could not open the Enterprise Geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please check that the connection parameters specified are correct. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error number from ArcObjects is: '-2147216072'. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error message from ArcObjects is: {Underlying DBMS error [sde.DEFAULT][STATE_ID = 692]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the same time our SQL 2008R2 deadlock monitor reports a deadlock (and the victim is the one that gets the above error message)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The deadlock relates to objectname="sde.SDE_state_locks�?� table and is being called by sde.SDE_state_check_lock_conflicts&amp;nbsp; and sde.SDE_state_lock_def_insert stored procedures&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By using SQL trace I was able to extract out lots of calls to these stored procedures. Putting these calls in half a dozen sql streams and running them all against each other (using a copy of live geodatabase&amp;nbsp; with a "sde.SDE_state_locks�?� table&amp;nbsp; populated with a few thousand dummy entries) I was able to reproduce the deadlock situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have raised a call with ESRI support, but are looking for anyone else who may be having a similar problem, and better still, has a solution!.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 03:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25542#M1339</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2012-05-25T03:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25543#M1340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having the same problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 12:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25543#M1340</guid>
      <dc:creator>DeanRother</dc:creator>
      <dc:date>2012-09-24T12:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25544#M1341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Having the same problem with a 10.2 geodb on SQL server... has there been any resolution or suggestion for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 16:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25544#M1341</guid>
      <dc:creator>MichaelFischer</dc:creator>
      <dc:date>2014-04-15T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25545#M1342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Having the same problem with a 10.2 geodb on SQL server... has there been any resolution or suggestion for this?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael, we were never able to convince ESRI that it was a real problem. Our final solution was to patch [sde].[SDE_state_lock_def_insert] (and to cross our fingers!!). This has proved to be a great success on 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are just about to start on 10.2 migration and so we will be reviewing situation to see if our patch is still required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a side note we have recently started to see occasional deadlocks in pinfo_tran and table_lock_del_tran (Still on 10.0). I have not yet had a chance to investigate&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 00:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25545#M1342</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2014-04-23T00:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25546#M1343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Michael, we were never able to convince ESRI that it was a real problem. Our final solution was to patch [sde].[SDE_state_lock_def_insert] (and to cross our fingers!!). This has proved to be a great success on 10.0.&lt;BR /&gt;&lt;BR /&gt;We are just about to start on 10.2 migration and so we will be reviewing situation to see if our patch is still required.&lt;BR /&gt;&lt;BR /&gt;On a side note we have recently started to see occasional deadlocks in pinfo_tran and table_lock_del_tran (Still on 10.0). I have not yet had a chance to investigate&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks... I think you might find it will still be needed.&amp;nbsp;&amp;nbsp; If so, can you share your patch?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 22:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25546#M1343</guid>
      <dc:creator>MichaelFischer</dc:creator>
      <dc:date>2014-04-24T22:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25547#M1344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also facing similar issue with SQL Server (ArcGIS SDE 10 SP3), can you kindly share your patch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 07:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25547#M1344</guid>
      <dc:creator>Oumer_ShafiBhat</dc:creator>
      <dc:date>2014-07-08T07:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25548#M1345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have stumbled the same issue, thank you John for identifying the problem and sending us to the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As John mentioned the issue is with the [dbo.&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5; background-color: #ffffff;"&gt;SDE_state_lock_def_insert] procedure. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;we have investigated the issue deeply, and found that the deadlocks are happening when the [dbo.STATE_state_check_lock_conflicts] trying to convert the IX (Intent Exclusive) lock to X (Exclusive). on the [dbo.SDE_state_locks] table while opening a local cursor with a table hint.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The problem is that before [&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; background-color: #ffffff;"&gt;SDE_state_lock_def_insert]&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; procedure runs, the &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;[dbo.&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; background-color: #ffffff;"&gt;SDE_state_lock_def_insert] calls the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; [dbo.&lt;SPAN style="line-height: 1.5; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; background-color: #ffffff;"&gt;SDE_state_lock_def_delete] &lt;STRONG&gt;(in the same transaction)&lt;/STRONG&gt; that making cleanup in the &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5; background-color: #ffffff;"&gt;[dbo.SDE_state_locks] table, via DELETE instruction. this in turn acquiring a IX lock on &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5; background-color: #ffffff;"&gt;[dbo.SDE_state_locks] table, and then if it delete any row while running, it acquiring row X lock on the deleted row. this locks are held till the end of the outmost transaction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;so when the later procedure called, it is deadlocked, on this X locks, cause it tries to get X lock on whole table, and for that it need to lock wait till other sessions release the X locks on the rows,&amp;nbsp; which in turn waiting on other to do the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;The solution, that is worked for us&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;setting a table hint inside the &lt;SPAN style="line-height: 1.5;"&gt; [dbo.&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; background-color: #ffffff;"&gt;SDE_state_lock_def_delete] procedure on both DELETE operations, that instruct to acquire a table exclusive lock on whole table, right away.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;apply the hint after the FROM clause as follows: WITH (TABLOCKX, HOLDLOCK).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it worked like a charm, no deadlocks anymore &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;still checking for performance penalty. but it worth it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope ESRI will understand that it is a major issue and will fix that in the new releases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:38:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25548#M1345</guid>
      <dc:creator>ilanithoffman</dc:creator>
      <dc:date>2014-07-08T08:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25549#M1346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was resolved with the 10.2.1 database upgrade and was a confirmed but in 10.0 SP5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 14:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25549#M1346</guid>
      <dc:creator>SandraSkaar</dc:creator>
      <dc:date>2014-10-20T14:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deadlocks in SQL Server causing Underlying DBMS error ESRI 10 SP3</title>
      <link>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25550#M1347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible that Not applying something in a 10.0 pre 10.3 period would carry forward this behavior?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently supporting a Data collector app in a 10.3 Geodatabase.&amp;nbsp; I did not do the upgrade but this is a long standing geodatabase.&amp;nbsp; Currently under a heavy load ; 200 or so users it&amp;nbsp; is deadlocking to the point that the application is unusable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 16:33:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deadlocks-in-sql-server-causing-underlying-dbms/m-p/25550#M1347</guid>
      <dc:creator>FemadataSupport</dc:creator>
      <dc:date>2016-03-30T16:33:51Z</dc:date>
    </item>
  </channel>
</rss>

