I want to apply some sql-session level settings for certain processes in my c# app.
For instance, I want to set DEADLOCK_PRIORITY for some background processes to LOW.
The questions are:
If I open a new sql connection, does that start a new sql-session?
Will the sql-session live until the connection is closed? If I apply my settings right after the
SqlConnectionis opened, will they be valid for all queries executed in context of that sameSqlConnection?What about connection pooling? Is this possible that my
SET DEADLOCK_PRIORITY LOWsetting will be reused by other processes in my system (which I don't want to) because theSqlConnectionis not actually closed ( asp.net connection pooling decides to reuse it).
Thank you!