This SP will give a listing of users blocking and being blocked in a tree formation (similar to explorer tree list). It uses a User defined function that recurses through the locking information gathered from sysprocesses. The listing only shows the Hostname (username) and the SPID.
First create the User Defined Function (Part One) then create the (U)SP. Usage "Exec USP_LOCKTREE" (sans quotes).
2007-10-19 (first published: 2007-07-25)
9,291 reads