TechNet
Export (0) Print
Expand All

sys.messages (Transact-SQL)

 

Applies To: 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 (Transact-SQL).

Applies to: SQL Server (SQL Server 2008 through current version).
Column nameData typeDescription
message_idintID of the message. Is unique across server. Message IDs less than 50000 are system messages.
language_idsmallintLanguage ID for which the text in text is used, as defined in syslanguages. This is unique for a specified message_id.
severitytinyintSeverity level of the message, between 1 and 25. This is the same for all message languages within a message_id.
is_event_loggedbit1 = Message is event-logged when an error is raised. This is the same for all message languages within a message_id.
textnvarchar(2048)Text of the message used when the corresponding language_id is active.

Requires membership in the public role. For more information, see Metadata Visibility Configuration.

THROW (Transact-SQL)
Catalog Views (Transact-SQL)
Messages (for Errors) Catalog Views (Transact-SQL)
Exception Message Box Programming
Error Messages
Database Engine Events and Errors

Community Additions

ADD
Show:
© 2016 Microsoft