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)

sp_lock2  = sp_lock +shows database and object name

By SRiehl,

sp_lock2 is similar to sp_lock, except that it displays the database name, object name and index name instead of the ids.  It accepts no parameters unlike the sp_lock procedure which can take an optional spid parameter. The basis for the main query which queries the system tables for lock info was taken from the sp_lock procedure and modified slighty to lookup the database name. Then a cursor spins through the temp table looking up the object names.

Total article views: 2441 | Views in the last 30 days: 7
 
 
Contribute