Skip to content

Latest commit

 

History

History
 
 

Errors

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Microsoft SQL Server Errors

Useful links

SQL Server All Errors List

SELECT message_id, severity, text
  FROM sys.messages
 WHERE language_id = 1033; -- assuming US English

Levels of Severity

Severity level Description
0-9 Informational messages that return status information or report errors that are not severe. The Database Engine does not raise system errors with severities of 0 through 9.
10 Informational messages that return status information or report errors that are not severe. For compatibility reasons, the Database Engine converts severity 10 to severity 0 before returning the error information to the calling application.
11-16 Indicate errors that can be corrected by the user.
11 Indicates that the given object or entity does not exist.
12 A special severity for queries that do not use locking because of special query hints. In some cases, read operations performed by these statements could result in inconsistent data, since locks are not taken to guarantee consistency.
13 Indicates transaction deadlock errors.
14 Indicates security-related errors, such as permission denied.
15 Indicates syntax errors in the Transact-SQL command.
16 Indicates general errors that can be corrected by the user.
17-19 Indicate software errors that cannot be corrected by the user. Inform your system administrator of the problem.
17 Indicates that the statement caused SQL Server to run out of resources (such as memory, locks, or disk space for the database) or to exceed some limit set by the system administrator.
18 Indicates a problem in the Database Engine software, but the statement completes execution, and the connection to the instance of the Database Engine is maintained. The system administrator should be informed every time a message with a severity level of 18 occurs.
19 Indicates that a nonconfigurable Database Engine limit has been exceeded and the current batch process has been terminated. Error messages with a severity level of 19 or higher stop the execution of the current batch. Severity level 19 errors are rare and must be corrected by the system administrator or your primary support provider. Contact your system administrator when a message with a severity level 19 is raised. Error messages with a severity level from 19 through 25 are written to the error log.
20-24 Indicate system problems and are fatal errors, which means that the Database Engine task that is executing a statement or batch is no longer running. The task records information about what occurred and then terminates. In most cases, the application connection to the instance of the Database Engine may also terminate. If this happens, depending on the problem, the application might not be able to reconnect.
Error messages in this range can affect all of the processes accessing data in the same database and may indicate that a database or object is damaged. Error messages with a severity level from 19 through 24 are written to the error log.
20 Indicates that a statement has encountered a problem. Because the problem has affected only the current task, it is unlikely that the database itself has been damaged.
21 Indicates that a problem has been encountered that affects all tasks in the current database, but it is unlikely that the database itself has been damaged.
22 Indicates that the table or index specified in the message has been damaged by a software or hardware problem.
Severity level 22 errors occur rarely. If one occurs, run DBCC CHECKDB to determine whether other objects in the database are also damaged. The problem might be in the buffer cache only and not on the disk itself. If so, restarting the instance of the Database Engine corrects the problem. To continue working, you must reconnect to the instance of the Database Engine; otherwise, use DBCC to repair the problem. In some cases, you may have to restore the database.
If restarting the instance of the Database Engine does not correct the problem, then the problem is on the disk. Sometimes destroying the object specified in the error message can solve the problem. For example, if the message reports that the instance of the Database Engine has found a row with a length of 0 in a nonclustered index, delete the index and rebuild it.
23 Indicates that the integrity of the entire database is in question because of a hardware or software problem.
Severity level 23 errors occur rarely. If one occurs, run DBCC CHECKDB to determine the extent of the damage. The problem might be in the cache only and not on the disk itself. If so, restarting the instance of the Database Engine corrects the problem. To continue working, you must reconnect to the instance of the Database Engine; otherwise, use DBCC to repair the problem. In some cases, you may have to restore the database.
24 Indicates a media failure. The system administrator may have to restore the database. You may also have to call your hardware vendor.

SQL Server Common Errors

Error code equal message_id from sys.messages

Error Code Description Article
? You may see “out of user memory quota” message in errorlog when you use In-Memory OLTP feature Out of user memory quota
? The operating system returned the error ????? while attempting SetEndOfFile' on '\SQLBackups\database.bak'. BACKUP DATABASE is terminating abnormally. Compressed backup errors and TF 3042
- The MSSQLSERVER service was unable to log on as SQLAuthority\SQLFarmService with the currently configured password due to the following error: ... Logon Failure: The User has not Been Granted
0 A server error occurred on current command. The results, if any, should be discarded. Who owns your availability groups?
535 The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large... Nuance of datetime data type in SQL Server
657 Could not disable support for increased partitions in database ... SQL SERVER – Disabling 15000 Partitions (15k)
703 There is insufficient system memory in resource pool 'default' to run this query. 703_link1
824 SQL Server detected a logical consistency-based I/O error Resolve Microsoft SQL Server Error Code 824, KB2152734
913 Could Not Find Database %d. Database May Not be Activated Yet or May be in Transition FIX: Error: 913, Severity: 16 – Could Not Find Database ID
1807 Could not obtain exclusive lock on database ‘model’. Retry the operation later. CREATE DATABASE – I’ve not seen that before.
1904 The statistics on table has 65 columns in the key list SQL SERVER - Fix: Error: Msg 1904
3013 RESTORE DATABASE is terminating abnormally KB290787
3154 The backup set holds a backup of a database other than the existing Database Restore Fails with Msg 3154
3241 The media family on device '%ls' is incorrectly formed. SQL Server cannot process this media family. Unable to restore a backup – Msg 3241
3930 The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction. Case study: Troubleshooting Doomed Transactions
4064 Cannot open user default database. Login failed.Login failed. 4064_link1
4922 ALTER TABLE ALTER COLUMN Address failed because one or more objects access this column. SQL Server 2016 Online ALTER COLUMN Operation
5120 Unable to open the physical file ... Operating system error 5: "5(Access is denied.)" SQL SERVER - FIX Error 5120
5123 CREATE FILE encountered operating system error "%ls"(The system cannot find the path specified.) When SQL Server fails to create a secondary data file
6335 XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels. 6335_link1
7357 Cannot process the object "%ls". The OLE DB provider "%ls" for linked server "%ls" ... Discuss Execute(SQL) At LinkedServer
7391 The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" ... Discuss Execute(SQL) At LinkedServer
7719 CREATE/ALTER partition function failed as only maximum of 1000 partitions can be created. SQL SERVER – Disabling 15000 Partitions (15k)
8624 Internal Query Processor Error: The query processor could not produce a query plan. Internal Query Processor Error with ColumnStore Indexes
8651 Could not perform the operation because the requested memory grant was not available in resource pool '%ls' (%ld). [8651_link1]
8672 The MERGE statement attempted to UPDATE or DELETE the same row more than once... 8672_link1
9002 The transaction log for database '%ls' is full due to '%ls'. 9002_link1
15002 The procedure 'sys.sp_dbcmptlevel' cannot be executed within a transaction. 15002_link1
15136 The database principal is set as the execution context of one or more procedures, functions, ... Unable to drop a user in a database
17182 Tcp port is already in use TCP Port Is Already In Use
17190 Initializing the FallBack certificate failed with error code: %d, state: %d, error number: %d. 17190_link1
18452 Login failed. The login is from an untrusted domain and cannot be used with Windows authentication Login from an Untrusted Domain
18456 Login failed for user '%.*ls'.%.*ls%.*ls Why won’t my SQL Logins work?
35250 The connection to the primary replica is not active. The command cannot be processed. 35250_link1