Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
 Behavior When ARITHABORT and ARITHI...

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (June 2009)
Behavior When ARITHABORT and ARITHIGNORE Are Set to ON

If both the ARITHABORT and ARITHIGNORE query-processing options are set to ON, ARITHABORT takes precedence.

ARITHABORT and ARITHIGNORE are two distinct options; setting one to ON does not automatically set the other to OFF. For example, if an application contains the following statements, both options are set to ON:

SET ARITHABORT ON
SET ARITHIGNORE ON
GO

When a SET statement is executed in a stored procedure, the new setting is active only until the procedure is completed. When the procedure is completed, the connection's setting for that option will go back to what it was before the procedure was executed.

The ANSI_WARNINGS setting affects query processor behavior regardless of the current settings of ARITHABORT and ARITHIGNORE.

For example, if SET ARITHABORT or SET ARITHIGNORE is set to OFF and SET ANSI_WARNINGS is set to ON, Microsoft SQL Server will still return an error message when it encounters divide-by-zero or overflow errors.

This table summarizes the behavior.

ARITHABORT ANSI_WARNINGS Behavior

ON

ON

Abort statement only.

ON

OFF

Abort batch.

OFF

ON

Abort statement only.

OFF

OFF

Continue; value is NULL.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker