HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to monitor deadlocks

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
monitordeadlockshow

Problem

When do you start troubleshooting a SQL Server 2005/2008 deadlocks and how? The alert is turned on SSMS via SQL Server performance condition alert, objects->SQLServer:Locks, Counter->Lock Waits/Sec, Instance:_Total, alert if counter: rises above value 3. Is this a proactive way of monitoring it? What is the acceptable value? I would highly apprecate your help. Thank you!!!

Solution

You can use Event Notifications to get notified whenever a deadlock happens on the server:

See:

  • Immediate deadlock notifications without changing existing code by Mladen Prajdić



  • Using SQL Profiler to Resolve Deadlocks in SQL Server by Jonathan Kehayias



Additional links:

  • The Anatomy of a Deadlock - Jonathan Kehayias



  • Anatomy of a Deadlock - Part Deux - Jonathan Kehayias



  • Read/Write deadlock - by Remus Rusanu

Context

StackExchange Database Administrators Q#2228, answer score: 7

Revisions (0)

No revisions yet.