Thursday, June 16, 2011

sp_lock and sp_who

Hi prepared a script to imitiate the sp_lock using DMV.

tl.request_session_id as spid,
tl.resource_database_id as dbid,
tl.resource_associated_entity_id as objid,
tl.resource_type type,
tl.resource_description as resource,
tl.request_mode as mode,
tl.request_status as status
FROM sys.dm_tran_locks tl

Preparing a script for sp_who and sp_who2. Should be here soon.


No comments:

Post a Comment