Thursday, March 29, 2012

Error List, Sql Server 2005

Hello, I would like to know if there is an list of mistakes where appears all errors that you can find to interact with the SQL.

for example something similar like this:

Error number 2627 Means that exists a record with the same primary key

Error number 505 Means that ther is a row with doesn't accept nulls

Thanks, my email pac_mt@.hotmail.com .

Are you looking for the possible error messages? You can query master.dbo.sysmessages in older versions of SQL Server and sys.messages in SQL Server 2005. Older versions of Books Online also has the list of error numbers/messages.|||

The problem is that sysmessages doesn't contain all error numbers. For instance, I can't find the error 1326: An error has occurred while establishing a connection to the server...

Why are not all errors documented and is there any unofficial documentation where I can find the full list of errors?

Thanks

|||

1326 is not a SQL Server error message. It is raised by the client data access library. All the error messages raised by server should be present in the system table. But not all error messages may be documented in Books Online. If you find such errors and would like to see it documented then please use the feedback mechanism in Books Online to submit a work item. This is the best way to send feedback for documentation issues.

See below topic for SQL Server 2000 error messages:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_syserrors1_6m5z.asp

And btw, the latest update (July 2006) of SQL Server 2005 Books Online contains the error message topics too. See below links:

http://msdn2.microsoft.com/en-us/library/aa337472.aspx

http://msdn2.microsoft.com/en-us/library/ms365262.aspx

http://msdn2.microsoft.com/en-us/library/ms165761.aspx

|||

Thanks.

I actually decompiled System.Data.SqlClient yesterday and noticed these connection errors come from dbnetlib.dll

These error messages, thrown by ado.net as SqlExceptions, are really hard to identify as there are dozens of different error numbers for the VERY same error description (like 5, 51, 121, 231, 1326) and sometimes they overlap the native SQL Server errors.

I'll also post this to a ADO.NET forum. Thanks again.

sql

No comments:

Post a Comment