Is there an overview of all SQL Server 2012 error codes? Is there an overview of all SQL Server 2012 error codes? sql-server sql-server

Is there an overview of all SQL Server 2012 error codes?


I'm unable to find a list of the individual codes in the internet. However I did find a list of the severity levels here on MSDN. They are as follows:

Severity level / Description

  • 0-9: Informational messages that return status information or reporterrors that are not severe. The Database Engine does not raise systemerrors with severities of 0 through 9.
  • 10: Informational messagesthat return status information or report errors that are not severe.For compatibility reasons, the Database Engine converts severity 10to severity 0 before returning the error information to the callingapplication.
  • 11-16: Indicate errors that can be corrected by theuser.
  • 11: Indicates that the given object or entity does not exist.
  • 12: A special severity for queries that do not use locking because ofspecial query hints. In some cases, read operations performed bythese statements could result in inconsistent data, since locks arenot taken to guarantee consistency.
  • 13: Indicates transactiondeadlock errors.
  • 14: Indicates security-related errors, such aspermission denied.
  • 15: Indicates syntax errors in the Transact-SQLcommand.
  • 16: Indicates general errors that can be corrected by theuser.
  • 17-19: Indicate software errors that cannot be corrected by theuser. Inform your system administrator of the problem.
  • 17: Indicatesthat the statement caused SQL Server to run out of resources (such asmemory, locks, or disk space for the database) or to exceed somelimit set by the system administrator.
  • 18: Indicates a problem in theDatabase Engine software, but the statement completes execution, andthe connection to the instance of the Database Engine is maintained.The system administrator should be informed every time a message witha severity level of 18 occurs.
  • 19: Indicates that a nonconfigurableDatabase Engine limit has been exceeded and the current batch processhas been terminated. Error messages with a severity level of 19 orhigher stop the execution of the current batch. Severity level 19errors are rare and must be corrected by the system administrator oryour primary support provider. Contact your system administrator whena message with a severity level 19 is raised. Error messages with aseverity level from 19 through 25 are written to the error log.
  • 20-24: Indicate system problems and are fatal errors, which meansthat the Database Engine task that is executing a statement or batchis no longer running. The task records information about whatoccurred and then terminates. In most cases, the applicationconnection to the instance of the Database Engine may also terminate.If this happens, depending on the problem, the application might notbe able to reconnect. Error messages in this range can affect all ofthe processes accessing data in the same database and may indicatethat a database or object is damaged. Error messages with a severitylevel from 19 through 24 are written to the error log.
  • 20: Indicatesthat a statement has encountered a problem. Because the problem hasaffected only the current task, it is unlikely that the databaseitself has been damaged.
  • 21: Indicates that a problem has beenencountered that affects all tasks in the current database, but it isunlikely that the database itself has been damaged.
  • 22: Indicatesthat the table or index specified in the message has been damaged bya software or hardware problem. Severity level 22 errors occurrarely. If one occurs, run DBCC CHECKDB to determine whether otherobjects in the database are also damaged. The problem might be in thebuffer cache only and not on the disk itself. If so, restarting theinstance of the Database Engine corrects the problem. To continueworking, you must reconnect to the instance of the Database Engine;otherwise, use DBCC to repair the problem. In some cases, you mayhave to restore the database. If restarting the instance of theDatabase Engine does not correct the problem, then the problem is onthe disk. Sometimes destroying the object specified in the errormessage can solve the problem. For example, if the message reportsthat the instance of the Database Engine has found a row with alength of 0 in a nonclustered index, delete the index and rebuild it.
  • 23: Indicates that the integrity of the entire database is inquestion because of a hardware or software problem. Severity level 23errors occur rarely. If one occurs, run DBCC CHECKDB to determine theextent of the damage. The problem might be in the cache only and noton the disk itself. If so, restarting the instance of the DatabaseEngine corrects the problem. To continue working, you must reconnectto the instance of the Database Engine; otherwise, use DBCC to repairthe problem. In some cases, you may have to restore the database.
  • 24: Indicates a media failure. The system administrator may have torestore the database. You may also have to call your hardware vendor.


I found the codes for MS SQL Server 2008 R2, but most of them are true for the later versions:http://technet.microsoft.com/en-us/library/cc645603(v=sql.105).aspx