Monitoring Lock Activity in SQL Server

To monitor the performance of a system, you need to keep track of locking activity in SQL Server. The following are the most commonly used methods to do so:

• Querying the sys.dm_tran_locks dynamic management view directly

• Viewing locking activity with SQL Server Profiler

• Monitoring locks with Performance Monitor

As you read through the rest of this chapter, you might want to examine or monitor the locking activity for the examples presented. To assist you in that effort, the following sections describe the methods of examining lock activity in SQL Server 2008.

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.