JasonBourne
JasonBourne

Reputation: 33

how to attach .mdf file to sql server 2008 EXPRESS

I have .mdf files created using SQL SERVER management studio in another computer and wish to attach the same to SQL SERVER 2008 EXPRESS in another computer. How should I do so? I tried this method :How to: Attach a Database File to SQL Server Express but then it shows an error that the database cannot be created due to compatibility issues.

Msg 948: The database xyz cannot be opened because it is version 706. This server supports version 655 and earlier. A downward path is not supported..

....

Upvotes: 0

Views: 1329

Answers (2)

Amarnath Balasubramanian
Amarnath Balasubramanian

Reputation: 9460

The message is very clear:

  1. The database MDF file is version 706. Your server understands version 655 . Which means, despite to your claim to the contrary, that you are connected to a SQL Server 2008.

  2. Install a SQL Server 2012, connect to it, and attach your database.

  3. Please pay attention during the installation process to the instance name you choose and make sure you connect to that instance.

  4. You can also check now what instances you have installed, look at what services you have on your system.

SELECT @@VERSION AS 'SQL Server Version'

Upvotes: 0

XeroxDucati
XeroxDucati

Reputation: 5190

This basically means your SQL versions don't match. For example, if you backup a database on SQL 2012, you can't restore it to 2008. In your case Version 706 is a database file from Sql Server 2012 and Version 663 is a database file from Sql Server 2008R2 (with some SP).

You can either install SQL Express 2012 to attach the MDF, or if you can't do that, you would have to script out your schema and data and create the DB from scratch.. Unfortunately there's no way to 'downgrade' and MDF back to an older version of SQL.

Upvotes: 1

Related Questions