SQL Server Error Messages 12001 to 13000

In this post, we’ll list out the SQL Server Error Messages from the error codes 12001 to 13000 and references to the detailed post to know more about the errors and how to fix them when using SQL Server as database in your application.

SQL Server Error Messages 12001 to 13000

ErrorCodeSeverityErrorMessage
1200216The requested %S_MSG index on column ‘%.*ls’ of table ‘%.*ls’ could not be created because the column type is not %S_MSG . Specify a column name that refers to a column with a %S_MSG data type.
1200316Could not find spatial tessellation scheme ‘%.*ls’ for column of type %.*ls. Specify a valid tessellation scheme name in your USING clause.
1200416Could not find the default spatial tessellation scheme for the column ‘%.*ls’ on table ‘%.*ls’. Make sure that the column reference is correct, or specify the extension scheme in a USING clause.
1200516Incorrect parameters were passed to the CREATE %S_MSG statement near ‘%.*ls’. Validate the statement against the index-creation syntax.
1200616Duplicate parameters were passed to the create index statement. Validate the statement against the index-creation syntax.
1200716The CREATE %S_MSG statement is missing the required parameter ‘%.*ls’. Validate the statement against the index-creation syntax.
1200816Table ‘%.*ls’ does not have a clustered primary key as required by the %S_MSG index. Make sure that the primary key column exists on the table before creating a %S_MSG index.
1200916Could not find the %S_MSG index ‘%.*ls’ on table ‘%.*ls’. Either no %S_MSG index with this name exists, or a non-%S_MSG index might be using the same name. Fix the index name, avoiding duplicates. If a  relational index has the same name, drop the regular relational index.
1201016Only one spatial index hint may appear per table, either as the first or the last hinted index.
1201116The value of parameter ‘%.*ls’ of CREATE %S_MSG must be less than %d.
1201216The value of parameter ‘%.*ls’ of CREATE %S_MSG must be greater than %d.
1201316The value of parameter ‘%.*ls’ of CREATE %S_MSG must be greater than the value of parameter ‘%.*ls’.
1201416The ‘%.*ls’ parameter of CREATE %S_MSG is incompletely defined. If the parameter has more than one part, all the parts must be defined.
1201516The index option %.*ls in the CREATE %S_MSG statement has to appear before the general index options.
1201616 Creating a %S_MSG index requires that the primary key in the base table satisfy the following restrictions. The maximum number of primary-key columns is %d.  The maximum combined per-row size of the primary-key columns is %d bytes. The primary key on the base table ‘%.*ls’ has %d columns, and contains %d bytes. Alter the base table to satisfy the primary-key restrictions imposed by the %S_MSG index.
1201710The spatial index is disabled or offline
1201810The spatial object is not defined in the scope of the predicate
1201910Spatial indexes do not support the comparand supplied in the predicate
1202010Spatial indexes do not support the comparator supplied in the predicate
1202110Spatial indexes do not support the method name supplied in the predicate
1202210The comparand references a column that is defined below the predicate
1202310The comparand in the comparison predicate is not deterministic
1202410The spatial parameter references a column that is defined below the predicate
1202510Could not find required binary spatial method in a condition
1202610Could not find required comparison predicate
1210116Cannot disable change tracking on database ‘%.*ls’ while client connections are waiting on change notification.  Please close those connections before disabling change tracking.
1210415ALTER DATABASE CURRENT failed because ‘%.*ls’ is a system database. System databases cannot be altered by using the CURRENT keyword. Use the database name to alter a system database.
1210616The path name ‘%.*ls’ is already used by another database file. Change to another valid and UNUSED name.
1210716Adding a MEMORY_OPTIMIZED_DATA filegroup is not supported for databases that have one or more publications that use sync_method ‘database snapshot’ or ‘database snapshot character’.
1210816‘%d’ is out of range for the database scoped configuration option ‘%.*ls’. See sp_configure option ‘%ls’ for valid values.
1210916Statement ‘%.*ls’ failed, because it attempted to set the value to ‘%.*ls’ for the primary replica. A settings can only be set to ‘%.*ls’ when the setting is applied to the secondary.
1211016Statement ‘%.*ls’ failed, because it attempted to set the ‘%.*ls’ option for the secondaries replica while this option is only allowed to be set for the primary.
1211116MODIFY MAXSIZE failed. The DynamicFileAllocationDetectionUnderLock is running by other thread, try again later.
1211210Warning: %ls statement is being forced to run WITH (%S_MSG = ON) because the ELEVATE_%S_MSG database scoped configuration is set to FAIL_UNSUPPORTED. The statement may fail. See the SQL Server error log for more information.
1211316%ls statement with multiple clauses failed. The ELEVATE_ONLINE database scoped configuration requires single-clause DROP INDEX, ALTER TABLE ADD CONSTRAINT, and ALTER TABLE DROP CONSTRAINT statements.
1211416ALTER INDEX REBUILD does not support rebuilding ALL WITH (RESUMABLE=ON) and the ELEVATE_RESUMABLE database scoped configuration is set to FAIL_UNSUPPORTED.
1211516ADD COLUMN statement failed by the ELEVATE_ONLINE database scoped option. Column could not be added online.
1211616Statement ‘%.*ls’ failed, because it attempted to set the ‘%.*ls’ option in tempdb.
1211716Cannot free the plan because a plan was not found in the database plan cache that corresponds to the specified plan handle. Specify a cached plan handle for the database. For a list of cached plan handles, query the sys.dm_exec_query_stats dynamic management view.
1212016Accelerated Database Recovery cannot be enabled until the Persistent Version Store is cleaned of previous versions. Please use the procedure sys.sp_persistent_version_cleanup ‘%.*ls’ to clean the Persistent Version Store.
1212115Time value %d used with PAUSED_RESUMABLE_INDEX_ABORT_DURATION is not a valid value; PAUSED_RESUMABLE_INDEX_ABORT_DURATION wait time must be greater or equal to 0 and less or equal to %d.
1212216Accelerated Database Recovery cannot be enabled/disabled on system databases.
1212310[DbId:%d] ADR enabled for the database.
1212410[DbId:%d] ADR disabled for the database.
1212516Accelerated Database Recovery has already been enabled on the database, ‘%.*ls’. To change the persistent version store filegroup, please disable Accelerated Database Recovery and ensure that the persistent version store is drained before retrying the command.
1212616Accelerated Database Recovery cannot be enabled while database mirroring is enabled.
1212716Accelerated Database Recovery cannot be disabled as it is not enabled using DDL.
1212816Accelerated Database Recovery cannot be enabled on Express edition.
1230015Computed columns are not supported with %S_MSG.
1230115Nullable columns in the index key are not supported with %S_MSG.
1230215Updating columns that are part of the PRIMARY KEY constraint is not supported with %S_MSG.
1230315The ‘number’ clause is not supported with %S_MSG.
1230515Inline table variables are not supported with %S_MSG.
1230615Cursors are not supported with %S_MSG.
1230715Default values for parameters in %S_MSG must be constants.
1230815Table-valued functions are not supported with %S_MSG.
1230915Statements of the form INSERT…VALUES… that insert multiple rows are not supported with %S_MSG.
1231015Common Table Expressions (CTE) are not supported with %S_MSG.
1231115Subqueries (queries nested inside another query) is only supported in SELECT statements with %S_MSG.
1231215Partition functions are not supported with %S_MSG.
1231315User-defined functions are not supported with %S_MSG.
1231415User-defined methods are not supported with %S_MSG.
1231515User-defined properties are not supported with %S_MSG.
1231615User-defined aggregates are not supported with %S_MSG.
1231715Clustered indexes, which are the default for primary keys, are not supported with %S_MSG. Specify a NONCLUSTERED index instead.
1231815Browse mode metadata is not supported with %S_MSG.
1231915Using the FROM clause in an UPDATE statement and specifying a table source in a DELETE statement is not supported with %S_MSG.
1232015Operations that require a change to the schema version, for example renaming, are not supported with %S_MSG.
1232115Creating a temporary procedure is not supported with %S_MSG.
1232215Temporary tables are not supported with %S_MSG.
1232315Distributed Queries and Multiple Active Result Sets (MARS) are not supported with %S_MSG.
1232415Distributed transactions (DTC) are not supported with %S_MSG.
1232515Bound transactions are not supported with %S_MSG.
1232615Creating a savepoint is not supported with %S_MSG.
1232715Comparison, sorting, and manipulation of character strings that do not use a *_BIN2 collation is not supported with %S_MSG.
1232815Indexes on character columns that do not use a *_BIN2 collation are not supported with %S_MSG.
1232915The data types char(n) and varchar(n) using a collation that has a code page other than 1252 are not supported with %S_MSG.
1233015Truncation of character strings with an SC collation is not supported with %S_MSG.
1233115DDL statements ALTER, DROP and CREATE inside user transactions are not supported with %S_MSG.
1233215Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported with %S_MSG.
1233315Execution from the dedicated administrator connection (DAC) is not supported with %S_MSG.
1233415The aggregate functions MIN and MAX used with binary and character string data types is not supported with %S_MSG.
1233615The use of replication is not supported with %S_MSG.
1233715The use of the sp_addpublication sync_method’s parameters ‘database snapshot’ and ‘database snapshot character’ are not supported with %S_MSG.
1233815The functions LEN and SUBSTRING with an argument in an SC collation are not supported with %S_MSG.
1233915The use of seed and increment values other than 1 is not supported with %S_MSG.
1234015The EXECUTE statement in %S_MSG must use an object name. Variables and quoted identifiers are not supported.
1234115The WITH clause is not supported with EXECUTE statements in %S_MSG.
1234215The EXECUTE statement in %S_MSG only supports executing natively compiled modules.
1234316TRIGGER_NESTLEVEL only supports zero or one argument in %S_MSG.
1234416Only natively compiled modules can be used with %S_MSG.
1234516Max length data types are not supported as the return type of a natively compiled user defined function.
1234616Max length defaults are not supported with %S_MSG.
1234716Max length parameters to user defined functions are not supported in %S_MSG.
1234816Max length literals not supported in %S_MSG.
1234916Operation not supported for memory optimized tables having columnstore index.
1235015DML operations targeting table-valued functions are not supported with %S_MSG.
1235115Only natively compiled functions can be called with the EXECUTE from inside a natively compiled function.
1235215System stored procedures that cause schema changes to %S_MSG are not supported inside user transactions.
1235315Computed columns in indexes on memory optimized tables must be declared as PERSISTED.
1235415The function %ls with an argument in a Japanese_140 collation is currently not supported with %S_MSG.
1235515The persistence of a computed column in a memory optimized table cannot be altered. Drop and re-create the column with the desired persistence.
1235615Comparison, sorting, and manipulation of character strings that use a UTF8 collation is not supported with %S_MSG.
1235715Indexes on character columns that use a UTF8 collation are not supported with %S_MSG.
1235815Enabling CDC creates database triggers on ALTER TABLE and DROP TABLE. Hence, these DDL statements are not supported with %S_MSG on CDC enabled databases. Other DDL triggers not related to CDC may also be blocking this operation.
1240115The %S_MSG option ‘%S_MSG’ was specified more than once. Each option can be specified only once.
1240211Query with provided query_id (%ld) is not found in the Query Store for database (%ld). Check the query_id value and rerun the command.
1240311Query plan with provided plan_id (%ld) is not found in the Query Store for database (%ld). Check the plan_id value and rerun the command.
1240416The command failed because the query store is not in read-write mode for database (%ld). Make sure that the query store is in read-write mode and rerun the command.
1240516The command failed because the query store is not enabled for database (%ld). Make sure that the query store is enabled for the database and rerun the command.
1240611Query plan with provided plan_id (%ld) is not found in the Query Store for query (%ld). Check the plan_id value and rerun the command.
1240718The global instance of the the Query Store Manager is not available.
1240816An operation to read/write to the Query Store failed. Check the error logs to correct the source of the read/write failure
1240917Query Store cannot create system task
1241023Cannot load the Query Store metadata. Try turning the Query Store on manually, or contact customer support to get this addressed.
1241118Cannot load forced plan from the Query Store
1241216Internal table access error: failed to access the Query Store internal table with HRESULT: 0x%x.
1241316Cannot process statement SQL handle. Try querying the sys.query_store_query_text view instead.
1241416Failed to initialize Query Store for use, so user request cannot be executed.
1241516Failed to add query to Query Store for database ID %d.
1241715Only one Query Store option can be given in ALTER DATABASE statement.
1241816Mutually incompatible options for both database state change and for Query Store given in ALTER DATABASE statement.
1241916The command failed because Query Store is disabled on the server or database you are using. Contact customer support to get this addressed.
1242016Cannot perform action because Query Store is not started up for database %.*ls.
1242114User does not have necessary permissions to execute Query Store stored procedure.
1242216Query Store interval length could not be changed because there is at least one existing runtime statistics interval set in the future.
1242316An operation to read/write to the Query Store failed. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
1242516Query with provided query id (%ld) cannot be deleted since it has active forcing policy.
1242616Plan with provided plan id (%ld) cannot be deleted since it has active forcing policy.
1242716Cannot perform operation on Query Store while it is enabled. Please turn off Query Store for the database and try again.
1242816The Query Store in database %.*ls is missing internal table %.*ls, possibly due to schema or catalog inconsistency.
1242916The Query Store in database %.*ls has an invalid structure for internal table %.*ls, possibly due to schema or catalog inconsistency.
1243016The specified Query Store action is not supported in stored procedure ‘%.*ls’.
1243116Query Store stored procedure ‘%.*ls’ could not acquire an update lock over the database.
1243216Query Store Interval length cannot be changed because an invalid value was provided. Please try again with a valid value (1, 5, 10, 15, 30 & 60).
1243316Operation failed because Query Store %.*ls is disabled on the server or database you are using. Contact customer support to get this addressed.
1243416The Query Store in database %.*ls is invalid, possibly due to schema or catalog inconsistency.
1243516The Query Store in database %.*ls has an invalid structure for internal table %.*ls column %.*ls, possibly due to schema or catalog inconsistency.
1243617Query Store global Resource Group cannot be determined.
1243717Query Store global Resource Group cannot be determined.
1243816Cannot perform action because Query Store cannot be enabled on system database %.*ls.
1243910Setting database option query_store %ls to %lu for database ‘%.*ls’.
1244010Setting database option query_store %ls to %ls for database ‘%.*ls’.
1244110Query store is initializing.This is an informational message only; no user action is required.
1244217Query store flush failed due to internal error.
1244316Query store cannot set default settings.
1244416Query plan with plan_id (%ld) cannot be forced for query with query_id (%ld) as plan forcing is not supported for natively compiled plans.
1244516Cannot set Query Store max_storage_size_mb to %lu. The maximum allowed limit is %lu MB.
1244616Query Store stored procedure is not available on readable secondary replica.
1244716Query plan with plan_id (%ld) cannot be forced for query with query_id (%ld) as plan forcing is not supported for this type of statement.
1244916Query plan cannot be forced for this query as plan forcing is not supported for resumable index builds.
1245017Could not allocate memory for DW query or Showplan of size (%ld).
1245110Setting database option query_store %ls to %I64u for database ‘%.*ls’.
1245216The value %d is not valid for %S_MSG option %S_MSG. The value must be between %d and %d.
1245316Invalid value provided for %S_MSG option %S_MSG. The value must be between %d %S_MSG and %d %S_MSG.
1245410Setting database option query_store %ls to %lu %S_MSG for database ‘%.*ls’.
1250016SELECT INTO not allowed in the CTAS statement.
1250116Different number of columns in CREATE TABLE and SELECT query.
1250216Data types cannot be defined using CREATE TABLE AS SELECT syntax.
1250315Specifying schema elements in the CREATE SCHEMA statement is not supported.
1250416Distribution column ‘%.*ls’ must be implictly or explictly specified in the insert select query as the target table ‘%.*ls’ is a hash distributed table.
1260016DBCC CLONEDATABASE is not allowed on this server.
1260116DBCC CLONEDATABASE is not allowed within a transaction.
1260216DBCC CLONEDATABASE cannot be executed through MARS connection.
1260316DBCC CLONEDATABASE does not support cloning system databases.
1260416Database cannot be read. Check if the database is in offline or suspect mode.
1260516Failed to create snapshot database.
1260616Failed to set snapshot database name.
1260716Specified clone database name ‘%.*ls’ is too long.
1260816Specified clone database name ‘%.*ls’ already exists.
1260916Failed to get file attributes.
1261016Failed to update database registration.
1261116Failed to get database registration attributes.
1261216Failed to sync boot page with database registration.
1261316Too many files or file groups to clone database.
1261416Failed to get collation name.
1261516Failed to get database properties.
1261616Failed to drop partially created cloned database.
1261716File path of the database is not supported.
1261816The database has too many objects.
1261916The database has too long file path to create clone.
1262010Database cloning for ‘%.*ls’ has started with target as ‘%.*ls’.
1262110Database ‘%.*ls’ is a cloned database. This database should be used for diagnostic purposes only and is not supported for use in a production environment.
1262210Database cloning for ‘%.*ls’ has finished. Cloned database is ‘%.*ls’.
1262310Clone backup succeeded and is stored in %ls.
1262410Clone backup failed.
1262510RESTORE VERIFY failed on the clone backup %ls
1262610Clone database verification has passed.
1262710Clone database verification has failed.
1262810NO_STATISTICS and NO_QUERYSTORE options turned ON as part of VERIFY_CLONE.
1262910Database ‘%.*ls’ is a cloned database.
1263016VERIFY_CLONE option cannot be specified together with SERVICEBROKER option.
1270116Failed to lock external data source object (EDS name: %.*ls). Lock Mode: %.*ls.
1270216Failed to lock external data source manager. Lock Mode: %.*ls.
1270316Referenced external data source “%ls” not found.
1270416Bad or inaccessible location specified in external data source “%ls”.
1270516Referenced external data source “%ls” type is “%ls”. Please use BLOB_STORAGE type to reference Azure Blob Storage locations.
1280016The reference to temp table name ‘%.*ls’ is ambiguous and cannot be resolved. Use either ‘%.*ls’ or ‘%.*ls’.
1280116The reference to cursor name ‘%.*ls’ is ambiguous and cannot be resolved. Possible candidates are ‘%.*ls’ and ‘%.*ls’.
1280316Containment cannot be enabled for database ‘%.*ls’ because it is a system database.
1280416Feature or option “%ls” breaches containment in a contained database. Please see Books Online topic Understanding Contained Databases for more information on contained databases.
1280516Index name ‘%.*ls’ is too long. Maximum length for temp table index name is %d characters.
1280716The option ‘%.*ls’ cannot be set on non-contained database.
1280816The option ‘%.*ls’ cannot be set on a database while containment is being set to NONE.
1280916You must remove all users with password before setting the containment property to NONE.
1281016The option ‘%.*ls’ was specified multiple times.
1281116The user options for the instance must be set to 0 in order to %S_MSG a contained database.
1281316Errors were encountered in the %S_MSG ‘%.*ls’ during compilation of the object. Either the containment option of the database ‘%.*ls’ was changed, or this object was present in model db and the user tried to create a new contained database.
1281416The object referenced as ‘%.*ls’ resolves differently in the target metadata collation ‘%.*ls’ than in the current metadata collation ‘%.*ls’.
1281516The column referenced as ‘%.*ls’ resolves differently in the target metadata collation ‘%.*ls’ than in the current metadata collation ‘%.*ls’.
1281616The type or XML schema collection referenced as ‘%.*ls’ resolves differently in the target metadata collation ‘%.*ls’ than in the current metadata collation ‘%.*ls’.
1281716The reference to the variable, parameter or goto label ‘%.*ls’ resolves differently in the target metadata collation ‘%.*ls’ than in the current metadata collation ‘%.*ls’.
1281816RECONFIGURE failed. Attempting to change the ‘contained database authentication’ value to 0 while there are existing contained databases requires a RECONFIGURE WITH OVERRIDE.
1281916sp_migrate_user_to_contained cannot be used in a non-contained database (a database with CONTAINMENT set to NONE).
1282016sp_migrate_user_to_contained can not be used with a user with a password or a user type other than SQL Login.
1282116sp_migrate_user_to_contained cannot be used on a user used in the EXECUTE AS clause of a signed module.
1282216sp_migrate_user_to_contained cannot be used to copy a password to an old hash algorithm.
1282316sp_migrate_user_to_contained can not find the login for user ‘%.*ls’.
1282416The sp_configure value ‘contained database authentication’ must be set to 1 in order to %S_MSG a contained database.  You may need to use RECONFIGURE to set the value_in_use.
1282616RECONFIGURE WITH OVERRIDE set the ‘contained database authentication’ to 0 while there are contained databases in use. This will disrupt authentication for contained users and will not allow new contained databases to be created.
1282716User-named %ls constraint ‘%.*ls’ is not allowed on temp table ‘%.*ls’ because it is being created in a contained database. Please consult the Books Online topic Understanding Contained Databases for more information on contained databases.
1282816User-defined %S_MSG ‘%.*ls’ in tempdb cannot be referenced from local temp table ‘%.*ls’ because the temp table is being created in a contained database. Please consult the Books Online topic Understanding Contained Databases for more information on contained databases.
1282916The stored procedure ‘%.*ls’ refers to a group of numbered stored procedures. Numbered stored procedures are not available in contained databases. Please consult the Books Online topic Understanding Contained Databases for more information on contained databases.
1283016The sp_configure ‘user options’ setting must be zero if the Database Engine has contained databases.
1283116Database ‘%.*ls’ is a contained database. The option ‘contained database authentication’ setting is 0.  Users with passwords will not be able to login to contained databases.
1283216The database ‘%.*ls’ could not be created or altered to a contained database, because the schema bound %S_MSG ‘%.*ls’ depends on builtin function ‘%s’. In a contained database, the output collation of this builtin function has changed to ‘%.*ls’, which differs from the collation used in a non-contained database.
1283316The database ‘%.*ls’ could not be created or altered to a contained database, because the check constraint ‘%.*ls’ on table ‘%.*ls’ depends on builtin function ‘%s’. In a contained database, the output collation of this builtin function has changed to ‘%.*ls’, which differs from the collation used in a non-contained database.
1283416The database ‘%.*ls’ could not be created or altered to a contained database, because the computed column ‘%.*ls’ on %S_MSG ‘%.*ls’ depends on builtin function ‘%s’. In a contained database, the output collation of this builtin function has changed to ‘%.*ls’, which differs from the collation used in a non-contained database.
1283510The definition of the %S_MSG ‘%.*ls’ was refreshed as part of altering the containment option of the database ‘%.*ls’ because the object depends on builtin function ‘%s’. In a contained database, the output collation of this builtin function has changed to ‘%.*ls’, which differs from the collation used in a non-contained database.
1283616ALTER DATABASE statement failed. The containment option of the database ‘%.*ls’ could not be altered because compilation errors were encountered during validation of SQL modules. See previous errors.
1283716CREATE DATABASE statement failed. The contained database ‘%.*ls’ could not be created because compilation errors were encountered during validation of SQL modules. See previous errors.
1283816Replication, Change Data Capture and Change Tracking are not supported in contained databases. The database ‘%.*ls’ cannot be altered to a contained database, since it has one of these options turned on.
1283916Replication, Change Data Capture and Change Tracking are not supported in contained databases. The option cannot be enabled on the contained database ‘%s’.
1284016CREATE DATABASE failed. Recollating the database failed while creating the partially contained database ‘%.*ls’, with a default data collation of ‘%.*ls’.
1284116ALTER DATABASE failed. Recollating the database failed while altering the database ‘%.*ls’ to containment=’%ls’.
1284216The COLLATE CATALOG_DEFAULT clause cannot be used in a constraint, computed column, index filter expression, or any schema-bound object.
1284316The containment state of database ‘%.*ls’ does not match the value in master. Contained database functionality will not work as expected. Detach and re-attach the database to correct the database state in master.
1284416ALTER DATABASE statement failed; this functionality is not available in the current edition of SQL Server.
1284516CREATE DATABASE statement failed; cannot specify both CONTAINMENT = PARTIAL and CATALOG_COLLATION.
1298016Supply either %s or %s to identify the log entries.
1298116You must specify %s when creating a subplan.
1298216Supply either %s or %s to identify the plan or sub-plan to be run.