Редактиране

Споделяне чрез


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
WHERE language_id = 1040 /* replace 1040 with the desired language ID, such as 1033 for US English */
ORDER BY message_id;

SQL Server version

This article shows events and errors for SQL Server 2016 (13.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 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:

Errors and events

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