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 |
venkath
Posting Yak Master
202 Posts |
Posted - 2006-07-04 : 01:30:05
|
Hi allHow to notified automatically or how to know when ever the deadlock occurs in the database...Thanks |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-07-04 : 03:02:27
|
this one's tricky and best left to determine which ones are engaged in deadlocks rather than let it run it's own course and get notified when it occursi never have explored the alerts much but without using alerts, you can browse the sysprocesses table and send email if rowcount>0, for automation, schedule the query... below is a simple code to query for deadlocksselect s1.spid,s1.blocked from master..sysprocesses s1join master..sysprocesses s2on s1.spid=s2.blocked and s1.blocked=s2.spid --------------------keeping it simple... |
 |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2006-07-05 : 03:19:02
|
>> How to notified automatically or how to know when ever the deadlock occurs in the >> database...1. Create an alert for deadlock 2. In the response tab, you can configure for email/net send/ pager. ------------------------I think, therefore I am - Rene Descartes |
 |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2006-07-05 : 03:24:36
|
-- Following code will eneter the deadlock code to sql server logdbcc traceon (1204, 3605, -1)godbcc tracestatus(-1)goNeed to do more work on this..------------------------I think, therefore I am - Rene Descartes |
 |
|
|
|
|