Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #584

Re: help needed understanding a deadlock

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 <esquel@sommarskog.se>
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 <Xns9F36ED9B1E89EYazorman@127.0.0.1> (permalink)
References <ac08fe04-4d59-4eb4-be89-6cd358873b29@j9g2000prj.googlegroups.com>
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

Show key headers only | View raw


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

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Find similar


Thread

help needed understanding a deadlock migurus <migurus@yahoo.com> - 2011-08-02 19:56 -0700
  Re: help needed understanding a deadlock Erland Sommarskog <esquel@sommarskog.se> - 2011-08-03 23:21 +0200

csiph-web