Microsoft SQL Server Ошибки

Полезные ссылки:

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
? Logon Failure: The User has not Been Granted. The operating system returned the error ????? while … Compressed backup errors and TF 3042
- The MSSQLSERVER service was unable to log on as SQLAuthority\SQLFarmService with the currently c … 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?
102 Incorrect syntax near '%.*ls'. 102_link1
207 Invalid column name '%.*ls'. 207_link1
535 The datediff function resulted in an overflow. The number of dateparts separating two date/time 535_link1
596 Cannot continue execution because the session is in the kill state. 596_link1
657 Could not disable support for increased partitions in database … 657_link1
666 The maximum system-generated unique value for a duplicate group was exceeded for index with … 666_link1
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 … 824_link1,KB2152734
825 The operating system returned error %ls to SQL Server. It failed creating event for a %S_MSG at … 825_link1
913 Could Not Find Database %d. Database May Not be Activated Yet or May be in Transition … 913_link1
1701 Creating or altering table %ls failed because the minimum row size would be 8061, including 10 b … 1701_link1
1807 Could not obtain exclusive lock on database ‘model’. Retry the operation later. … 1807_link1
1904 The statistics on table has 65 columns in the key list … 1904_link1
2709 Column '%.ls' in %S_MSG '%.ls' cannot be used in an index or statistics or as a partition key … 2709_link1
3013 RESTORE DATABASE is terminating abnormally … KB290787
3041 BACKUP failed to complete the command %.*ls. Check the backup application log for detailed messa … 3041_link1
3101 Exclusive access could not be obtained because the database is in use. … 3101_link1
3154 The backup set holds a backup of a database other than the existing … 3154_link1
3241 The media family on device '%ls' is incorrectly formed. SQL Server cannot process this media fam … 3241_link1
3314 During undoing of a logged operation in database '%.*ls', an error occurred at log record ID %S_ … 3314_link1
3634 The operating system returned the error '%ls' while attempting '%ls' on '%ls'. … 3634_link1
3743 The database '%.*ls' is enabled for database mirroring. Database mirroring must be removed befor … 3743_link1
3930 The current transaction cannot be committed and cannot support operations that write to the log … 3930_link1
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. … 4922_link1
4934 Computed column '%.ls' in table '%.ls' cannot be persisted because the column does user or … 4934_link1
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.) … 5123_link1, 5123_link2
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" ... … 7357_link1
7391 The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" ... … 7391_link2
7719 CREATE/ALTER partition function failed as only maximum of 1000 partitions can be created. … 657_link1
8624 Internal Query Processor Error: The query processor could not produce a query plan. … 8624_link1
8651 Could not perform the operation because the requested memory grant was not available in resource … 8651_link1
8672 The MERGE statement attempted to UPDATE or DELETE the same row more than once... … 8672_link1
8909 Table error: Object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls), pa … 8909_link1
8921 Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or … 8921_link1
9002 The transaction log for database '%ls' is full due to '%ls'. … 9002_link1
13570 The use of replication is not supported with system-versioned temporal table '%s' … 13570_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, … 15136_link1
15199 The current security context cannot be reverted. Please switch to the original database where … 15199_link1
15406 Cannot execute as the server principal because the principal "%.*ls" does not exist, this type of … 15406_link1
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
18272 During restore restart, an I/O error occurred on checkpoint file '%s' (operating system error %s … 18272_link1
18452 Login failed. The login is from an untrusted domain and cannot be used with Windows authenticati … 18452_link1
18456 Login failed for user '%.ls'.%.ls%.*ls 18456_link1
25713 The value specified for %S_MSG, "%.ls", %S_MSG, "%.ls", is invalid. 25713_link1,25713_link2
33111 Cannot find server %S_MSG with thumbprint '%.*ls'. 33111_link1
35250 The connection to the primary replica is not active. The command cannot be processed. 35250_link1