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. |
Hi I tried to execute that script however it post different languages.
Can you elaborate the issue or share the issue screenshot ? I am not getting you completely.
Try this
select * from sys.messages where language_id = 1033
Language_id=1033 fetches error messages in the English Language
Language_id = 1033 fetches all error messages in the English language
[…] http://mssqlfun.com/2012/11/05/sql-server-list-of-all-the-error-codes-or-messages/ […]
[…] http://mssqlfun.com/2012/11/05/sql-server-list-of-all-the-error-codes-or-messages/ […]
Apologies. I already found out the problem. Thank you for sharing the script anyway.
Wow, that’s what I was exploring for, what a information! present here at this web site, thanks admin of this site.
[…] 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 …… […]
[…] 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 …… […]
[…] SQL Server – List of all the Error codes or messages … – I want list of all error codes & messages of SQL server. … 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. […]
[…] SQL Server – List of all the Error codes or messages … – I want list of all error codes & messages of SQL server. … 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. […]