Thursday, September 23, 2010

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.

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