Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to attach a database fails because it is version 782

Tags:

sql-server

I recently reinstalled Windows and am trying to set up SQL Server again with an existing database. I've tried installing SQL Server 2012 and 2014, and continuously get the same error. The error says that the database is version 782 and this version of SQL Server is only compatible with 706 and below. I get this error with both SQL Server 2012 and 2014. I thought 2014 was compatible with 782+.. Can anyone provide me with some guidance as to how to attach a damn database? Frustrated...

Image from SQL Server 2014..

and just to note, I get the same error in 2012. Everything was functioning before the OS reinstall.

This is from SQL Server 2014

like image 507
user3308043 Avatar asked Aug 26 '14 08:08

user3308043


People also ask

How do you fix the database Cannot be opened because it is version 782?

Try changing Tools > Options > Database Tools > Data Connections > SQL Server Instance Name . The default for VS2013 is (LocalDB)\v11. 0 . Changing to (LocalDB)\MSSQLLocalDB , for example, seems to work - no more version 782 error.


2 Answers

If you are using a LocalDB 2014 the all you need to do is make sure that your connection string is pointing to the correct instance.

So change

"Data Source=(Localdb)\v11.0"

to

"Data Source=(Localdb)\v12.0" 

or

"Data Source=(Localdb)\mssqllocaldb"
like image 93
Yooakim Avatar answered Oct 12 '22 11:10

Yooakim


Database must be set to older or same version of the server. You cannot use 2012 server with 2014 database.

According to this link: http://sqlserverbuilds.blogspot.com/2014/01/sql-server-internal-database-versions.html 782 is version 2014 and you cannot use earlier versions.

If you tried SQL Server 2014, update to latest version.

Also make sure you install server not just management tools, since you say that the image is from 2014 but server supports 706, which means it's 2012.

You can do 'SELECT @@version' from your management studio to see on which version of server you're running.

like image 34
Fedor Hajdu Avatar answered Oct 12 '22 12:10

Fedor Hajdu