Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Retrieve locking block-chain

By John Liu,

In SQL2000 or earlier version, it's not easy to build up a accurate locking block chain when needed. The introducing of DMV and Cross Apply in SQL2005 gives DBA the flexibility of quickly building up the accurate locking block chain. One can then join this chain with other DMVs to return the information most interested to them. In this code, I have joined the chain with the sys.dm_exec_sessions DMV to return the host_name, login_name information to see who is blocking whom.

 

(04 Sep: Removed Tab in the code)

Total article views: 2612 | Views in the last 30 days: 13
 
Related Articles
ARTICLE

Blocking Chain (SQL Spackle)

Problems with blocking processes can be easy to identify with SQL Server DMV's.

BLOG

SQLDIY: Alert On Blocking Chains

Continuing the SQLDIY monitoring project we will take a look at tracking blocking events. I actually...

FORUM

blocking

blocking

FORUM

Blocking

Blocking & Blocked by

FORUM

Synonym chaining error

Synonym chaining error

Tags
locking    
 
Contribute