|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > HELP! lock analysis |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|