Skip Navigation Links
Home
Articles
SQL Server 2012
SQL Server 2014
SQL Server 2016
FAQ
Practice Test
Tip of the Day : How to Get a List of Databases Within a SQL Server Instance
Home > Tips & Tricks > Error Messages 5001 to 6000
SQL Server Error Messages - Errors 5001 to 6000

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
5001 16 User must be in the master database.
5002 16 Database '%.*ls' does not exist. Check sysdatabases.
5004 16 To use ALTER DATABASE, the database must be in a writable state in which a checkpoint can be executed.
5005 10 Extending database by %.2f MB on disk '%.*ls'.
5006 16 Could not get exclusive use of %S_MSG '%.*ls' to perform the requested operation.
5008 16 This ALTER DATABASE statement is not supported.
5009 16 ALTER DATABASE failed. Some disk names listed in the statement were not found. Check that the names exist and are spelled correctly before rerunning the statement.
5010 16 Log file name cannot be generated from a raw device. The log file name and path must be specified.
5011 14 User does not have permission to alter database '%.*ls'.
5012 16 The name of the primary filegroup cannot be changed.
5013 16 The master and model databases cannot have files added to them. ALTER DATABASE was aborted.
5014 16 The %S_MSG '%.*ls' does not exist in database '%.*ls'.
5015 16 ALTER DATABASE failed. The total size specified must be 1 MB or greater.
5016 16 System databases master, model, and tempdb cannot have their names changed.
5017 16 ALTER DATABASE failed. Database '%.*ls' was not created with 'FOR LOAD' option.
5018 0 File '%.*ls' modified in sysaltfiles. Delete old file after restarting SQL Server.
5019 10 Cannot find entry in sysaltfiles for file '%.*ls'.
5020 16 The primary data or log file cannot be removed from a database.
5021 10 The %S_MSG name '%.*ls' has been set.
5022 16 Log file '%ls' for this database is already active.
5023 16 Database must be put in bypass recovery mode to rebuild the log.
5024 16 No entry found for the primary log file in sysfiles1. Could not rebuild the log.
5025 16 The file '%ls' already exists. It should be renamed or deleted so that a new log file can be created.
5026 16 Could not create a new log file with file '%.*ls'. See previous errors.
5027 16 System databases master, model, and tempdb cannot have their logs rebuilt.
5028 16 The system could not activate enough of the database to rebuild the log.
5029 10 Warning: The log for database '%.*ls' has been rebuilt. Transactional consistency has been lost. DBCC CHECKDB should be run to validate physical consistency. Database options will have to be reset, and extra log files may need to be deleted.
5030 16 The database could not be exclusively locked to perform the operation.
5031 16 Cannot remove the file '%.*ls' because it is the only file in the DEFAULT filegroup.
5032 10 The file cannot be shrunk below page %ud until the log is backed up because it contains bulk logged pages.
5035 16 Filegroup '%.*ls' already exists in this database.
5036 16 MODIFY FILE failed. Specify logical name.
5037 16 MODIFY FILE failed. Do not specify physical name.
5038 16 MODIFY FILE failed for file "%.*ls". At least one property per file must be specified.
5039 16 MODIFY FILE failed. Specified size is less than current size.
5040 16 MODIFY FILE failed. Size is greater than MAXSIZE.
5041 16 MODIFY FILE failed. File '%.*ls' does not exist.
5042 16 The %S_MSG '%.*ls' cannot be removed because it is not empty.
5043 16 The %S_MSG '%.*ls' cannot be found in %ls.
5044 10 The %S_MSG '%.*ls' has been removed.
5045 16 The %S_MSG already has the '%ls' property set.
5046 10 The %S_MSG property '%ls' has been set.
5047 16 Cannot change the READONLY property of the PRIMARY filegroup.
5048 16 Cannot add, remove, or modify files in filegroup '%.*ls'. The filegroup is read-only.
5049 16 Cannot extend file '%ls' using this syntax as it was not created with DISK INIT. Use ALTER DATABASE MODIFY FILE.
5050 16 Cannot change the properties of empty filegroup '%.*ls'. The filegroup must contain at least one file.
5051 16 Cannot have a filegroup with the name 'DEFAULT'.
5053 16 The maximum of %ld filegroups per database has been exceeded.
5054 16 Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle.
5055 16 Cannot add, remove, or modify file '%.*ls'. The file is read-only.
5056 16 Cannot add, remove, or modify a file in filegroup '%.*ls' because the filegroup is offline.
5057 16 Cannot add, remove, or modify file '%.*ls' because it is offline.
5058 16 Option '%.*ls' cannot be set in database '%.*ls'.
5059 16 Database '%.*ls' is in transition. Try the ALTER DATABASE statement later.
5060 10 Nonqualified transactions are being rolled back. Estimated rollback completion: %d%%.
5061 16 ALTER DATABASE failed because a lock could not be placed on database '%.*ls'. Try again later.
5062 16 Option '%.*ls' cannot be set at the same time as another option setting.
5063 16 Database '%.*ls' is in warm standby. A warm-standby database is read-only.
5064 16 Changes to the state or options of database '%.*ls' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
5065 16 Database '%.*ls' cannot be opened.
5066 16 Database options single user and dbo use only cannot be set at the same time.
5068 10 Failed to restart the current database. The current database is switched to master.
5069 16 ALTER DATABASE statement failed.
5070 16 Database state cannot be changed while other users are using the database '%.*ls'
5072 16 ALTER DATABASE failed. The default collation of database '%.*ls' cannot be set to %.*ls.
5073 16 Cannot alter collation for database '%ls' because it is READONLY, OFFLINE, or marked SUSPECT.
5074 16 The 'Primary Key Constraint Name' is dependent on 'Primary Key Column Name'.
5075 16 The %S_MSG '%.*ls' is dependent on %S_MSG.
5076 10 Warning: Changing default collation for database '%.*ls', which is used in replication. It is recommend that all replication database have the same default collation.

Error Severity Description
5101 15 You must supply parameters for the DISK %hs statement. Usage: %hs.
5102 15 No such statement DISK %.*ls.
5103 16 MAXSIZE cannot be less than SIZE for file '%ls'.
5104 16 File '%.*ls' already used.
5105 16 Device activation error. The physical file name '%.*ls' may be incorrect.
5106 15 Parameter '%hs' requires value of data type '%hs'.
5107 15 Value is wrong data type for parameter '%hs' (requires data type '%hs').
5108 10 Log file '%.*ls' does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
5109 16 No such parameter '%.*ls'.
5110 16 File '%.*ls' is on a network device not supported for database files.
5116 14 You do not have permission to run DISK statements.
5117 16 Could not run DISK statement. You must be in the master database to run this statement.
5122 10 Each disk file size must be greater than or equal to 1 MB.
5123 16 CREATE FILE encountered operating system error %ls while attempting to open or create the physical file '%.*ls'.
5126 16 The logical device '%.*ls' does not exist in sysdevices.
5146 16 The %hs of %d is out of range. It must be between %d and %d.
5148 16 Could not set the file size to the desired amount. The operating system file size limit may have been reached.
5149 16 MODIFY FILE encountered operating system error %ls while attempting to expand the physical file.
5150 16 The size of a single log file must not be greater than 2 TB.
5151 16 The %hs statement is obsolete and no longer supported.
5157 16 I/O error encountered in the writelog system function during backout.
5158 10 Warning: Media in device '%.*ls' may have been changed.
5159 16 Operating system error %.*ls on device '%.*ls' during %ls.
5160 16 Cannot take '%.*ls' offline because the database is in use.
5162 16 Cannot find '%.*ls' in sysdatabases.
5163 16 Cannot open '%.*ls' to take offline.
5164 16 Usage: DBCC DBCONTROL(dbname,ONLINE|OFFLINE)
5165 16 Cannot explicitly open or close master database.
5167 16 Database '%.*ls' is already offline.
5168 16 File '%.*ls' is on a network drive, which is not allowed.
5169 16 FILEGROWTH cannot be greater than MAXSIZE for file '%.*ls'.
5170 16 Cannot create file '%ls' because it already exists.
5171 16 %.*ls is not a primary database file.
5172 16 The header for file '%ls' is not a valid database file header. The %ls property is incorrect.
5173 16 Cannot associate files with different databases.
5174 10 Each file size must be greater than or equal to 512 KB.
5175 10 The file '%.*ls' has been expanded to prevent recovery from failing. Contact the system administrator for further assistance.
5176 10 The file '%.*ls' has been expanded beyond its maximum size to prevent recovery from failing. Contact the system administrator for further assistance.
5177 16 Encountered an unexpected error while checking the sector size for file '%.*ls'. Check the SQL Server error log for more information.
5178 16 Cannot use file '%.*ls' because it was originally formatted with sector size %d and is now on a device with sector size %d.
5179 16 Cannot use file '%.*ls', which is on a device with sector size %d. SQL Server supports a maximum sector size of 4096 bytes.
5180 22 Could not open FCB for invalid file ID %d in database '%.*ls'.
5181 16 Could not restart database '%.*ls'. Reverting back to old status.
5182 16 New log file '%.*ls' was created.
5183 16 File '%ls' cannot be created. Use WITH MOVE to specify a usable physical file name.
5184 16 Cannot use file '%.*ls' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used.
5701 10 Changed database context to '%.*ls'.
5702 10 SQL Server is terminating this process.
5703 10 Changed language setting to %.*ls.
5803 10 Unknown config number (%d) in sysconfigures.
5804 16 Character set, sort order, or collation cannot be changed because at least one database is not writable.
5805 16 Too few locks specified. Minimum %d.
5807 16 Recovery intervals above %d minutes not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5808 16 Ad hoc updates to system catalogs not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5809 16 Average time slices above %d milliseconds not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5810 16 Valid values for the fill factor are 0 to 100.
5812 14 You do not have permission to run the RECONFIGURE statement.
5823 16 Cannot reconfigure SQL Server to use sort order ID %d, because the row for that sort order does not exist in syscharsets.
5828 16 User connections are limited to %d.
5829 16 The specified user options value is invalid.
5830 10 The default collation for SQL Server has been reconfigured. Restart SQL Server to rebuild the table indexes on columns of character data types.
5831 16 Minimum server memory value (%d) must be less than or equal to the maximum value (%d).
5904 17 Background checkpoint process suspended until locks are available.

Related Articles :