SqlServer 查询和 Kill 死锁进程
🏷️ SQL Server
查询死锁进程 SQL
sql
SELECT
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
FROM
sys.dm_tran_locks
WHERE resource_type='OBJECT'
Kill 进程
sql
kill 进程ID