A personal repository of technical notes. - CSC

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

Problem

Received the following error while performing CREATE Procedure from Visual Studio 2005 after setting up a DDL trigger for database auditing in a SQL Server 2005 database.
INSERT 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.

Solution 1

Added the following line to the DDL auditing database trigger:

SET ARITHABORT ON


Solution 1 References

"Database DDL trigger." Community Bookmarks - MSDN. Web. 19 Aug. 2009.
http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/8333dc82-7390-4145-8081-74d9330938dd.

"SET ARITHABORT (Transact-SQL)." MSDN: Microsoft Development, MSDN Subscriptions, Resources, and More. Web. 19 Aug. 2009.
http://msdn.microsoft.com/en-us/library/ms190306%28SQL.90%29.aspx.

"Behavior When ARITHABORT and ARITHIGNORE Are Set to ON." MSDN: Microsoft Development, MSDN Subscriptions, Resources, and More. Web. 19 Aug. 2009.
http://msdn.microsoft.com/en-us/library/ms189118%28SQL.90%29.aspx.


Solution 2

Found that the database that was throwing the error was configured to be compatible with an older version of SQL Server. Setting the database to be compatible with SQL Server 2005 also corrected the problem.

Solutin 2 References

"Reorg failing - SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'" Community Bookmarks - MSDN. Web. 17 Aug. 2009.
http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/41bf9b3a-ee25-4dde-bf6f-ab1a8d59ea6b.

"Sp_dbcmptlevel (Transact-SQL)." MSDN: Microsoft Development, MSDN Subscriptions, Resources, and More. Web. 17 Aug. 2009.
http://msdn.microsoft.com/en-us/library/ms178653(SQL.90).aspx.

No comments:

Post a Comment