How do I know which SQL queries are blocked and what blocks them?

I am trying to optimize some slow web pages and I assume that the problem is with SQL locking (apparently this is not a matter of using processor or I / O on the web server or database server). What is the fastest way to find out which requests are blocked and which requests are blocked?

+7
performance optimization sql sql-server blocking
source share
3 answers
SELECT p1.SPID AS blockedSPID, p2.SPID AS blockingSPID, ... FROM master..sysprocesses p1 JOIN master..sysprocesses p2 ON p1.blocked = p2.spid 

Remus: The activity monitor may turn off when the server boots with error 1222

MS KB 224453 has a lot of good.

+12
source share
+4
source share

All Articles