SQL Server error numbers

E937628

SQL Server error numbers are numeric codes that uniquely identify specific errors and conditions raised by Microsoft SQL Server, enabling precise error handling, logging, and alerting.

Jump to: Statements Referenced by

Statements (48)

Predicate Object
instanceOf SQL Server feature
error code system
associatedWith is_event_logged flag
language id
message text
severity level
state
definedIn sys.messages catalog view
documentedIn Microsoft Learn documentation NERFINISHED
SQL Server Books Online NERFINISHED
exampleErrorNumber 1205
18456
208
229
2601
2627
4060
547
8152
hasProperty numeric
unique per error definition
interpretedBy .NET SqlClient NERFINISHED
ODBC drivers
OLE DB providers NERFINISHED
client applications
maximumValue 2147483647
minimumValue 0
queriedUsing SELECT from sys.messages
raisedBy RAISERROR statement
SQL Server engine NERFINISHED
THROW statement
rangePurpose 0-999 system-defined errors
1000-19999 system-defined errors
50000 and above user-defined errors
reservedRange 0-999
1000-19999
50000-2147483647
supports localization of messages
multiple languages
supportsFeature custom user-defined messages
severity-based error handling
state-based error differentiation
usedBy Microsoft SQL Server NERFINISHED
usedFor alerting
error handling
error logging
identifying specific conditions
identifying specific errors

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

SQL Server Agent supportsAlertOn SQL Server error numbers