Got this when I ran my sp__updatestats procedure in a SQL Agent jobstep, but it worked in Query Analyzer. The reason? The default settings are probably different in QA rather than external connections similar to SQL Agent.

Msg 1934, Sev 16: UPDATE STATISTICS failed because the following SET options have incorrect settings: 'ARITHABORT'. [SQLSTATE 42000]

The solution was to recreate the procedure that ran UPDATE STATISTICS using a SET command within the procedure. 

CREATE PROCEDURE dbo.sp__UpdateStats
AS
SET 
ARITHABORT ON 
SET 
QUOTED_IDENTIFIER ON 
...

We started to get this problem after I added a computed column to a table. 


Posted in: ERRORs , SQL , SQLAgent  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
John posted on October 20, 2008 06:53

PROBLEM: MSDTC seems to be working. e.g. Linked queries to servers or in this case a text file can be queried etc. while running individual commands in Query Analyzer, but fail running the entire procedure.

Not caring the whys of it, what is wrong with DTC that we can fix?

For Windows 2003 SP1, see these instructions. Basically don't use Local System account. Try this account and search for the local account login of NetworkService.  When it comes up there is something in the password field, ooops. Seems to work if we clear both password textboxes.

 After your changes simply bounce the MSDTC service and run your SQL query again. This time it should work.


Posted in: SQL , ERRORs  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 The SQL DBA