Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way of telling which version of Microsoft SQL Server a database backup is from without restoring it?

share|improve this question
up vote 6 down vote accepted


The database version can be found in the column: DatabaseVersion

From Jonathan Kehayias blog post here the number in this column:

  • SQL Server 7.0 databases have version number 515
  • SQL Server 2000 databases have version number 539
  • SQL Server 2005 databases have version number 611/612
  • SQL Server 2008 databases have version number 655

[To those that want to edit this answer to include additional version numbers, that is not the intention of this answer. It was just for example and quoting the information that is from the link provided. The version number of a database can vary and may not be exact across every database based on what SP or CU is installed, or setting/feature that is being used. The version numbers are not documented by Microsoft and is just a simple reference to understand that the number increases as you move between SQL Server versions.]

If you try to run this command for a more recent database version than the one you're running it under (e.g. a 2012 DB from SSMS 2008), the database results display as INCOMPLETE

To check the build number of the instance check for columns:

  • SoftwareVersionMajor
  • SoftwareVersionMinor
  • SoftwareVersionBuild

Documentation can be found here (TechNet link).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.