Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 ARITHABORT AND STORED PROCS

Author  Topic 

chih
Posting Yak Master

154 Posts

Posted - 2007-05-01 : 02:10:16
I wrote a stored procedure and set it as a schedule. it has no problem when I execute this SP in query analyzer. But it will show error when I execute it in schedule job.
I think the main reason is I have created a DDL trigger that will fire when DDL_DATABASE_LEVEL_EVENTS happens. Any solution?



SELECT 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. [SQLSTATE 42000] (Error 1934). The step failed.


Kristen
Test

22859 Posts

Posted - 2007-05-01 : 03:59:06
Make sure that the Sproc sets ARITHABORT. In my experience this is a complete PITA once you have indexed views or some other stuff - possibly computed fields which are indexed - I forget the details, but we avoid them all now!

On occasion we have had to get ARITHABORT set correctly from the client before the Sproc can be executed, so I've come to the conclusion that its basically a Black Art!

Kristen
Go to Top of Page

toltek
Starting Member

1 Post

Posted - 2007-05-08 : 09:58:48
wrap a call to your sproc into call from another sproc, like

create proc WrapperProc
as
set ARITHABORT ON
exec YourProc
set ARITHABORT OFF

and call WrapperProc from job
Go to Top of Page
   

- Advertisement -