sqlserver数据库,查询死锁进程SQL语句

-----查询死锁ID
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT'

    ---杀死死锁
    kill id

猜你喜欢

转载自blog.51cto.com/4085457/2390434