
sqlserver进程死锁关闭的方法
1.首先我们需要判断是哪个用户锁住了哪张表. --查询被锁表 select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type=OBJECT 查询后会返回一个包含spid和tableName列的表. 其中spid是进程名,tableNa…
1.首先我们需要判断是哪个用户锁住了哪张表. --查询被锁表 select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type=OBJECT 查询后会返回一个包含spid和tableName列的表. 其中spid是进程名,tableNa…