Have you ever imagine you can determine the version of SQL Server from a bak or a MDF file? I have been in situations where I received a bak or MDF and LDF files from a vendor to restore \ create a database for the implementation of a new application, most of the times I receive complete detail of the supported versions of SQL Server by the product but what happens if I don’t get that information?
SQL Server offers a way to get the actual version where the files were created, let’s review the process to using a database restore.
This command does not restores the backup as the name suggest, it just returns metadata (information) about the backup file you are examining.
RESTORE HEADERONLY FROM DISK = 'physical_backup_device_name'
Here is an example of the RESTORE command and its output with two different files:
Here are the quick list lf all the SQL Server versions and their compatibility levels from SQL Server 2008 to the latest version of SQL Server.