I have just got this email here:
Then looking at the sql server log I find this deadlock was caused by one of our procedures (that was the victim) against the replication.
O.K. in this case in particular I noticed that this specific procedure could be tuned, I even found a missing index, as you can see below.
But this same situation has happened so many times, I would have had the procedure won, the replication was the victim, and I would deal with the procedure later on.
How can I put this:
SET DEADLOCK_PRIORITY LOW
everywhere, in every replication transaction?
this is to check it out:
SELECT session_id,deadlock_priority
FROM sys.dm_exec_sessions
WHERE SESSION_ID = @@SPID
How