Whatever value we supply is taken by SQL Server as the value to be set.
For example, the following turns ANSI_WARNINGS (8), QUOTED_IDENTIFIER (256) and XACT_ABORT (16384) to ON. The value 16648 is just a binary OR of the 3 values:
--SELECT (8|256|16384)
--Result: 16648
EXEC sys.sp_configure N'user options', N'16648'
GO
RECONFIGURE WITH OVERRIDE
GO
In order to set QUOTED_IDENTIFIER and XACT_ABORT back to OFF and only keep ANSI_WARNINGS as ON, one can use:
EXEC sys.sp_configure N'user options', N'8'
GO
RECONFIGURE WITH OVERRIDE
GO
If you have any further questions, please do let me know.
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins