SET DEADLOCK_PRIORITY
Is this command imperative for MS SQL server?
I have two concurrent threads which can be deadlocked. One thread is background and I prefer to set it as deadlock victim (in case of deadlock) using SET DEADLOCK_PRIORITY LOW.
Unfortunately, sometimes main thread is selected to be victim.
Why?
Quote from SQL Server books:
"...LOW - Specifies that the current session is the preferred deadlock victim. The deadlock victim's transaction is automatically rolled back by Microsoft? SQL Server?, and the deadlock error message 1205 is returned to the client application..."
Does "session" mean connection or transaction? i.e. Does SET DEADLOCK_PRIORITY change priority until transaction finished/connection closed or its scope only following statement?

