sql server alter database question

I am trying to delete a row in my db and I get this message:

DELETE 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 filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

I have done a little research and it appears that I need to run the following command:

ALTER DATABASE MyReportingDB SET ARITHABORT ON

Is that so and, if so, why?

Thanks~
Bob SchneiderCo-OwnerAsked:
Who is Participating?
 
sumerdaiCommented:
How are you trying to delete it? Are using the SQL management tools or another tool? I think that when you connect through other tools ARITHABORT is OFF by default.
0
 
Eugene ZCommented:
please check if it is your case
Incorrect requirement that ARITHABORT should be ON for XQuery and XML methods
http://connect.microsoft.com/SQLServer/feedback/details/354563/incorrect-requirement-that-arithabort-should-be-on-for-xquery-and-xml-methods

please tell more: is it xml data, indexed view part?
what your db the compatibility level is 90 or 100
if it is 80 try to change to 100 (sql2008) and try delete code
0
 
Bob SchneiderCo-OwnerAuthor Commented:
I am trying to delete a single record in my sql server 2008 db.  I tried this in the "New Query" window using a "delete from mydb where ...".  It is tied to other records in other tables via a PK-FK relationship with the PK being in the record I am trying to delete.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
sumerdaiCommented:
Do either of these table have an index which is based on a computed column? If so, please try increasing your compatibility level  (as EugeneZ suggested) by right clicking on the database and selecting properties.  You can find the compatibility Level on the Options page. Alternately, you can change the index to not reference the computed column.

If this does not seem to be the case, please check if either of these tables is used in an indexed view, as this will cause the same issue.
0
 
Bob SchneiderCo-OwnerAuthor Commented:
the PK table, the one that houses the record I am deleting, is used in an index.  
0
 
sumerdaiCommented:
Then you either must raise the compatibility level or remove the table from the index
0
 
Bob SchneiderCo-OwnerAuthor Commented:
I raised the compatibility level to 100.  We will see what happens.  Thanks!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.