Troubleshooting Guide: SQL Server Error 13014
Why This Error Happens
Error 13014 occurs when SQL Server’s required option SET ARITHABORT ON is not enabled for the current session, which is mandatory for operations involving indexed views, indexes on computed columns, filtered indexes, query notifications, XML data type methods, and spatial index operations. This typically happens because the connecting application, driver, or ODBC/OLE DB client is using default session settings that conflict with the strict SET options required by these features. Additionally, incorrect ANSI_NULLS, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ANSI_PADDING, QUOTED_IDENTIFIER, or NUMERIC_ROUNDABORT settings on the connection can also trigger this error since all these SET options must align with specific required values simultaneously.
Step-by-Step Resolution Guide
Step 1: Verify Current Session SET Options
- Open SQL Server Management Studio (SSMS) or Azure Data Studio and connect to your SQL Server 2025 instance.
- Run the following diagnostic query to check current session settings:
DBCC USEROPTIONS;
- Confirm whether
ARITHABORTis listed asON. If it is missing or set toOFF, this confirms the root cause.
Step 2: Manually Set Required SET Options in Your Session or Script
- At the top of your query, stored procedure, or application connection script, explicitly set the required options:
SET ARITHABORT ON;
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
- Save this change permanently inside the stored procedure or view definition if the issue originates from a specific object rather than an ad-hoc query.
Step 3: Fix Driver/Connection-Level Defaults on Windows Server 2025 / Windows 11
- For ODBC connections, open ODBC Data Source Administrator (odbcad32.exe), select your SQL Server DSN, click Configure, and ensure “ANSI NULLS, PADDING, and WARNINGS” are enabled under the advanced settings tab.
- For applications using OLE DB or
SqlClient(.NET), ensureArithabort=trueor equivalent is not being overridden; .NET’sSqlClientsetsARITHABORT ONby default, but legacy JDBC or third-party drivers often set it toOFF—update your connection string to force the correct behavior. - If using a legacy application that cannot be modified, create a Login Trigger or Logon Trigger in SQL Server to force
SET ARITHABORT ONat the server level:
CREATE TRIGGER trg_SetArithAbort
ON ALL SERVER
FOR LOGON
AS
BEGIN
SET ARITHABORT ON;
END;
Step 4: Rebuild or Validate the Affected Indexed View/Index
- If the error occurred during index creation and left the index in a broken state, drop and recreate the affected indexed view or filtered index:
DROP INDEX IF EXISTS IX_YourIndexName ON dbo.YourTable;
GO
SET ARITHABORT ON;
GO
CREATE UNIQUE CLUSTERED INDEX IX_YourIndexName ON dbo.YourView (ColumnName);
- Run this only after confirming Step 1 and Step 2 settings are active in the same session.
Alternative or Verification Steps
- To verify the fix, run
DBCC USEROPTIONS;again after reconnecting through the application and confirmARITHABORTreports asON; then re-execute the failing query or index operation to confirm Error 13014 no longer appears. - As an alternative for persistent application-level issues, enable SQL Server Profiler or Extended Events to trace the exact SET options being sent by the problematic client session, allowing you to pinpoint which specific driver or connection pool is misconfigured.