﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administration / SQL Server 7,2000  / Posting Deadlock Data / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 18:22:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>Excellent. Glad you came right.</description><pubDate>Sat, 13 Sep 2008 03:10:28 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>Found it!!!Our freight calculation (delphi code) is doing a delete-insert every time freight is re-calculated.   Freight has a item_number and we have three indexes that have the item number in the lead position.   Every calculation is causing the indexes to be updated and affectively creating a hot spot where the deadlocks are happening.We are going to change the calculation to use insert-update instead.   Tracing for the locks:acquired in our development environment help me get the answer.Gail, your point on the foriegn key got me going in a new direction and help find the contention point.  Thanks for the assist.David</description><pubDate>Fri, 12 Sep 2008 12:58:27 GMT</pubDate><dc:creator>David O</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>Gail Thanks for the insight.  I hadn't thought of that at all. I think I'm guilty of over-engineer my joins in an effort to address the previous deadlock issue.   The Delphi code (yes,  I work in a delphi shop please don't laugh to hard) had been deadlocking on it's use of sp_executesql.Here is the code,  any additional ideas would be appreciated.</description><pubDate>Thu, 11 Sep 2008 10:18:52 GMT</pubDate><dc:creator>David O</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>What it looks like is that both processes had a shared lock (probably from a foreign key check earlier on) and then both wanted an exclusive. Neither can get the exclusive until the other releases the share... deadlock.Can you please post the procedure and indicate while is line 106, and also post the schema and indexes of the tables involved (at minimum the table that's actually been deleted on line 106)</description><pubDate>Thu, 11 Sep 2008 01:10:56 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>Ok,  now that Gail has taught me how to post. :)The attached file shows the statement level trace for the two deadlocking spids plus the deadlock collision from the errorlog.   A deadlock should be a conflict over two resources between two processes.   This data shows that deadlock happened over one resource (dbo.order_detail).   I would have expected this to block and resolve not deadlock.I'm getting multiple deadlocks a day on this procedure so it isn't a freak event.Any thoughts or suggestions would be appreciated.</description><pubDate>Wed, 10 Sep 2008 16:02:21 GMT</pubDate><dc:creator>David O</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>GailSo that is what the attachment button is for:D;)Amazing what you learn when you scroll down. :w00t:</description><pubDate>Wed, 10 Sep 2008 09:54:54 GMT</pubDate><dc:creator>David O</dc:creator></item><item><title>RE: Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>What format's the deadlock info? If it's the text deadlock graph from the error log, just put it into a post. Otherwise zip and attach and explain what's in the zip file.</description><pubDate>Wed, 10 Sep 2008 09:29:08 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Posting Deadlock Data</title><link>http://www.sqlservercentral.com/Forums/Topic567028-5-1.aspx</link><description>I have deadlock data (trace flag stuff) and corresponding trace data.  What is the best way to include that data in a post?David</description><pubDate>Wed, 10 Sep 2008 09:22:41 GMT</pubDate><dc:creator>David O</dc:creator></item></channel></rss>