Reputation: 6543
I have SQL Server 2012 and I'm trying to attach a db which was previously used with SQL Server 2012, surprisingly I'm getting the following error:
The database 'DatabaseName' cannot be opened because it is version 706. This server supports version 622 and earlier. A downgrade path is not supported.
I don't really understand how this could happen since like I said it was used with same 2012 version. What am I doing wrong? How can I make it work? Please explain in detail how this can be resolved.
Thank you!!
Upvotes: 0
Views: 4230
Reputation: 1
Using SELECT @@VERSION
works very well for me. Your Database Engine is connected to a 2008 DB which certainly doesn't allow you to attach. Once I change my Database Engine to connect to 2012 DB, it works for me.
Check your Database Engine connection. You can be working on 2012 Management Studio yet connecting to 2008 DB. This is what happened to me and I have solved it use SELECT @@VERSION.
Upvotes: 0
Reputation: 4060
It sounds like you had the following configuration and source databases:
As mentioned you could install SSMS for SQL Server 2008 (after you uninstall SSMS for SQL Server 2012). Then you would have to script your database for that version and re-run the script via 'Tasks>Script...', remembering to set the target server version as shown below.
After scripting you can then use the import/export wizard to export and then inport the data into the new (downgraded database), assuming the database had no 2012-only datatypes (such as sequences).
Another consideration is database compatibility level as shown below. You can have a SQL Server 2012 instance which hosts databases with various compatibility levels.
Upvotes: 0
Reputation: 6555
The error sounds like the server you are trying to attach the database to is not SQL Server 2012. This may be the version of Management Studio / Management Studio Express you're using, but I suspect SELECT @@VERSION;
will tell you something different. It may just be a connection string mixup if you have multiple instances of SQL Server installed, otherwise you should download and install SQL Server 2012 Express from here.
Upvotes: 1