Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 24th, 2003, 07:46 AM
tpemckiernan tpemckiernan is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 tpemckiernan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
HELP! lock analysis

Hi,
I get "Transaction (process id 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim"

I getthis error when pid 51 is removing an EJB from the database.
In other words it is performing

DELETE FROM COORDINATOR WHERE UUID = ?

Where COORDINATOR is my table and the UUID is set at run time.

Rows in the COORDINATOR table refer to the UUID fld of rows in other tables.

My question is how could this deadlock?
To deadlock you need to have at least two resources.
As this is deadlocking on locking resources, it implies that this statement is attempting to acquire at least two locks.

But why? Shouldn't it only need one!
This statement does not reference any other tables so how could it cause deadlock?



Could this be something to do with an index being present on this table?

How can I find out
what lock resources are involved in this deadlock
what the other process ID is involved

please help as I am very confused.
Please feel free to email me at
URL
Thank you,
Tom

Last edited by tpemckiernan : November 24th, 2003 at 08:02 AM.

Reply With Quote
  #2  
Old November 25th, 2003, 08:07 PM
Scorpions4ever Scorpions4ever is offline
Mad Rater
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 126 Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 31 m 44 sec
Reputation Power: 8
From the query analyzer, run sp_who2 and check the BlkBy column. This column shows if a particular query is being blocked by another process and the SPID of that process. Unblocked queries will have the value of this column as "."

Then do a dbcc inputbuffer(SPID) to see what the other process is doing (substitute SPID for the actual process ID)
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.

Last edited by Scorpions4ever : November 25th, 2003 at 08:12 PM.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > HELP! lock analysis


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT