If two database sessions are deadlocked SQL Server will by default select the lowest cost rollback as the "deadlock victim". There is a way to influence SQL Server if you would like a process to avoid being a deadlock victim. Simply, add a call to your code "SET DEADLOCK_PRIORTY HIGH". This can either be called from your database session or from within a stored procedure that you call. Not, that this should be used in specific situations. If you use it everywhere you will defeat the purpose since if two sessions have this setting and run into a deadlock situation SQL Server will default back to the lowest cost algorithm.