I have an MDF and LDF file of SQL Server 2005. i attached it with SQL Server 2008 and did some change in data. now when i attached it back to sql server 2005 Express Edition it gives version error.
The database 'E:\DB\JOBPERS.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported. Could not open new database 'E:\DB\JOBPERS.MDF'. CREATE DATABASE is aborted. An attempt to attach an auto-named database for file E:\DB\Jobpers.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Your MDF and LDF are now version 655 (the SQL 2008 version). As the error message clearly states, there is no downgrade possibility. From now on, you can only attach these files to SQL Server 2008 or to SQL Server 2008 R2 (which will upgrade them to 661 btw). You can never attach these files back to a SQL 2005 instance.
It's because the file formats are fundamentally different. If you attach the file to SQL server 2008, you MUST upgrade your express edition to at leas. The version you last attached the file to.
So you only have 2 choices: upgrade or ditch your file and redo your updates on a 2005 install.
It is a one way street, you can always go up aversion but never down a version, this is because of meta data changes
I know what the problem is, it is quit descriptive error. but was asking the solution of that problem. anyway thanks to everyone for there reply.
anyone facing same problem, see the tread below and read LEKSS reply http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/46ce6099-61c6-4526-9dda-10a3359386cb
hope this will help
Update: Quoted external link for safe keeping
Man I ran into this problem too. But here is an even easier way to over come this:
What I did is copy my original .MDF DB file from my source files on my development machine where I keep backups of all my .MDF files using Visual Studio earlier versions and then copied the file directly to the server since I have direct access to my server.
I just pasted the file in to the server Inetpub location where the App_Data folder for my website files and voila! No more compatibility issues.
Then using SQL Server Management Studio reattach the DB file that you just pasted into the Inetpub and it worked!
I know this was answered but this one solved the problem for me:
database-cannot-be-opened-because-it-is-version-655
basically remove "\SQLEXPRESS" from connection string value. instead of: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\OTJDB.mdf;Integrated Security=True;User Instance=True
use: Data Source=.;AttachDbFilename=|DataDirectory|\OTJDB.mdf;Integrated Security=True;User Instance=True