Skip Navigation Links
Home
Articles
SQL Server 2012
SQL Server 2014
SQL Server 2016
FAQ
Practice Test
Tip of the Day : How to Call NEWID Function in a User-Defined Function
Home > Tips & Tricks > Error Messages 4001 to 5000
SQL Server Error Messages - Errors 4001 to 5000

A message number uniquely identifies each error message and the error message text describes the problem.  The error message text often includes placeholders for information (such as object names) to be inserted in the error message when it is displayed.  Unfortunately, the error message text does not tell you how to solve or work around the problem.  In this series of Error Messages list, we will try to provide you with ways on how to overcome or work around certain error messages.

Some error messages are self-explanatory and can easily be fixed, such as "Invalid object name".  Others are harder to fix or work around, especially by those who are new to SQL Server.  It is the intent of this page and succeeding pages (to come) to assist you in addressing or working around SQL Server error messages.

Error Severity Description
4003 21 ODS error. Server is terminating this connection.
4004 16 Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.
4015 16 Language requested in login '%.*ls' is not an official name on this SQL Server. Using server-wide default %.*ls instead.
4016 16 Language requested in 'login %.*ls' is not an official name on this SQL Server. Using user default %.*ls instead.
4017 16 Neither the language requested in 'login %.*ls' nor user default language %.*ls is an official language name on this SQL Server. Using server-wide default %.*ls instead.
4018 16 User default language %.*ls is not an official language name on this SQL Server. Using server-wide default %.*ls instead.
4019 16 Language requested in login '%.*ls' is not an official language name on this SQL Server. Login fails.
4020 16 Default date order '%.*ls' for language %.*ls is invalid. Using mdy instead.
4027 16 Mount tape for %hs of database '%ls'.
4028 16 End of tape has been reached. Remove tape '%ls' and mount next tape for %hs of database '%ls'.
4030 10 The medium on device '%ls' expires on %hs and cannot be overwritten.
4035 10 Processed %d pages for database '%ls', file '%ls' on file %d.
4037 16 User-specified volume ID '%ls' does not match the volume ID '%ls' of the device '%ls'.
4038 16 Cannot find file ID %d on device '%ls'.
4060 11 Cannot open database requested in login '%.*ls'. Login fails.
4061 11 Cannot open either database requested in login (%.*ls) or user default database. Using master database instead.
4062 11 Cannot open user default database. Using master database instead.
4063 11 Cannot open database requested in login (%.*ls). Using user default '%.*ls' instead.
4064 11 Cannot open user default database. Login failed.
4104 16 The multi-part identifier could not be bound.
4208 16 The statement %hs is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
4212 16 Cannot back up the log of the master database. Use BACKUP DATABASE instead.
4214 10 There is no current database backup. This log backup cannot be used to roll forward a preceding database backup.
4215 10 The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.
4216 16 Minimally logged operations cannot be backed up when the database is unavailable.
4217 10 BACKUP LOG cannot modify the database because database is read-only. The backup will continue,although subsequent backups will duplicate the work of this backup.
4301 16 Database in use. The system administrator must have exclusive use of the database to restore the log.
4304 16 A USER ATTENTION signal raised during RESTORE LOG is being ignored until the current restore completes.
4305 16 The log in this backup set begins at LSN %.*ls, which is too late to apply to the database. An earlier log backup that includes LSN %.*ls can be restored.
4306 16 The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.
4316 16 Can only RESTORE LOG in the master database if SQL Server is in single user mode.
4318 16 File '%ls' has been rolled forward to LSN %.*ls. This log terminates at LSN %.*ls, which is too early to apply the WITH RECOVERY option. Reissue the RESTORE LOG statement WITH NORECOVERY.
4320 16 File '%ls' was only partially restored by a database or file restore. The entire file must be successfully restored before applying the log.
4322 10 This log file contains records logged before the designated point-in-time. The database is being left in load state so you can apply another log file.
4323 16 The database is marked suspect. Transaction logs cannot be restored. Use RESTORE DATABASE to recover the database.
4324 10 Backup history older than %ls has been deleted.
4325 16 Could not delete entries for backup set ID '%ls'.
4326 16 The log in this backup set terminates at LSN %.*ls, which is too early to apply to the database. A more recent log backup that includes LSN %.*ls can be restored.
4327 16 The log in this backup set contains minimally logged changes. Point-in-time recovery is inhibited. RESTORE will roll forward to end of logs without recovering the database.
4328 16 File '%ls' is missing. Rollforward stops at log sequence number %.*ls. File is created at LSN %.*ls, dropped at LSN %.*ls. Restore transaction log beyond point in time when file was dropped or restore data to be consistent with rest of database.
4329 10 This log file contains records logged before the designated mark. The database is being left in load state so you can apply another log file.
4330 16 The log in this backup set cannot be applied because it is on a recovery path inconsistent with the database.
4331 16 The database cannot be recovered because the files have been restored to inconsistent points in time.
4332 16 RESTORE LOG has been halted. To use the database in its current state, run RESTORE DATABASE %ls WITH RECOVERY.
4333 16 The database cannot be recovered because the log was not restored.
4334 16 The named mark does not identify a valid LSN.
4403 16 View or function '%.*ls' is not updatable because it contains aggregates.
4404 16 View or function '%.*ls' is not updatable because the definition contains the DISTINCT clause.
4405 16 View or function '%.*ls' is not updatable because the modification affects multiple base tables.
4406 16 Update or insert of view or function '%.*ls' failed because it contains a derived or constant field.
4408 19 The query and the views or functions in it exceed the limit of %d tables.
4413 16 Could not use view or function '%.*ls' because of binding errors.
4414 16 Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (%d) was exceeded.
4415 16 View '%.*ls' is not updatable because either it was created WITH CHECK OPTION or it spans a view created WITH CHECK OPTION and the target table is referenced multiple times in the resulting query.
4416 16 UNION ALL view '%.*ls' is not updatable because the definition contains a disallowed construct.
4417 16 Derived table '%.*ls' is not updatable because the definition contains a UNION operator.
4418 16 Derived table '%.*ls' is not updatable because it contains aggregates.
4419 16 Derived table '%.*ls' is not updatable because the definition contains the DISTINCT clause.
4420 16 Derived table '%.*ls' is not updatable because the modification affects multiple base tables.
4421 16 Derived table '%.*ls' is not updatable because a column of the derived table is derived or constant.
4422 16 View '%.*ls' has an INSTEAD OF UPDATE trigger and cannot be a target of an UPDATE FROM statement.
4423 16 View '%.*ls' has an INSTEAD OF DELETE trigger and cannot be a target of a DELETE FROM statement.
4424 16 Joined tables cannot be specified in a query containing outer join operators. View or function '%.*ls' contains joined tables.
4425 16 Cannot specify outer join operators in a query containing joined tables. View or function '%.*ls' contains outer join operators.
4427 16 The view or function '%.*ls' is not updatable because the definition contains the TOP clause.
4428 16 The derived table '%.*ls' is not updatable because the definition contains the TOP clause.
4429 16 View or function '%.*ls' contains a self-reference. Views or functions cannot reference themselves directly or indirectly.
4430 10 Warning: Index hints supplied for view '%.*ls' will be ignored.
4431 16 Partitioned view '%.*ls' is not updatable because table '%.*ls' has a timestamp column.
4432 16 Partitioned view '%.*ls' is not updatable because table '%.*ls' has a DEFAULT constraint.
4433 16 Cannot INSERT into partitioned view ''%.*ls'' because table ''%.*ls'' has an IDENTITY constraint.
4434 16 Partitioned view '%.*ls' is not updatable because table '%.*ls' has an INSTEAD OF trigger.
4435 16 Partitioned view '%.*ls' is not updatable because a value was not specified for partitioning column '%.*ls'.
4436 16 UNION ALL view '%.*ls' is not updatable because a partitioning column was not found.
4437 16 Partitioned view '%.*ls' is not updatable as the target of a bulk operation.
4438 16 Partitioned view '%.*ls' is not updatable because it does not deliver all columns from its member tables.
4439 16 Partitioned view '%.*ls' is not updatable because the source query contains references to partition table '%.*ls'.
4440 16 UNION ALL view '%.*ls' is not updatable because a primary key was not found on table '%.*ls'.
4441 16 Partitioned view '%.*ls' is not updatable because the table '%.*ls' has an index on a computed column.
4442 16 UNION ALL view '%.*ls' is not updatable because base table '%.*ls' is used multiple times.
4443 16 UNION ALL view '%.*ls' is not updatable because column '%.*ls' of base table '%.*ls' is used multiple times.
4444 16 UNION ALL view '%.*ls' is not updatable because the primary key of table '%.*ls' is not included in the union result.
4445 16 UNION ALL view '%.*ls' is not updatable because the primary key of table '%.*ls' is not unioned with primary keys of preceding tables.
4446 16 UNION ALL view '%.*ls' is not updatable because the definiton of column '%.*ls' of view '%.*ls' is used by another view column.
4447 16 View '%.*ls' is not updatable because the definition contains a set operator.
4448 16 Cannot INSERT into partitioned view '%.*ls' because values were not supplied for all columns.
4449 16 Using defaults is not allowed in views that contain a set operator.
4450 16 Cannot update partitioned view '%.*ls' because the definition of the view column '%.*ls' in table '%.*ls' has a IDENTITY constraint.
4451 16 Views referencing tables on multiple servers are not updatable on this SKU of SQL Server.
4501 16 View or function ''%.*ls'' has more columns defined than column names given.
4502 16 View or function <View or Function Name> has more column names specified than columns defined.
4505 16 CREATE VIEW failed because column '%.*ls' in view '%.*ls' exceeds the maximum of %d columns.
4506 10 Column names in each view or function must be unique. Column name '<Column Name>' in view or function '<View or Function Name>' is specified more than once.
4508 16 Views or functions are not allowed on temporary tables. Table names that begin with '#' denote temporary tables.
4509 16 Could not perform CREATE VIEW because WITH %ls was specified and the view contains set operators.
4510 16 Could not perform CREATE VIEW because WITH %ls was specified and the view is not updatable.
4511 16 Create View or Function failed because no column name was specified for column <Column Number>.
4512 16 Cannot schema bind %S_MSG '%.*ls' because name '%.*ls' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
4513 16 Cannot schema bind %S_MSG '%.*ls'. '%.*ls' is not schema bound.
4514 16 CREATE FUNCTION failed because a column name is not specified for column <Column Number>.
4515 16 CREATE FUNCTION failed because column '%.*ls' in function '%.*ls' exceeds the maximum of %d columns.
4516 16 Cannot schema bind function '%.*ls' because it contains an EXECUTE statement.

Error Severity Description
4602 14 Only members of the sysadmin role can grant or revoke the CREATE DATABASE permission.
4604 16 There is no such user or group '%.*ls'.
4606 16 Granted or revoked privilege %ls is not compatible with object.
4610 16 You can only grant or revoke permissions on objects in the current database.
4611 16 To revoke grantable privileges, specify the CASCADE option with REVOKE.
4613 16 Grantor does not have GRANT permission.
4615 16 Invalid column name '%.*ls'.
4617 16 Cannot grant, deny or revoke permissions to or from special roles.
4618 16 You do not have permission to use %.*ls in the AS clause.
4619 16 CREATE DATABASE permission can only be granted in the master database.
4701 11 Could not truncate table '%.*ls' because this table does not exist in database '%.*ls'.
4706 17 Could not truncate table '%.*ls' because there is not enough room in the log to record the deallocation of all the index and data pages.
4707 16 Could not truncate object '%.*ls' because it or one of its indexes resides on a READONLY filegroup.
4708 16 Could not truncate object '%.*ls' because it is not a table.
4709 16 You are not allowed to truncate the system table '%.*ls'.
4711 16 Cannot truncate table '%.*ls' because it is published for replication.
4712 16 Cannot truncate table <Table Name> because it is being referenced by a FOREIGN KEY constraint.
4803 21 Received invalid row length %d from bcp client. Maximum row size is %d.
4804 21 Premature end-of-message while reading current row from host. Host program may have terminated.
4805 17 The front-end tool you are using does not support the feature of bulk insert from host. Use the proper tools for this command.
4807 21 Received invalid row length %d from bcp client. Minimum row size is %d.
4808 16 Bulk copy operations cannot trigger BULK INSERT statements.
4810 16 Expected the TEXT token in data stream for bulk copy of text or image data.
4811 16 Expected the column offset in data stream for bulk copy of text or image data.
4812 16 Expected the row offset in data stream for bulk copy of text or image data.
4813 16 Expected the text length in data stream for bulk copy of text, ntext, or image data.
4815 21 Received invalid column length from bcp client.
4817 16 Could not bulk insert. Invalid sorted column '%.*ls'. Assuming data stream is not sorted.
4818 16 Could not bulk insert. Sorted column '%.*ls' was specified more than once. Assuming data stream is not sorted.
4819 16 Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
4820 16 Could not bulk insert. Unknown version of format file '%s'.
4821 16 Could not bulk insert. Error reading the number of columns from format file '%s'.
4822 16 Could not bulk insert. Invalid number of columns in format file '%s'.
4823 16 Could not bulk insert. Invalid column number in format file '%s'.
4824 16 Could not bulk insert. Invalid data type for column number %d in format file '%s'.
4825 16 Could not bulk insert. Invalid prefix for column number %d in format file '%s'.
4826 16 Could not bulk insert. Invalid column length for column number %d in format file '%s'.
4827 16 Could not bulk insert. Invalid column terminator for column number %d in format file '%s'.
4828 16 Could not bulk insert. Invalid destination table column number for source column %d in format file '%s'.
4829 16 Could not bulk insert. Error reading destination table column name for source column %d in format file '%s'.
4830 10 Bulk Insert: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
4831 16 Bulk Insert: DataFileType was incorrectly specified as widechar. DataFileType will be assumed to be char because the data file does not have a Unicode signature.
4832 16 Bulk Insert: Unexpected end-of-file (EOF) encountered in data file.
4833 16 Bulk Insert: Version mismatch between the provider dynamic link library and the server executable.
4834 16 You do not have permission to use the BULK INSERT statement.
4835 16 Bulk copying into a table with computed columns is not supported for downlevel clients.
4837 16 Error: Cannot bulk copy into a table '%s' enabled for immediate-updating subscriptions
4838 16 The bulk data source does not support the SQLNUMERIC or SQLDECIMAL data types.
4839 16 Cannot perform bulk insert. Invalid collation name for source column %d in format file '%s'.
4840 16 The bulk data source provider string has an invalid %ls property value %ls.
4841 16 The data source name is not a simple object name.
4842 16 The required FormatFile property is missing from the provider string of the server.
4843 16 The bulk data source provider string has a syntax error ('%lc') near character position %d.
4844 16 The bulk data source provider string has an unsupported property name (%ls).
4845 16 The bulk data source provider string has a syntax error near character position %d. Expected '%lc', but found '%lc'.
4846 16 The bulk data provider failed to allocate memory.
4847 16 Bulk copying into a table with bigint columns is not supported for versions earlier than SQL Server 2000.
4848 16 Bulk copying into a table with sql_variant columns is not supported for versions earlier than SQL Server 2000.
4849 16 Could not import table '%ls'. Error %d.
4850 10 Data import: Table '%ls' is already locked by another user.
4851 10 Data import: Table '%ls' already has data. Skipping to next table.
4852 10 Data import: Table '%ls' does not exist or it is not a user table.
4853 10 %hs
4854 21 %hs
4860 16 Could not bulk insert. File '%ls' does not exist.
4861 16 Could not bulk insert because file '%ls' could not be opened. Operating system error code %ls.
4862 16 Could not bulk insert because file '%ls' could not be read. Operating system error code %ls.
4863 16 Bulk insert data conversion error (truncation) for row %d, column %d (%ls).
4864 16 Bulk insert data conversion error (type mismatch) for row %d, column %d (%ls).
4865 16 Could not bulk insert because the maximum number of errors (%d) was exceeded.
4866 16 Bulk Insert fails. Column is too long in the data file for row %d, column %d. Make sure the field terminator and row terminator are specified correctly.
4867 16 Bulk insert data conversion error (overflow) for row %d, column %d (%ls).
4868 16 Bulk Insert fails. Codepage '%d' is not installed. Install the codepage and run the command again.
4869 16 Bulk Insert failed. Unexpected NULL value in data file row %d, column %d. Destination column (%ls) is defined NOT NULL.
4880 16 Could not bulk insert. When using the FIRSTROW and LASTROW parameters, the value for FIRSTROW cannot be greater than the value for LASTROW.
4881 10 Note: Bulk Insert through a view may result in base table default values being ignored for NULL columns in the data file.
4882 16 Could not bulk insert. Prefix length, field length, or terminator required for source column %d in format file '%s'.
4901 16 ALTER TABLE only allows columns to be added that can contain nulls or have a DEFAULT definition specified. Column '<Column Name>;' cannot be added to table '<Table Name>' because it does not allow nulls and does not specify a DEFAULT definition.
4902 11 Cannot alter table '%.*ls' because this table does not exist in database '%.*ls'.
4909 16 Cannot alter '%.*ls' because it is not a table.
4910 16 Only the owner or members of the sysadmin role can alter table '%.*ls'.
4916 16 Could not enable or disable the constraint. See previous errors.
4917 16 Constraint '%.*ls' does not exist.
4920 16 ALTER TABLE failed because trigger '%.*ls' on table '%.*ls' does not exist.
4921 16 ALTER TABLE failed because trigger '%.*ls' does not belong to table '%.*ls'.
4922 16 %ls %.*ls failed because one or more objects access this column.
4923 16 ALTER TABLE DROP COLUMN failed because '%.*ls' is the only data column in table '%.*ls'. A table must have at least one data column.
4924 16 %ls failed because column '%.*ls' does not exist in table '%.*ls'.
4925 16 ALTER TABLE ALTER COLUMN ADD ROWGUIDCOL failed because a column already exists in table '%.*ls' with ROWGUIDCOL property.
4926 16 ALTER TABLE ALTER COLUMN DROP ROWGUIDCOL failed because a column does not exist in table '%.*ls' with ROWGUIDCOL property.
4927 16 Cannot alter column '%.*ls' to be data type %.*ls.
4928 16 Cannot alter column <Column Name> because it is COMPUTED.
4929 16 Cannot alter the %S_MSG '%.*ls' because it is being published for replication.
4930 10 Warning: Columns added to the replicated table %S_MSG '%.*ls' will be ignored by existing articles.
4931 16 Cannot add columns to %S_MSG '%.*ls' because it is being published for merge replication.
4932 16 ALTER TABLE DROP COLUMN failed because '%.*ls' is currently replicated.

Related Articles :