SQL Server Errors
As a SQL Server DBA, we may have to troubleshoot various errors returned by SQL Server regularly. In order to troubleshoot those errors, we either follow a systematic approach from top to bottom or vice-versa, else we may just do a quick search in internet for a solution for that error and if lucky enough, we find the answer to our issue quickly.
There is no particular website where common SQL Server errors and their resolutions are documented together in categories wise. This is my attempt to categorize and document common SQL Server errors, along with their resolutions, so that it would be easier to search for particular errors and their solutions. Example, if you are searching for error returned by backup failure, you can check the SQL Server common backup errors page and will have more possibilities of finding the error you encountered and the solution.
Let’s first see some basics about the Errors returned in SQL Server
When SQL Server encounters an issue, it returns an error to the user, the error message include Error number, Severity and State, also associated error message. SQL Server system errors are returned with error id below 50,000 and any errors above 50,000 are user defined custom error messages. We are interested only on SQL Server system errors whose error number is less than 50,000. Some of the errors may also be logged into SQL Server Errorlog and Application/System event logs. There can be other errors related to SQL Server installation and can have different error numbers and the format of these errors will be different.
This is how the error message in SQL Server may look like. This occurred for login failure issue.
Error: 18456, Severity: 14, State: 16.
Login failed for user 'test'. [CLIENT: xxx.xxx.xxx.xxx]
If we query sys.messages system table, we can find the error message string associated with the error number. There may be multiple results returned, one for each different language.
select * from sys.messages where message_id = 18456
Below articles consists of some of the common errors encountered in SQL Server, grouped based on their category.
SQL Server In-Memory OLTP Common Errors or Issues
SQL Server Performance Common Errors or Issues
SQL Server Database Mirroring Common Errors or Issues
SQL Server Replication Common Errors or Issues
SQL Server Tools Common Errors or Issues
SQL Server Memory Common Errors or Issues
SQL Server Cluster Shared Volume (CSV) Common Errors or Issues
SQL Server Connectivity Common Errors or Issues
SQL Server Growth or Shrink Common Errors or Issues
SQL Server Security Common Errors or Issues
SQL Server Encryption Common Errors or Issues
SQL Server Reporting Services Common Errors or Issues
SQL Server Integration Services Common Errors or Issues
SQL Server Analysis Services Common Errors or Issues
This will be applicable on below versions of SQL Server
SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
Hope this was helpful.
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.