摘要:
查看鎖定:select request_session_id as spid,OBJECT_NAME(resource_associated_entity_id) as tableNamefrom sys.dm_tran_lockswhere resource_type='OBJECT'spid: 就是锁住表的进程tableName: 就是被锁的表名解锁:killspid-----CREATEprocedure [dbo].[sp_who_lock]asbegindeclare @spid int,@bl int,@intTransactionCountOnEntryint,@ 阅读全文