Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Retrieve locking block-chain

By John Liu, 2008/09/02

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: 2239 | Views in the last 30 days: 10
 
Related Articles
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

FORUM

Locking Question: sys.dm_tran_locks

Blocking Chain but no granted locks?

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