Error Message Meanings in SQL Server

As a SQL Server Database Administrator, you will sometimes get a call from a user telling you they saw an error message. You will usually ask what did the message say, and the user will start with “It said something about…” and an error number. If you can get the error number, SQL Server can tell you what the error message actually said.

troubleshoot-SQL

In this example, we look at error 108:

SELECT
   message_id,
   language_id,
   severity,
   is_event_logged,
   text
FROM sys.messages
WHERE language_id = 1033
      and 
      message_id 108;

The different parts have specific usefulness, as this table from Microsoft shows.

Column name Data type Description
message_id int ID of the message. Is unique across server. Message IDs less than 50000 are system messages.
language_id smallint Language ID for which the text in text is used, as defined in syslanguages. This is unique for a specified message_id.
severity tinyint Severity level of the message, between 1 and 25. This 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 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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s