Monitor blocking queries in SQL Server 2012

551 views Asked by At

I have to monitor blocking queries in SQL Server 2012. How do we figure out which queries are the locked ones? Do I use the Activity Monitor? I want actual SQL statements.

1

There are 1 answers

0
pac On

Run sp_who2.

You can scrol down the results looking at the BlkBy column. Any SPID that has a number is blocked by the spid in the Blkby column. It's actually possible to trace these back until you get to the original blocker SPID.