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 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2008-01-18 : 17:36:23
|
| Trying to get SQL 2005 to report dead locks via email.I performed the followingExecute Sp_configure ‘blocked process threshold’, 200Then generated a deadlockBEGIN TRANUPDATE CUSTOMERSET CUSTOMER_NAME = 'F' WHERE CUSTOMER_ID = '1'WAITFOR TIME '17:52'ROLLBACK TRAN Then on another query ran this SELECT CUSTOMER_NAME FROM CUSTOMERIn sp_who i see it blocked. and the select is waiting for the update.But i do not get anything reported in logs for the dead lock.I tried to set up an alert. MSSQL$ASRCFHSQL2005:Locks Number of Deadlocks/sec Total rises above 1When doing the reconfigure is something supposed to be written to the logs..........Trying to set up system so if any dead locks arise i am sent an emailThanks |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2008-01-18 : 21:16:21
|
| u didnt generate a deadlock, just blocking. not same thing |
 |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2008-01-19 : 09:21:37
|
| Yes now i think about it - How would i get blocks to be emailed. |
 |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2008-01-19 : 09:22:41
|
| i can look in profiler events and warnings and see the blocked process.Anyone know how to get this to email instead of running profiler so i get notified. |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
|
|
|
|
|