Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dmaxj
Posting Yak Master
174 Posts |
Posted - 2011-10-24 : 10:11:18
|
Is is possible to find out what events are triggering a deadlock? I have found that SPID 152 was causing a deadlock on my sql server.Is there a way to relate SPID 152 to the actual code that was running at the time, even though I was not running a trace?Regards |
|
Cindyaz
Yak Posting Veteran
73 Posts |
Posted - 2011-10-24 : 10:51:28
|
Enable trace flag 1222. All deadlock information will be captured in the SQL Server's error log.DBCC TRACEON(1222,-1) |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2011-10-24 : 13:40:50
|
quote: Originally posted by dmaxj Is is possible to find out what events are triggering a deadlock? I have found that SPID 152 was causing a deadlock on my sql server.Is there a way to relate SPID 152 to the actual code that was running at the time, even though I was not running a trace?Regards
No its not possible..By the way how did you found that a SPID 152 caused a deadlock when you had no trace ON ?PBUH |
 |
|
dmaxj
Posting Yak Master
174 Posts |
Posted - 2011-10-24 : 16:14:47
|
I am running a tool called Spotlight. It captured the SPID. I am hoping that the tool captured more, but I was hoping to find the query or stored proc without having to dive into the tool too much.Regards |
 |
|
|
|
|