Click here to Skip to main content
15,887,888 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have MSSQL Server 2014 and want to attach mdf file its not executing and its complaining about the version of the mdf file being 852.

What I have tried:

SQL
<pre>CREATE DATABASE aspnetBookerDataSync20191202113733   
    ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\SQL Server\aspnet-BookerDataSync-20191202113733.mdf'),   
    (FILENAME = 'C:\Program Files\Microsoft SQL Server\SQL Server\aspnet-BookerDataSync-20191202113733_Log.ldf')   
    FOR ATTACH;
Posted
Updated 20-Feb-20 20:22pm

1 solution

Two things:
1) Version 852 is SQL Server 2016, so earlier versions of the software can't open it. 2014 supports up to 782 only. You can't work round that, you need an earlier version of the DB file, or a later version of software. Do not that when you open a DB in a later version of software, it will be converted to the latest version automatically.

2) ATTACH is only available in Express versions of SQL Server - it's a debugging mode which isolates DB's from each other to prevent problems in dev. Production versions of the Server do not support it at all.
 
Share this answer
 
Comments
gcogco10 21-Feb-20 2:25am    
OriginalGriff, the only thing wanted to achieve is to see the table field names. If i install SQL Server Express, can i be able to see the field names from the table?
OriginalGriff 21-Feb-20 3:19am    
Yes, but be carefull. If you install an even later version of the software, then even 2016 won't be able to read it afterwards!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900