Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

MSSQLFUN

I, Rohit Garg, am working as Consultant in IT Company. I am having an around 5 years of experience in MSSQL server & other Microsoft technologies. I am working as DBA in Microsoft SQL Server from last 5 years in e-Commerce, Telecom, Finance domain. In this tenure, I got a chance of working as Database administrator, Developer and trainer on SQL server 2000 to SQL Server 2012. I am holding Master’s degree in Computer Science along with certification in SQL Server & .Net. I like to learn new things by hand-on experience on regular basis. This journey is so far is delightful & valuable with the addition of wonderful friends.

SQL Server – List of all the Error codes or messages

Question:

I want list of all error codes & messages of SQL server.

Answer:

Once some ask this thing to you or this though comes to your mind, I am sure most of us will start goggling or looking into BOL for the details

But SQL server also Contains one row for each system error or warning that can be returned by Microsoft SQL Server.

You can get the List of all the Error codes or messages as

In SQL Server 2000

USE MASTER

GO

SELECT * FROM SYSMESSAGES

Column name Description
error Unique error number.
severity Severity level of the error.
dlevel For internal use only.
description Explanation of the error with placeholders for parameters.
mslangid System message group ID.

In SQL Server 2005 & above

USE MASTER

GO

SELECT * FROM SYS.MESSAGES

Column name Description
message_id ID of the message. Is unique across server. Message IDs less than 50000 are system messages.
language_id Language ID for which the text in text is used, as defined in syslanguages. This is unique for a specified message_id.
severity Severity level of the message, between 1 and 25. This is the same for all message languages within a message_id.
is_event_logged 1 = Message is event-logged when an error is raised. This is the same for all message languages within a message_id.
text Text of the message used when the corresponding language_id is active.

Comments

Leave a comment on the original post [mssqlfun.com, opens in a new window]

Loading comments...