Edit

Database Engine events and errors

This section contains error message numbers and their descriptions, which are taken from the text of the error message in the sys.messages catalog view. Where applicable, the error number is a link to further information.

You can query the Database Engine to see a full list of all errors, by running the following query against the sys.messages catalog view:

SELECT message_id AS Error,
    severity AS Severity,
    [Event Logged] = CASE is_event_logged
        WHEN 0 THEN 'No' ELSE 'Yes'
        END,
    [text] AS [Description]
FROM sys.messages
/* replace language_id code with the desired sys.syslanguages.msglangid.
1033 is for US English */
WHERE language_id = 1033 
ORDER BY message_id;

SQL Database Engine version

Many error codes are shared across different platforms using the SQL Database Engine.

This article shows events and errors for SQL Server 2017 (14.x). If you want to view events and errors for other versions of SQL Server, see:

This article shows events and errors for SQL Server 2019 (15.x). If you want to view events and errors for other versions of SQL Server, see:

This article shows events and errors for SQL Server 2022 (16.x). If you want to view events and errors for other versions of SQL Server, see:

This article shows events and errors for SQL Server 2025 (17.x). If you want to view events and errors for other versions of SQL Server, see:

This article shows events and errors for Warehouse in Microsoft Fabric. If you want to view events and errors for other versions of SQL Server, see:

Errors and events

Visit the following sections for more detail about error and event codes: