In this post, we’ll list out the SQL Server Error Messages from the error codes 16001 to 17000 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 16001 to 17000
ErrorCode | Severity | ErrorMessage |
16001 | 16 | Data masking is not supported for the data type of column ‘%.*ls’. |
16002 | 16 | Invalid data masking function in column ‘%.*ls’. |
16003 | 16 | The data type of column ‘%.*ls’ does not support data masking function ‘%.*ls’. |
16004 | 16 | Incorrect number of parameters for data masking function ‘%.*ls’ for column ‘%.*ls’. |
16005 | 16 | Invalid argument for data masking function ‘%.*ls’ for column ‘%.*ls’. |
16006 | 16 | Invalid data masking format for function ‘%.*ls’ in column ‘%.*ls’. |
16007 | 16 | The column ‘%.*ls’ does not have a data masking function. |
16008 | 16 | Cannot add a masking function to a column that is encrypted. |
16009 | 16 | Cannot add a masking function to a column used as a sparse column set. |
16010 | 16 | External script cannot be executed on masked data columns. |
16011 | 16 | The data masking function for column ‘%.*ls’ is too long. |
16012 | 16 | The query accessed too many different databases. |
16013 | 16 | Cannot add a masking function to a column used in a key to a fulltext index. |
16014 | 16 | Failed to create fulltext index because key column ‘%.*ls’ has a masking function defined on it. |
16015 | 16 | The index on view ‘%.*ls’ cannot be created because the view is referencing table ‘%.*ls’ with masked columns. |
16016 | 16 | Cannot add a masking function to a column used in a sparse column set. |
16101 | 16 | Option ‘%.*ls’ is not supported for sensitivity classification. |
16102 | 16 | Object name specified ‘%.*ls’ is not valid. |
16103 | 16 | Sensitivity classification is not supported for the specified object. |
16104 | 16 | Sensitivity classification option ‘%.*ls’ was repeated. |
16105 | 16 | Option ‘%.*ls’ is too long (max %d chars). |
16106 | 16 | Option ‘%.*ls’ is empty. |
16107 | 16 | Schema ‘%.*ls’ was not found or you do not have permission to access it. |
16108 | 16 | Table ‘%.*ls’ was not found or you do not have permission to access it. |
16109 | 16 | Column ‘%.*ls’ was not found in table ‘%.*ls’ or you do not have permission to access it. |
16110 | 16 | Specification of database part of object name is not supported. |
16111 | 16 | Sensitivity classification operations cannot be used on computed column ‘%.*ls’. |
16112 | 16 | Sensitivity classifications cannot be added to a history table directly. |
16113 | 16 | Sensitivity rank must not be provided as string. |
16114 | 16 | Sensitivity rank must be one of the following: NONE, LOW, MEDIUM, HIGH, CRITICAL. |
16115 | 16 | ‘%.*ls’ option’s value must be provided as string. |
16116 | 16 | Object ‘%.*ls’ is not a table. |
16200 | 16 | The statement failed because ‘APPROX_COUNT_DISTINCT’ does not support DISTINCT <column-name> parameters. Consider using ‘APPROX_COUNT_DISTINCT’ without DISTINCT, or COUNT or COUNT_BIG with DISTINCT. |
16201 | 16 | The statement failed because ‘%.*ls’ does not support DISTINCT <column-name> parameters. |
16202 | 16 | Keyword or statement option ‘%.*ls’ is not supported on the ‘%.*ls’ platform. |
16203 | 15 | The option “INLINE=ON” is not valid for this function. Check the documentation for the constructs supported with INLINE option in a function. |
16204 | 15 | Invalid column ordinal provided for column %d. Column ordinal has to be greater than zero. |
16205 | 15 | Invalid read length provided in OPENROWSET query. Length has to be greater than zero. |
16301 | 16 | User ‘%.*ls’ not found. |
16302 | 16 | Role ‘%.*ls’ not found. |
16303 | 16 | ‘%.*ls’ is not a feature than can be restricted. |
16304 | 16 | ‘%.*ls’ is not an object class than can be restricted. |
16305 | 16 | The database does not support feature restrictions. |
16306 | 16 | Failed to add the feature restriction. |
16307 | 16 | Failed to drop the feature restriction. |
16308 | 16 | Invalid parameter ‘%.*ls’: Must be unicode string with length between 1 and 127. |
16309 | 16 | Feature restrictions are not allowed for the dbo user. |
16601 | 16 | Credential of database ‘%ls’ are invalid. |
16602 | 16 | Cannot delete sync agent ‘%ls’ because it is used by sync member ‘%ls’. |
16603 | 16 | Cannot add database ‘%ls’ into sync group because the database name is invalid. |
16604 | 16 | Hub database ‘%ls’ is invalid. |
16605 | 16 | Member database ‘%ls’ is invalid. |
16606 | 16 | Database ‘%ls’ cannot be deleted because it is used as a sync metadata database which still contains sync groups and/or sync agents. |
16607 | 16 | Sync metadata database ‘%ls’ is invalid. |
16608 | 16 | Cannot create or update sync group because the sync group name ‘%ls’ is invalid. |
16609 | 16 | Cannot create or update sync group ‘%ls’ because the conflict resolution policy is invalid. |
16610 | 16 | Cannot create sync group because the sync group name ‘%ls’ is used. |
16611 | 16 | Cannot create or update sync group ‘%ls’ because the sync schema contains circular reference. |
16612 | 16 | Cannot create or update sync group ‘%ls’ because the table ‘%ls’ in sync schema contains no clustered index. |
16613 | 16 | Cannot delete sync group ‘%ls’ because the sync group is syncing. |
16614 | 16 | Cannot create or update sync group ‘%ls’ because database ‘%ls’ is invalid. |
16615 | 16 | Cannot create or update sync group ‘%ls’ because the sync interval is invalid. |
16616 | 16 | Cannot update sync schema because the data type change is not supported. |
16617 | 16 | Sync group ‘%ls’ is not ready to update sync schema because there are some ongoing operations on the sync group. |
16618 | 16 | Cannot update sync schema because some columns are missing in database ‘%ls’. |
16619 | 16 | Cannot update sync schema because some tables are missing in database ‘%ls’. |
16620 | 16 | Cannot update sync schema because the format of sync schema is invalid. |
16621 | 16 | Sync group ‘%ls’ is not in active state. Make sure the sync schema of it is set. |
16622 | 16 | Hub database ‘%ls’ is suspended because the credential of it is invalid. |
16623 | 16 | Sync group ‘%ls’ is invalid. |
16624 | 16 | Cannot create or update sync member because the sync member name ‘%ls’ is invalid. |
16625 | 16 | Cannot create or update the sync member ‘%ls’ because the database type ‘%ls’ provided is invalid. |
16626 | 16 | Cannot create or update the sync member ‘%ls’ because the sync direction ‘%ls’ provided is invalid. |
16627 | 16 | Cannot create or update the sync member ‘%ls’ because the sync agent ‘%ls’ provided is invalid. |
16628 | 16 | Cannot create or update the sync member ‘%ls’ because the SQL Server database ID ‘%ls’ provided is invalid. |
16629 | 16 | Cannot create sync member because the sync member name ‘%ls’ provided is used. |
16630 | 16 | Cannot create sync member ‘%ls’ because the database ‘%ls’ provided is already added as a sync member. |
16631 | 16 | Cannot delete sync member ‘%ls’ when it is syncing. |
16632 | 16 | Sync member ‘%ls’ does not exist. |
16633 | 16 | Cannot create sync agent because the sync agent name ‘%ls’ provided is used. |
16634 | 16 | Sync agent ‘%ls’ is invalid. |
16635 | 16 | Cannot create sync group ‘%ls’ because the maximum number of basic sync groups can be created is %d. |
16636 | 16 | Cannot create sync member ‘%ls’ because the maximum number of sync members can be created in a sync group is %d. |
16637 | 16 | Cannot create or update sync group ‘%ls’ because the maximum count of tables in sync schema is %d. |
16638 | 16 | Cannot create or update sync group ‘%ls’ because the table ‘%ls’ in sync schema contains no primary key. |
16639 | 16 | Cannot create or update sync group ‘%ls’ because the sync schema provided contains unsupported column data type. |
16640 | 16 | Cannot refresh schema of the database ‘%ls’. |
16641 | 16 | Cannot create sync agent ‘%ls’ under a different SQL Server than the one of sync metadata database. |
16642 | 16 | Conflict logging retention period parameter is required if conflict logging is turned on. |
16643 | 16 | Data Sync conflict logging feature is not enabled. |
16644 | 16 | Value for data Sync conflict logging retention in days should be positive or zero. |
16645 | 16 | The sync group is already being dropped. |
16646 | 16 | The sync member is already being dropped. |
16647 | 16 | Failed to perform data sync operation: %ls |
16648 | 16 | The sync database specified (%ls\\%ls) does not match the existing sync database (%ls\\%ls). |
16649 | 16 | Hub logical server %ls does not exist. |
16650 | 16 | The sync agent %ls already exists. |
16651 | 16 | The sync agent with the id %ls already exists. |
16652 | 16 | Cannot update the sync group because it is currently being dropped. |
16653 | 16 | Cannot use datawarehouse edition in data sync. |
16654 | 16 | Cannot use logical master in data sync. |
16901 | 16 | %hs: This feature has not been implemented yet. |
16902 | 16 | %ls: The value of the parameter %ls is invalid. |
16903 | 16 | The “%ls” procedure was called with an incorrect number of parameters. |
16904 | 16 | sp_cursor: optype: You can only specify ABSOLUTE in conjunction with DELETE or UPDATE. |
16905 | 16 | The cursor is already open. |
16906 | 17 | Temporary storage used by the cursor to store large object variable values referred by the cursor query is not usable any more. |
16907 | 16 | %hs is not allowed in cursor statements. |
16909 | 16 | %ls: The cursor identifier value provided (%x) is not valid. |
16910 | 16 | The cursor %.*ls is currently used by another statement. |
16911 | 16 | %hs: The fetch type %hs cannot be used with forward only cursors. |
16914 | 16 | The “%ls” procedure was called with too many parameters. |
16915 | 16 | A cursor with the name ‘%.*ls’ already exists. |
16916 | 16 | A cursor with the name ‘%.*ls’ does not exist. |
16917 | 16 | Cursor is not open. |
16922 | 16 | Cursor Fetch: Implicit conversion from data type %s to %s is not allowed. |
16924 | 16 | Cursorfetch: The number of variables declared in the INTO list must match that of selected columns. |
16925 | 16 | The fetch type %hs cannot be used with dynamic cursors. |
16926 | 16 | sp_cursoroption: The column ID (%d) does not correspond to a text, ntext, or image column. |
16927 | 16 | Cannot fetch into text, ntext, and image variables. |
16928 | 16 | sp_cursor: Exec statement is not allowed as source for cursor insert. |
16929 | 16 | The cursor is READ ONLY. |
16930 | 16 | The requested row is not in the fetch buffer. |
16931 | 16 | There are no rows in the current fetch buffer. |
16932 | 16 | The cursor has a FOR UPDATE list and the requested column to be updated is not in this list. |
16933 | 16 | The cursor does not include the table being modified or the table is not updatable through the cursor. |
16934 | 10 | Optimistic concurrency check failed. The row was modified outside of this cursor. |
16935 | 16 | No parameter values were specified for the sp_cursor-%hs statement. |
16936 | 16 | sp_cursor: One or more values parameters were invalid. |
16937 | 16 | A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor. |
16938 | 16 | sp_cursoropen/sp_cursorprepare: The statement parameter can only be a batch or a stored procedure with a single select, without FOR BROWSE, COMPUTE BY, or variable assignments. |
16941 | 16 | Cursor updates are not allowed on tables opened with the NOLOCK option. |
16942 | 16 | Could not generate asynchronous keyset. The cursor has been deallocated. |
16943 | 16 | Could not complete cursor operation because the table schema changed after the cursor was declared. |
16945 | 16 | The cursor was not declared. |
16946 | 16 | Could not open the cursor because one or more of its tables have gone out of scope. |
16947 | 16 | No rows were updated or deleted. |
16948 | 16 | The variable ‘%.*ls’ is not a cursor variable, but it is used in a place where a cursor variable is expected. |
16949 | 16 | The variable ‘%.*ls’ is a cursor variable, but it is used in a place where a cursor variable is not valid. |
16950 | 10 | The variable ‘%.*ls’ does not currently have a cursor allocated to it. |
16951 | 16 | The variable ‘%.*ls’ cannot be used as a parameter because a CURSOR OUTPUT parameter must not have a cursor allocated to it before execution of the procedure. |
16952 | 16 | A cursor variable cannot be used as a parameter to a remote procedure call. |
16953 | 10 | Remote tables are not updatable. Updatable keyset-driven cursors on remote tables require a transaction with the REPEATABLE_READ or SERIALIZABLE isolation level spanning the cursor. |
16954 | 16 | Executing SQL directly; no cursor. |
16955 | 16 | Could not create an acceptable cursor. |
16956 | 10 | The created cursor is not of the requested type. |
16957 | 16 | FOR UPDATE cannot be specified on a READ ONLY cursor. |
16958 | 16 | Could not complete cursor operation because the set options have changed since the cursor was declared. |
16959 | 16 | Unique table computation failed. |
16960 | 16 | You have reached the maximum number of cursors allowed. |
16961 | 10 | One or more FOR UPDATE columns have been adjusted to the first instance of their table in the query. |
16962 | 16 | The target object type is not updatable through a cursor. |
16963 | 16 | You cannot specify scroll locking on a cursor that contains a remote table. |
16964 | 16 | For the optimistic cursor, timestamp columns are required if the update or delete targets are remote. |
16965 | 16 | Cursor scroll locks were invalidated due to a transaction defect. Reissue the UPDATE or DELETE statement after a cursor fetch. |
16966 | 16 | %ls: Specified concurrency control option %d (%ls) is incompatible with static or fast forward only cursors. Only read-only is compatible with static or fast forward only cursors. |
16992 | 16 | The cursor operation is required to wait for cursor asynchronous population to complete. However, at this point the transaction cannot be yielded to let the asynchronous population to continue. |
16996 | 16 | %ls cannot take output parameters. |
16998 | 16 | The asynchronous cursor worktable population thread spawn failed. |
16999 | 20 | Internal Cursor Error: The cursor is in an invalid state. |
17000 | 10 | Usage: sp_autostats <table_name> [, {ON|OFF} [, <index_name>] ] |