Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: help needed understanding a deadlock Date: Wed, 03 Aug 2011 23:21:27 +0200 Organization: Erland Sommarskog Lines: 23 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="8833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B04GDVeWgYMtXjHqak7QS" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:5Wotlg7Y0Dh00k2saS2Nki6wOa8= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:584 migurus (migurus@yahoo.com) writes: > UPDATE PR_CUST SET PR_RUN_ID = NULL > WHERE CUST_ID IN (select tid from @IDS) >... > I can not identify which resources specifically were the culprit. Does > the trace shows a page, or some other resource that was a center of > deadlock? It seems that both processes has a shared lock on the table, and then asks for an Intent-Exclusive whereupon they clash. This is a bit strange, since they should take out an Update lock instead; only one proecss at a time can only an Update lock on a resource. But what indexes are there on this table? It seems that this table is a heap (:0 in the object address.) Is there an index on CUST_ID? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx