ArithAbort

Description

Specifies whether to enable ArithAbort session option for Microsoft SQL Server.

In Microsoft SQL Server, query performance can degrade when application sessions use ARITHABORT OFF and numeric types do not match.

Applies to

ADO.NET (For SQL Server only)

MSOLEDBSQL Microsoft OLE DB Driver for SQL Server

Syntax

ArithAbort=value

Parameter

Description

value

A value specifying the setting of ArithAbort. Values are:

  • 1

    Set ARITHABORT on

  • 0

    Set ARITHABORT off

  • Not specified

    (Default) Does not set the option explicitly; the default behavior of the connection or environment is used.


Usage

When you set ArithAbort to 1, the "SET ARITHABORT ON" command is automatically sent to Microsoft SQL Server.

When you set ArithAbort to 0, the "SET ARITHABORT OFF" command is automatically sent to Microsoft SQL Server.

When not specified, the ARITHABORT behavior depends on the client environment. Application connections (such as OLE DB or ADO.NET) typically default to OFF, while tools like SQL Server Management Studio (SSMS) default to ON.

According to Microsoft official documentation, always set ARITHABORT to ON in your logon sessions. Setting ARITHABORT to OFF can negatively impact query optimization, leading to performance issues.

Examples

To set ARITHABORT to on:

  • Database profile

    Select the Set ARITHABORT check box on the Syntax page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

    SQLCA.DBParm="ArithAbort=1"