Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: 2490 | Views in the last 30 days: 9
 
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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones