SQL Server error 943 means the database file you are trying to open was created or upgraded by a newer version of SQL Server than the engine you are attaching it to, so the older engine refuses to read it. The fix is not a setting you can toggle: you must either open the database on an instance running the same or a newer major version, or restore it from a backup taken on a version your target server supports. Nothing in SQL Server lets you downgrade a database file in place, so plan around that fact before you start.
The full message usually reads something like "Database 'X' cannot be opened because it is version NNN. This server supports version NNN and earlier. A downgrade path is not supported." The two numbers tell you exactly what you are dealing with: the first is the database's internal version, the second is the highest version your current instance accepts. Matching those two numbers is the whole job.
What You'll Need
- Administrative access to the SQL Server instance that is throwing the error (a login in the sysadmin role, or at least dbcreator plus the rights to attach databases).
- Access to the server or backup file that originally produced the database, or a copy of it taken before the upgrade.
- Knowledge of which SQL Server major version created the file. The version number in the error maps to a release, and the mapping is documented by Microsoft.
- SQL Server Management Studio (SSMS) or Azure Data Studio connected to the affected instance, or sqlcmd if you prefer scripts.
- Enough free disk space to hold a restored copy of the database, plus room for its log file.
Step-by-Step
- Read the version numbers in the error. Note both numbers. The first is the database's compatibility version, the second is the maximum your instance supports. Write them down; you will compare them at every later step.
- Confirm the instance version. In SSMS, right-click the server node and choose Properties, or run
SELECT @@VERSION;in a query window. This tells you the major release (for example SQL Server 2019 or 2022) so you can see how far behind the file is. - Decide on the target instance. If you have an instance at the same or a newer major version than the file, attach or restore there. That is the only supported way to open a newer file. Do not attempt to edit the file header or use undocumented tools to change the version number; that corrupts the database and voids support.
- If you must keep the current instance, go back to a backup. Locate a full backup of the database taken while it was still on a version your server supports. Restore that backup to the old instance, then reapply any changes made since. Differential and transaction log backups can shorten the gap if you have them.
- Restore with the right options. In SSMS, right-click Databases and choose Restore Database, pick the backup file, and on the Options page choose Overwrite the existing database if you are replacing a broken attach. Use WITH MOVE in a T-SQL RESTORE if the original file paths do not exist on the new server.
- Check the compatibility level after restoring. Run
SELECT name, compatibility_level FROM sys.databases;and compare with the source. A restored database keeps its old compatibility level, which can change query plans and behaviour. Raise it deliberately withALTER DATABASE [YourDb] SET COMPATIBILITY_LEVEL = ...;only after testing. - Fix orphaned users. After a restore to a different server, logins may lose their mappings. Use for each affected user, or sp_change_users_login on older setups.
- Update statistics and run a consistency check. Run DBCC CHECKDB on the restored database and update statistics before handing it back to applications. This catches problems early rather than during production traffic.
- Prevent a repeat. Record which instance version each database belongs to, and test restores to older instances before you rely on them. When you upgrade an instance, note that the databases cannot go back down afterwards.
Common Mistakes
The most damaging mistake is trying to force the file open by hex-editing the version bytes in the database header. It sometimes appears to work, then fails during recovery or produces silent corruption that DBCC CHECKDB later flags. There is no supported downgrade path, and Microsoft's documentation says so plainly.
Another frequent error is attaching a database copied from a newer server without checking versions first, then assuming the problem is permissions or file locks. Error 943 is specific: it is a version mismatch, not an access problem, so granting more rights will never fix it.
People also forget that restoring a backup to an older instance fails for the same reason. A backup is not a portable downgrade format. If the backup was taken on a newer major version, an older server cannot restore it either.
Finally, raising the compatibility level immediately after a restore without testing is a common cause of sudden performance regressions. Compatibility level controls the query optimiser behaviour, and changing it can alter plans for many queries at once.
Tips
Keep a note of the build number of every instance you manage, and check it before moving any database between servers. The error message's two numbers are the fastest diagnostic you have.
Use backup and restore rather than detach and attach when moving databases between servers. Detach leaves the instance without the database if the attach fails, and it does not solve version mismatches anyway.
If the database must live on the older server, consider scripting the schema and data out instead: generate scripts for the objects, then use the Import and Export Wizard or bcp to move the rows. This is slower and loses some objects, but it produces a database the older engine can create natively.
When you upgrade an instance, take fresh full backups immediately afterwards and store them separately. Those backups are your only route back to the older version if you later need it.
Troubleshooting
If the database still will not open on a newer instance, check that the service account has read and write permission on the .mdf and .ldf files and the folder containing them. A permissions failure produces a different error, but it is easy to confuse the two when you are already frustrated.
If a restore fails with a version error, confirm you are connected to the instance you think you are. It is common to have several instances on one machine and to restore into the wrong one.
If the database attaches but applications fail, check the compatibility level, orphaned users, and whether the application expects features that only exist in the newer release. A database that opens is not automatically a database that behaves the same.
If DBCC CHECKDB reports errors after any workaround attempt, restore from a known-good backup and do not keep using the damaged copy. Corruption found after an unsupported edit is not repairable by normal means.
If you have no backup and no newer instance available, the realistic options are to build a newer instance (a supported version you can license and run) or to reconstruct the database from scripts and exported data. There is no third path that preserves the file as-is.
Frequently Asked Questions
Can I downgrade a SQL Server database file?
No. SQL Server does not support downgrading a database to an earlier major version. The supported routes are to use an instance at the same or newer version, or to restore a backup taken on a supported version.
Does changing the compatibility level fix error 943?
No. Compatibility level affects query behaviour, not the file format. Error 943 is about the internal database version, which compatibility level does not change.
Will a backup from a newer SQL Server restore on an older one?
No. Backups carry the same version restriction. An older instance cannot restore a backup taken on a newer major version.
Is it safe to edit the version number in the file header?
No. It is unsupported and risks corruption that may not appear until later. Do not do it on any database you care about.
Can I move the data to an older server another way?
Yes, by scripting the schema and exporting the data, then recreating the database on the older instance. It is slower and some objects need manual attention, but it produces a database the older engine creates itself.
Why did this happen after an upgrade?
Upgrading an instance upgrades its databases in place. Once that happens, those files can no longer be opened by the previous version, so any copy you kept is now tied to the newer release.