deadlock in a transaction, how to change priority?

I registered an exception thrown by an ASP.NET application.

Message: transaction (process id 56) was locked | linking buffer resources to another process and was chosen as a dead end victim. Restart the transaction.

I am sure that the reason for this was that I ran some selectsdirectly in SSMS on the tables that were requested in the application at the same time.

So now my question is:

  • Can I change the priority SQL Server selects “victims of blocking”? I would like to choose “I” (SSMS) as a victim of a deadlock rather than ASP.NET, because it is a critical application, and it’s easier for me to repeat the manual request than for users to accept the error.

Thanks in advance.

+3
source share
1 answer

SET DEADLOCK_PRIORITY lets you fine tune priority

You can specify this in your SSMS session (for each request window) or globally:

Tools..Options..etc

+5
source

All Articles