O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detecting deadlocks with Trace Flag 1204

In the previous recipe, Detecting deadlocks with SQL Server Profiler, we learned to detect deadlocks using SQL Server Profiler. This can be useful when deadlocks occur regularly in a specific pattern and you are able to reproduce them by executing certain part of application code that you know produces the deadlock. For this type of investigation, you simply start an SQL Trace session, reproduce the deadlock condition, and analyze the queries.

However, when deadlocks occur irregularly, without any specific pattern, it becomes hard for you to investigate them because you do not know in which case they occur. Thus, it also becomes difficult for you to reproduce them. To troubleshoot such irregular deadlocks, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required