The only SET parameter that I have found specific guidance for is SET TRANSACTION ISOLATION LEVEL:
If you issue SET TRANSACTION ISOLATION LEVEL in a stored procedure or trigger, when the object returns control the isolation level is reset to the level in effect when the object was invoked. For example, if you set REPEATABLE READ in a batch, and the batch then calls a stored procedure that sets the isolation level to SERIALIZABLE, the isolation level setting reverts to REPEATABLE READ when the stored procedure returns control to the batch.
What about other SET parameters, like SET XACT_ABORT
or SET DEADLOCK_PRIORITY
? If you set those during a stored procedure (or a batch submitted from C#), will they go back to their previous values the next time the connection gets used?