1.首先查询出死锁的进程

SELECT
	request_session_id spid,
	OBJECT_NAME(
		resource_associated_entity_id
	) tableName
FROM
	sys.dm_tran_locks
WHERE
	resource_type = 'OBJECT'

Sql Server数据库查询死锁和解决死锁_编程

2.杀掉进程

kill spid