Usually you set xact_abort as part of the body of the stored procedure:
CREATE PROCEDURE MyProc AS SET XACT_ABORT ON BEGIN TRAN ....
There are two βspecialβ parameters that are remembered from the session that created the procedure. Explanation from MSDN:
Stored procedures are executed with the SET settings specified during execution with the exception of SET ANSI_NULLS and SET QUOTED_IDENTIFIER. Procedures that specify SET ANSI_NULLS or SET QUOTED_IDENTIFIER are stored, use the one established at the time the stored procedure was created. If used inside a stored procedure, any SET setting is ignored.
So, when creating the stored procedure, SQL Server copies the QUOTED_IDENTIFIER parameter from the connection to the procedure definition. The goal is for someone else with a different QUOTED_IDENTIFIER parameter to still get the behavior of the author of the procedure.
The same does not apply to xact_abort .
source share