Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 2.28 KB

File metadata and controls

46 lines (39 loc) · 2.28 KB
title sys.messages (Transact-SQL)
description The sys.messages view contains a row for each message_id or language_id of the error messages in the system, for both system-defined and user-defined messages.
author rwestMSFT
ms.author randolphwest
ms.date 08/28/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
f1_keywords
messages_TSQL
sys.messages_TSQL
sys.messages
messages
helpviewer_keywords
error messages [SQL Server]
sys.messages catalog view
error numbers [SQL Server]
dev_langs
TSQL

Messages (for errors) catalog views - sys.messages

[!INCLUDE SQL Server]

Contains a row for each message_id or language_id of the error messages in the system, for both system-defined and user-defined messages. For more information, see sp_addmessage.

Column name Data type Description
message_id int ID of the message. Is unique across server. Message IDs less than 50,000 are system messages.
language_id smallint Language ID for which the text in text is used, as defined in sys.languages. This value is unique for a specified message_id.
severity tinyint Severity level of the message, between 0 and 25. This value is the same for all message languages within a message_id.
is_event_logged bit 1 = Message is event-logged when an error is raised. This value is the same for all message languages within a message_id.
text nvarchar(2048) Text of the message used when the corresponding language_id is active.

Permissions

Requires membership in the public role. For more information, see Metadata visibility configuration.

Related content