一,查询死锁

//spid :被锁进程ID。

  //tableName:发生死锁的表名。


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

二,杀掉死锁

KILL spid //kill 111234

 

三,显示死锁信息

exec sp_who2 spid

 

相关文章:

  • 2021-12-10
  • 2022-02-28
  • 2022-12-23
  • 2021-11-03
  • 2021-12-27
  • 2021-10-28
  • 2022-02-26
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案