I was trying to add new users to the database using a SQL job which use to fail with Error 1934, but when I run the same command on SQL Query Window there was no error. Following is the error message for reference:
Error: CONDITIONAL failed because the following SET options have incorrect settings:
‘ARITHABORT’. Verify that SET options are correct for use with indexed views
and/or indexes on computed columns and/or query notifications and/or xml data
type methods. (Microsoft SQL Server, Error: 1934)
Cause of the Error: This use to occur as ARITHABORT setting was OFF on specific session. I had to manually enable ARITHABORT to avoid the error.
---- How to Check ARITHABORT property on this session
select sessionproperty('ARITHABORT') -- 1 indicates enable, 0 indicates disable
---- How to Change the settings
set ARITHABORT ON -- To Enable
set ARITHABORT OFF -- To Disable
For using Options in SQL Server: http://msdn.microsoft.com/en-us/library/ms191203.aspx .
Different Options and Description: http://www.mssqltips.com/sqlservertip/1415/determining-set-options-for-a-current-session-in-sql-server/