May 28, 2008

How to get all Microsoft SQL Server errors

This can be achieved by using the sys.sysmessages system view. You may want to specify language to prevent errors localized in all available languages to be returned.
English should be with 1033 id.

Here is a query which will return all the errors for English:

select * from sys.sysmessages where msglangid=1033


Literature which may be useful: Microsoft SQL Server 2005 Unleashed, Microsoft SQL Server 2005 For Dummies
>

No comments: