查看别锁表

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

解锁方式:

1 declare @spid int 
2 Set @spid = 244 --锁表进程
3 declare @sql varchar(1000)
4 set @sql='kill '+cast(@spid as varchar)
5 exec(@sql)

244为进程号  根据查询锁表的信息 得到进程号

相关文章:

  • 2021-11-23
  • 2021-11-27
  • 2021-11-16
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
相关资源
相似解决方案