SQL Blocking script

24 April,2007 by Jack Vamvas

List SQL processes which are blocked. List which  SQL processes are blocking other processes.

 

/******************************************************************
--File Name    : blocked.sql
-- Author       : Jack Vamvas
-- Description  :processes which are blocked, which processes are blocking other processes
-- Last Modified:19/03/2007
******************************************************************/
SELECT * FROM dbo.sysprocessesWHERE blocked <> 0;
SELECT * FROM dbo.sysprocesses WHERE spid IN (SELECT blocked FROM dbo.sysprocesses where blocked <> 0);

How to monitor Blocked Processes with SQL Alert and email sp_whoisActive report

Read More

sys.sysprocesses and permissions

Cached blocking history with sys.dm_db_index_operational_stats

SQL Server – Deleting Distributed Orphaned Transactions

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on SQL Blocking script


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer