Search code examples
sql-serverdatabaseversionlocaldbmdf

MDF Version Selection


I'm having errors

The database 'PATHTO.MDF' cannot be opened because it is version 852. This server supports version 752 and earlier. A downgrade path is not supported. Could not open new database 'PATHTO.MDF'. CREATE DATABASE is aborted.

I'm creating the database on the server side with using some sql scripts. I have the ability to change database creation code so my question is that is there a way to select mdf file version while creating the database?


Solution

  • No. You cannot manipulate the value; it is internal to the file and based entirely on the database engine. If you intend to develop code, you need to be aware of which versions you need to support and make sure that any database instance you use is compatible.