T-SQL to get all the Error Messages and Error Codes

Technorati Tags: ,,,

Sometimes We Tend to search for Error Codes and Error messages. We require this for trouble shooting.

Here is a Small T-SQL which will get you all the Error Codes and the Respective Error Messages. Hope this Might Help us.

SELECT
    message_id as Error_Code,
    severity,
    is_event_logged as Logged_Event,
    text as [Error_Message]
  FROM sys.messages
  WHERE language_id = 1033;

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