SQL Server identifies each message by number and severity, as in Msg 207, Level 16. This list covers the core engine errors, numbered below 10000, at severities 11 to 16: the ones caused by the query or the data, which you can fix yourself. Severities 17 and up are resource and system failures.
4,282 codes from the Database Engine events and errors
P_SYNTAXERR2 Incorrect syntax near '%.*ls'.P_NOCORRMATCH The column prefix '%.*ls' does not match with a table name or alias name used in the query.P_SCALAR_VAR_NOTFOUND Must declare the scalar variable "%.*ls".SQ_BADCOL Invalid column name '%.*ls'.SQ_BADOBJECT Invalid object name '%.*ls'.DML_UPDATE_SPARSE_AND_COLSET The target column list of an INSERT, UPDATE, or MERGE statement cannot contain both a sparse column and the column set that contains the sparse column. Rewri…ROW_TOOBIG Cannot create a row of size %d which is greater than the allowable maximum row size of %d.WRONGPAGE INSERT EXEC failed because the stored procedure altered the schema of the target table.VAR_SIZE_TOO_BIG Cannot insert or update a row because total variable column size, including overhead, is %d bytes more than the limit.NOTUSER The server principal "%.*ls" is not able to access the database "%.*ls" under the current security context.DB_SUSPECT Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.DB_IS_SHUTDOWN Database '%.*ls' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.DB_HADRON_DATABASE_NO_QUORUM Unable to access database '%.*ls' because it lacks a quorum of nodes for high availability. Try the operation again later.LK_VICTIM Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen as the deadlock victim. Rerun the transaction.LK_TIMEOUT Lock request time out period exceeded.DBM_BADSTATEFORFORCESERVICE Unable to force service safely. Remove database mirroring and recover database "%.*ls" to gain access.DBM_PARTNERNOTFOUND The server network address "%.*ls" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints…DBM_DISABLED_DUE_TO_FAILED_REDO Database mirroring is disabled due to a failed redo operation. Unable to resume.DUP_KEY The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name '%.*ls' and the index name '%.*ls'. The duplicate key valu…CRTFKINVTOPO Introducing FOREIGN KEY constraint '%.*ls' on table '%.*ls' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, o…KEYCOUNT The %S_MSG '%.*ls' on table '%.*ls' has %d columns in the key list. The maximum limit for %S_MSG key column list is %d.DBCC_NO_SUCH_TABLE_NAME Cannot find a table or object with the name "%.*ls". Check the system catalog.DBCC_OUT_OF_DATE_PAGE_OR_ROW_COUNT The %.*ls count for object "%.*ls", index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls) is incorrect. Run DBCC UPDATEUSAGE.DBCC_KEYS_OUT_OF_ORDER Table error: Object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls). Keys out of order on page %S_PGID, slots %d and %d.DBCC_DUPLICATE_KEYS Table error: Object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls). Duplicate keys on page %S_PGID slot %d and page %S_PGID slot %d.DBCC_DIFF_MAP_OUT_OF_SYNC The page %S_PGID, object ID %d, index ID %d, partition ID %I64d, allocation unit ID %I64d (type %.*ls) has been modified, but is not marked as modified in th…DBCC_REPAIR_DIFF_MAP_INVALIDATED Repair has invalidated the differential bitmap for database %.*ls. The differential backup chain is broken. You must perform a full database backup before yo…DBCC_INDEX_FILEGROUP_IS_INVALID Unable to process index %.*ls of table %.*ls because filegroup %.*ls is invalid.DBCC_INDEX_FILEGROUP_IS_OFFLINE Unable to process index %.*ls of table %.*ls because filegroup %.*ls is offline.DBCC_INDEX_IS_OFFLINE The index "%.*ls" on table "%.*ls" is disabled.DBCC_PAGE_WAS_NOT_SEEN Table error: page %S_PGID allocated to object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls) was not seen. The page may be invalid…DBCC_PAGE_ALLOCATED_TO_OTHER_OBJECT Table error: page %S_PGID, whose header indicates that it is allocated to object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls), is…DBCC_RECORD_CHECK_FAILED Table error: object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls), page %S_PGID, row %d. The record check (%.*ls) failed. The valu…DBCC_COLUMN_VALUE_OUT_OF_RANGE Page %S_PGID, slot %d in object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type "%.*ls"). Column "%.*ls" value is out of range for data typ…DBCC_EMPTY_INDEX_TREE_LEVEL_PAGE Table error: Page %S_PGID is empty in object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls). This is not permitted at level %d of t…DBCC_IAM_PAGE_WAS_NOT_SEEN The Index Allocation Map (IAM) page %S_PGID is pointed to by the next pointer of IAM page %S_PGID in object ID %d, index ID %d, partition ID %I64d, alloc uni…DBCC_IAM_PARENT_PAGE_WAS_NOT_SEEN The Index Allocation Map (IAM) page %S_PGID is pointed to by the previous pointer of IAM page %S_PGID in object ID %d, index ID %d, partition ID %I64d, alloc…DBCC_IAM_CHAIN_SEQUENCE_OUT_OF_ORDER Chain sequence numbers are out of order in the Index Allocation Map (IAM) chain for object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type…DBCC_EXTENT_OUT_OF_RANGE Table error: Extent %S_PGID in object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls) is beyond the range of this database.DBCC_DATABASE_IN_READ_ONLY_MODE The repair statement was not processed. The database cannot be in read-only mode.DMP_ABORT %hs is terminating abnormally.DB_IN_USE_DUMP Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after t…DMP_PAGE_ERROR_DURING_BACKUP BACKUP '%ls' detected an error on page (%d:%d) in file '%ls'.DMPDB_INVALID_FSDATA The backup operation has detected an unexpected file in a FILESTREAM container. The backup operation will continue and include file '%ls'.LDDB_CANT_WRITE File '%ls' cannot be restored to '%ls'. Use WITH MOVE to identify a valid location for the file.LDDB_LOGNOTBACKEDUP The tail of the log for the database "%ls" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lo…LDDB_SYSTEMWRONGVER The backup of the system database on the device %ls cannot be restored because it was created by a different version of the server (%ls) than this server (%ls).NA The database was backed up on a server running database version %d. That version is incompatible with this server, which supports version %d. Either restore…LDDB_FILE_CLAIM File '%ls' is claimed by '%ls'(%d) and '%ls'(%d). The WITH MOVE clause can be used to relocate one or more files.LDDB_PAGE_ERROR_DURING_RESTORE RESTORE detected an error on page (%d:%d) in database "%ls" as read from the backup set.BADOPEN Cannot open backup device '%ls'. Operating system error %ls.DMPIO_BUFFER_OVERFLOW An internal buffer has become full.DMPIO_IO_ERROR A nonrecoverable I/O error occurred on file "%ls:" %ls.XACT_FILESTREAM_ROLLBACK_ERROR While rolling back a transaction, an error occurred while trying to deliver a rollback notification to the FILESTREAM filter driver. Error code: 0x%0x.XACT_METADATA_INVALID Snapshot isolation transaction failed in database '%.*ls' because the object accessed by the statement has been modified by a DDL statement in another concur…XACT_UNSUPPORT_PARALLEL_TRAN2 New transaction is not allowed because there are other threads running in the session.XACT_UNSUPPORT_PARALLEL_TRAN3 New request is not allowed to start because it should come with valid transaction descriptor.DB_UFAIL_FATAL Cannot open user default database. Login failed.ALG_MULTI_ID_BAD The multi-part identifier "%.*ls" could not be bound.DMPX_NODBBACKUP BACKUP LOG cannot be performed because there is no current database backup.BULKPROV_MEMORY The bulk data provider failed to allocate memory.ALT_BADDISKS One or more files listed in the statement could not be found or could not be initialized.DSK_FCB_FAILURE Unable to open the physical file "%.*ls". Operating system error %d: "%ls".DBCC4_ANTIMATTER_COLUMN_DETECTED Table error: object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls), page %S_PGID, row %d. DBCC detected incomplete cleanup from an…DBCC4_ANTIMATTER_IN_HEAP_OR_CLUSTERED_INDEX Table error: Object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls) contains an anti-matter column, but is not a nonclustered index.DBCC4_INCORRECT_VALUE_IN_PAGE_HEADER_NO_METADATA Table error: alloc unit ID %I64d, page %S_PGID. The test (%.*ls) failed. The values are %ld and %ld.DBCC4_TABLE_LOCK_TIMEOUT_EXCEEDED Object ID %ld (object '%.*ls'): DBCC could not obtain a lock on this object because the lock request timeout period was exceeded. This object has been skippe…DBCC4_CRITICAL_DATABASE_PAGE_CORRUPT Database error: %ls page %S_PGID for database '%.*ls' (database ID %d) is invalid. This error cannot be repaired. You must restore from backup.DBCC4_INCORRECT_PAGE_ID_IN_HEADER_NO_METADATA Table error: alloc unit ID %I64d, page %S_PGID contains an incorrect page ID in its page header. The PageId in the page header = %S_PGID.FS_TRUNCATEDIR_FAILED Error 0x%x (%ls) was encountered while directory '%.*ls' was being truncated.FS_MINIVER_OVERFLOW The total number of versions for a single file has reached the maximum limit set by the file system.SQLCLR_UDF_EXEC_FAILED A .NET Framework error occurred during execution of user-defined routine or aggregate "%.*ls": %ls.XMLERR_PARSEERR2 The error description is '%.*ls'.RMT_STA_DISABLED OLE DB provider '%ls' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.RMT_ZERO_COL_OBJECT Cannot process the object "%ls". The OLE DB provider "%ls" for linked server "%ls" indicates that either the object has no columns or the current user does n…RMT_TRANS_JOIN_FAIL The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" was unable to begin a distributed transaction.RMT_HRESULT_FAIL The OLE DB provider "%ls" for linked server "%ls" reported an error. %lsPRT_RANGE_OVERLAP The %ls option was specified more than once for the table, or for at least one of its partitions if the table is partitioned.DBCC2_DATABASE_IN_EMERGENCY_MODE The repair statement was not processed. This level of repair is not supported when the database is in emergency mode.DBCC2_FS_ORPHANED_FILE Table error: The orphaned file "%.*ls" was found in the FILESTREAM directory ID %.*ls container ID %d for object ID %d, index ID %d, partition ID %I64d, colu…DBCC2_FS_MISSING_FILE Table error: Cannot find the FILESTREAM file "%.*ls" for column ID %d (column directory ID %.*ls container ID %d) in object ID %d, index ID %d, partition ID…DBCC2_FS_INVALID_ROWSET_DIRECTORY Database error: The directory "%.*ls" is not a valid FILESTREAM directory in container ID %d.DBCC2_FS_INVALID_TOP_LEVEL_FILE Database error: The file "%.*ls" is not a valid FILESTREAM file in container ID %d.DBCC2_FS_INVALID_COLUMN_DIRECTORY Table error: The directory "%.*ls" under the rowset directory ID %.*ls is not a valid FILESTREAM directory in container ID %d.DBCC2_FS_INVALID_COLUMN_LEVEL_FILE Table error: The file "%.*ls" in the rowset directory ID %.*ls is not a valid FILESTREAM file in container ID %d.DBCC2_FS_DOUBLE_ROWSET_ACTUAL_FACT Database error: The FILESTREAM directory ID %.*ls for a partition was seen two times.DBCC2_FS_ROWSET_IN_WRONG_FILEGROUP Table error: The FILESTREAM directory ID %.*ls for object ID %d, index ID %d, partition ID %I64d is in filegroup %d, but should be in filegroup %d.DBCC2_FS_ORPHANED_ROWSET_DIRECTORY Table error: A FILESTREAM directory ID %.*ls exists for a partition, but the corresponding partition does not exist in the database.DBCC2_FS_MISSING_ROWSET_DIRECTORY DBCC CHECK cannot proceed on database %.*ls because it is a Secondary Replica and either Snapshot creation failed or the WITH TABLOCK option was specified. S…DBCC2_FS_MISSING_COLUMN Table error: A FILESTREAM directory ID %.*ls exists for a column of object ID %d, index ID %d, partition ID %I64d, but that column does not exist in the part…DBCC2_FS_ORPHANED_COLUMN_DIRECTORY Table error: The FILESTREAM directory ID %.*ls exists for column ID %d of object ID %d, index ID %d, partition ID %I64d, but that column is not a FILESTREAM…DBCC2_FS_MISSING_COLUMN_DIRECTORY Columnstore index has one or more missing column segments. Please run DBCC CHECKDB for more information.DBCC2_PRE_CHECKS_BAD_PAGE_TYPE System table pre-checks: Object ID %d. Page %S_PGID has unexpected page type %d. Check statement terminated due to unrepairable error.DBCC2_PRE_CHECKS_CROSS_OBJECT_LINKAGE System table pre-checks: Object ID %d has cross-object chain linkage. Page %S_PGID points to %S_PGID in alloc unit ID %I64d (should be %I64d). Check statemen…DBCC2_PRE_CHECKS_CHAIN_LINKAGE_MISMATCH System table pre-checks: Object ID %d has chain linkage mismatch. %S_PGID->next = %S_PGID, but %S_PGID->prev = %S_PGID. Check statement terminated due to unr…DBCC2_PRE_CHECKS_CHAIN_LOOP_DETECTED System table pre-checks: Object ID %d. Loop in data chain detected at %S_PGID. Check statement terminated due to unrepairable error.DBCC2_SYSTEM_CATALOGS_CORRUPT Database '%.*ls': consistency errors in system catalogs prevent further DBCC %ls processing.OPTIMIZER_STACK_OVERFLOW_ERR The query processor ran out of stack space during query optimization. Please simplify the query.OPTIMIZER_NOPLAN_ERR The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or…COST_TOO_HIGH The query has been canceled because the estimated cost of this query (%d) exceeds the configured threshold of %d. Contact the system administrator.USEPLAN_ERR_NO_DB Database '%.*ls', specified in the USE PLAN hint, does not exist. Specify an existing database.QUERY2_CUBE_ILLEGAL_AGG_FUNC Aggregate functions that are used with CUBE, ROLLUP, or GROUPING SET queries must provide for the merging of subaggregates. To fix this problem, remove the a…USEPLAN_ERR_NO_INDEX Index '%.*ls', specified in the USE PLAN hint, does not exist. Specify an existing index, or create an index with the specified name.DBCC3_OFF_ROW_DATA_NODE_HAS_TWO_PARENTS Table error: Object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls). The off-row data node at page %S_PGID, slot %d, text ID %I64d i…DBCC3_CHECK_CATALOG Check Catalog Msg %d, State %d: %.*lsDBCC3_MISSING_FORWARDED_ROW Object ID %d, forwarding row page %S_PGID, slot %d points to page %S_PGID, slot %d. Did not encounter forwarded row. Possible allocation error.DBCC3_MISSING_FORWARDING_ROW Object ID %d, forwarded row page %S_PGID, slot %d should be pointed to by forwarding row page %S_PGID, slot %d. Did not encounter forwarding row. Possible al…DBCC3_IAM_PAGE_RANGE_IN_WRONG_FILEGROUP IAM page %S_PGID for object ID %d, index ID %d, partition ID %I64d, alloc unit ID %I64d (type %.*ls) controls pages in filegroup %d, that should be in filegr…XMLERR_INVALID_COLUMNSET_XML The XML content provided does not conform to the required XML format for sparse column sets.XMLERR_COLUMNSET_CANNOT_CONVERT_FROM_TO In the query/DML operation involving column set '%.*ls', conversion failed when converting from the data type '%ls' to the data type '%ls' for the column '%.…SB2_CANT_LISTEN_PORT_IN_USE The %S_MSG endpoint cannot listen on port %d because it is in use by another process.FTXT2_MSSEARCHACCESSDENY SQL Server failed to create named pipe '%ls' to communicate with the full-text filter daemon (OS error: %d). Either a named pipe already exists for a filter…