Sql 常见操作

select   request_session_id   spid
,OBJECT_NAME(resource_associated_entity_id)tableName   
from   sys.dm_tran_locks 
where     resource_type   =   'OBJECT '

spid   就是锁住表的进程 
tableName   就是被锁的表名

posted @ 2012-10-08 16:38  ppshinebl  阅读(138)  评论(0编辑  收藏  举报