473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SET options have incorrect settings: 'ARITHABORT'

Hi,

I am getting the following error when I run a stored procedure in
which I am inserting/deleting data from a view that selects from a
remote table.

INSERT failed because the following SET options have incorrect
settings: 'ARITHABORT'

The first statement in the stored procedure is 'set arithabort on'. I
also ran 'set arithabort on' before creating the view.

I read many articles ragarding the setting of arithabort. I set it for
the connection, for the database (alter database) and above all for
the server (sp_configure) but could not get around the above error.

However, when I had made the setting using "sp_configure 'user
options', 64" I was able to run the stored procedure successfully a
couple of times. But, later when I had resest 'user options' to 0 and
then back to 64 just to reproduce the earlier error and confirm that
the error does not come with the 'user options' to 64 setting I was
getting the same error.

Is there any way by which I can overcome the problem?

Thanks,
Iqbal
Jul 20 '05 #1
3 23435
[posted and mailed, please reply in news]

Iqbal (iq*********@hotmail.com) writes:
I am getting the following error when I run a stored procedure in
which I am inserting/deleting data from a view that selects from a
remote table.

INSERT failed because the following SET options have incorrect
settings: 'ARITHABORT'

The first statement in the stored procedure is 'set arithabort on'.
That might be too late. The error happens when you invoke the procedure,
and SQL Server tries to create a plan for it. At this point ARITHABORT is
OFF, and thus the plan-building fails.

There are a couple of workarounds. One is:
However, when I had made the setting using "sp_configure 'user
options', 64"


Others:

o ALTER DATABASE db SET ARITHABORT ON

o Issue SET ARITHABORT ON from the client when you connect.

o Move the body of the procedure to an inner procedure, and keep the
current procedure as a wrapper that says SET ARITHABORT ON; EXEC
inner_sp.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
Hi,

I was able to run the stored procedure successfully. I had mentioned
that I am inserting/deleting data from a view that selects from a
remote table. It was only when I changed the server settings for both
the local and remote servers to set arithabort on, I was able to run
the stored procedure successfully. I ran the following command on both
the servers:

sp_configure 'user options', 64
reconfigure

I first tried to change the database settings on both the servers to
have arithabort on using the 'alter database' command, but that too
did not remove the error. Only after changing the server settings I
was able to overcome the error.

Thanks for the help.
Iqbal

Erland Sommarskog <es****@sommarskog.se> wrote in message news:<Xn**********************@127.0.0.1>...
[posted and mailed, please reply in news]

Iqbal (iq*********@hotmail.com) writes:
I am getting the following error when I run a stored procedure in
which I am inserting/deleting data from a view that selects from a
remote table.

INSERT failed because the following SET options have incorrect
settings: 'ARITHABORT'

The first statement in the stored procedure is 'set arithabort on'.


That might be too late. The error happens when you invoke the procedure,
and SQL Server tries to create a plan for it. At this point ARITHABORT is
OFF, and thus the plan-building fails.

There are a couple of workarounds. One is:
However, when I had made the setting using "sp_configure 'user
options', 64"


Others:

o ALTER DATABASE db SET ARITHABORT ON

o Issue SET ARITHABORT ON from the client when you connect.

o Move the body of the procedure to an inner procedure, and keep the
current procedure as a wrapper that says SET ARITHABORT ON; EXEC
inner_sp.

Jul 20 '05 #3
Iqbal (iq*********@hotmail.com) writes:
I was able to run the stored procedure successfully. I had mentioned
that I am inserting/deleting data from a view that selects from a
remote table. It was only when I changed the server settings for both
the local and remote servers to set arithabort on, I was able to run
the stored procedure successfully. I ran the following command on both
the servers:

sp_configure 'user options', 64
reconfigure

I first tried to change the database settings on both the servers to
have arithabort on using the 'alter database' command, but that too
did not remove the error. Only after changing the server settings I
was able to overcome the error.


I would guess that the remote table is in fact an indexed view, or
you are accessing an indexed computed column in that table. To access
indexed views and indexed computed columns, there are a couple of settings
that must be on: ANSI_NULLS, ANSI_WARNINGS, ANSI_PADDING,
CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER and ARITHABORT. All these
settings are also on by default - except for ARITHABORT. For the local
process, there are a couple of ways to set it, but for the remote
connection, it's likely that 'user options' is the only way to go.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matt Rink | last post by:
Getting an "incorrect settings: 'ANSI_NULLS., QUOTED_IDENTIFIER'." error after creating a view. We wanted a composite unique constraint that ignored nulls, so we set up a view using the...
1
by: Steve Foster | last post by:
I have tried many variations (after reviewing other posts) and can not resolve the following issue: RUNNING SQL MAINTENANCE ---------------------------- SET ARITHABORT ON SET...
4
by: teddysnips | last post by:
I am trying to insert a row into a table using a stored procedure and I get the following error if I try this from QA: INSERT failed because the following SET options have incorrect settings:...
0
by: Kenneth Jonsson | last post by:
I have posted this in microsoft.public.dotnet.framework.aspnet.webservices without any response. My problem is with connections from client computers with a dynamic proxy settings in IE to my...
6
by: ilo | last post by:
When I want to delete a data from a table that this tabl has a trigger and this trigger reached another tables to delete the data in cursor I have this messeage: DELETE failed because the...
4
by: Richard Lewis Haggard | last post by:
I have an application that can't use the registry to save various user options and application settings. My first thought was to simply use an application configuration file but this approach seems...
2
by: Regnab | last post by:
I'm creating a database that will be used independently at different sites (in the same company). Given the fact that there will be inevitable changes down the track, I'm trying to work out the...
6
by: balakrishnan.dinesh | last post by:
hi frnds I need to change the Browser settings dynamically in Onload event through javascript. Like Goto: Tools->Internet Options -General -Settings -Check for newer Versions of stored pages....
2
by: srinivasyadavkota | last post by:
Hi Experts here, Pls help. first I set the following in IE6 :Under Tools/Internet Options... 1) Temporary Internet file 2) Check for newer versions of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.