How user options works at SQL Server?

Posted on

Question :

I’m searching one way to set ARITHABORT ON for all opened connections, and I found this question.

Some answers says to run the following command, and it really works:

EXEC sys.sp_configure N'user options', N'64'
GO
RECONFIGURE WITH OVERRIDE
GO 

But, for me run this command in my company I need some explanations, and I searched a lot of about user options, but I don’t understand some things:

  • Why the value needs to be 64?
  • How does it works?

Answer :

User options is a combination of bit values, for example:

16    ANSI_PADDING
32    ANSI_NULLS
64    ARITHABORT

To turn on only ARITABORT the value should be 64, and for example for ANSI_NULLS and ARITHABORT it should be 96.

Full list of values available here

Leave a Reply

Your email address will not be published. Required fields are marked *