use the below sql to find the deadlock:
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type=‘OBJECT‘
then kill spid.
Sometimes, the deadlock is caused by the connections created by SQL studio management. you need to close all these connections.
时间: 2024-10-27 10:16:52