DC_AKA_Cremkie
DC_AKA_Cremkie

Reputation: 73

Does set command affect all connections in the same pool?

I'm using the following statement to adjust the deadlock priority for a specific function:

dbContext.Database.ExecuteSqlCommand("SET DEADLOCK_PRIORITY -4");

Will this statement affect all contexts with the same connection string or all connections in the same pool?

Upvotes: 2

Views: 132

Answers (1)

Hossam Barakat
Hossam Barakat

Reputation: 1397

The SET DEADLOCK_PRIORITY as per the MSDN

Specifies the relative importance that the current session continue processing if it is deadlocked with another session.

That said, the deadlock priority will be set to the scope of the current SQL Connection

Upvotes: 1

Related Questions