none
Cannot read SQL Server 2008 database - version increased to 661 from 655

    Question

  • I purchased a new desktop computer that had Windows 7, so I installed Visual Studio Express 2010 from an iso image.  Now the database cannot be read on my laptop.  I then installed VS Express 2010, as well as, SQL Server 2008 R2 on the laptop, but I still get the error message that it is expecting version 655, and cannot read version 661.
    Tuesday, May 04, 2010 5:23 PM

Answers

All replies

  • Where you get that error (which tool)?

    CAn you connect to database using management studio?


    With kind regards
    Krystian Zieja
    http://www.projectnenvision.com
    Follow me on twitter
    My Blog
    Tuesday, May 04, 2010 6:08 PM
  • That error indicates you are trying to restore a SQL 2008 R2 database to SQL 2008 Non-R2.  You need to install and restore to R2.

     

    Tuesday, May 04, 2010 6:19 PM
  • That error indicates you are trying to restore a SQL 2008 R2 database to SQL 2008 Non-R2.  You need to install and restore to R2.


    Yep, this is correct.  Paul Randal blogged about this earlier this year:

    http://sqlskills.com/BLOGS/PAUL/post/SQL-Server-2008-R2-bumps-the-database-version.aspx

    Once a database is upgraded internally, it can only be attached back to the version of SQL it was upgraded to.  Versions 660/661 are SQL 2008 R2 as Tom says.


    Jonathan Kehayias
    http://sqlblog.com/blogs/jonathan_kehayias/
    http://www.twitter.com/SQLSarg
    http://www.sqlclr.net/
    Please click the Mark as Answer button if a post solves your problem!
    Wednesday, May 05, 2010 12:18 AM
  • Amazing how you guys don't bother to read the question, and the responses are marked as answers by someone at Microsoft long after the person asking the question has given up and left.

    I had a similar problem with Visual Studio 2010 Express, and it has nothing to do with restoring a database at all.  It happens when you have a 2008 R2 database added to your Visual Studio project, and you try to do anything with it, like test the connection, or view entity diagrams.  Finally I figured out the following:

    -- I had two versions of SQL Server running on my machine, 10 and 10_50 (R2).  I didn't consciously install two versions.  Perhaps it happened because I installed VWD 2010 Express first, and seeing no SQL Server on the system, it installed SQL Server 2008; then I installed SQL Server 2008 R2 Express.

    -- Visual Studio configured itself by default to use the non-R2 server (which I didn't realize was there).  I restored my database into R2, and when I tried to attach it to a VS project, I got the version error.  But under Tools / Connect to database, I could switch to the R2 server and connect.
    Monday, January 31, 2011 5:01 AM
  • I totally agree with you CBHCMC, It would be nice if someone would post a real solution. I do have a VS2010 Ultimate, installed SQL Server 2008 R2 and I do have a same problem with it. In SQL Server Management studio it's working, but not within VS or when I run a project connected to SQL server.

     

    I had to move through multiple computers working on a recent project and I encountered the same problem with databases. Well we had so many troubles we almost abandoned the MS SQL

    Monday, February 07, 2011 11:30 PM
  • I don't understand what exactly you want as a response to this.  The problem is really simple, the database was created on SQL Server 2008R2 and that means that the database can only go to SQL Server 2008R2, the internal structures and code of the database are different in 2008R2 than in 2008.  Your complaint here is the same as me developing a project in VS2010 and blindly accepting the defaults setup for it, and then blaming Microsoft that my application requires .NET 4.0 and all the machines in my environment are .NET 3.5 or .NET 2.0 and upgrading is not possible in my environment for whatever reason. 

    Has Microsoft done a craptastic job of confusing developers, vendors, and even DBA's with the 2008R2 release?  Oh yeah, you betcha, and I have had implemenation problems in my own environments where a vendor specified that a new system used SQL Server 2008 only to have them deliver me a 2008R2 database to restore and it required that I build the SQL Server for the project from scratch.  To anyone reading this post SQL Server 2008 and SQL Server 2008R2 are different releases entirely.  They have different patching, different licensing, and sadly as people are learning, different database version numbers making it impossible to move a database backwards from 2008R2 to 2008.

    If you failed to pay attention to the minute details and built your database on SQL Server 2008R2 Express from Visual Studio 2010, you have two options.  First you can run the database on a full version of SQL Server 2008R2.  The second option is that you can script out all of the database objects and rebuild the database on SQL Server 2008 and then use the Import/Export wizard to transfer the data from the 2008R2 database to the 2008 one, or pay the license for SQL Compare and SQL Data Compare and let that tool handle the synchronization for you automatically.  Blaming Microsoft for your mistake is not going to solve your problem.

     


    Jonathan Kehayias | Senior Database Administrator and Consultant
    Feel free to contact me through My Blog or Twitter
    Please click the Mark as Answer button if a post solves your problem!
    Tuesday, February 08, 2011 12:21 AM
  • I agree.  Having more than one or even two different versions to manage can be a pain.  You may just accidentally create one thing and get crossed while trying to use it in another thing all locally on one development machine.  Although this is why managing even your development or administrative machine is a task that should be done in detail.  If you understand the versions installed, supporting points of each and manage your own machine correctly, you would not run into these problems.  It is really quite simply.  On many occasions being in both roles of a developer and database administrator, I've had to spend countless time fixing issues just like the one you are complaining about.  Every time when confronted with the question of, "What did you install?" The answers were never clear even on what was installed first or last or in the middle (or if they read the actual requirements or full listing of supporting installations that were involved with the package).

    If you take time to understand what you are installing, using, managing and even just pay attention to the fine details, you are less likely to find yourself in problems like these.

    For the argument against this exact post.  Let's get one thing clear.

    >>but I still get the error message that it is expecting version 655, and cannot read version 661.

    Database version 655 is SQL Server 2008

    Database version 661 is SQL Server 2008 R2

    That is a detail. You can even see it being noted in the details on mirroring 2005 to 2008 here when database version 611 moves to 655 http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/mirroring-sql-server-2005-to-sql-server--2

    Now spending the small amount of time to Google database version 655 and 661 would show you that the answers to the post at hand were absolutely correct.  Whining aside of what was installed in what order or managed to confused which database engine was truly being worked on, the answer is, "The database version is not compatible with the engine it is trying to be used on"

    Basically there is no open ended aspect to this post.  It should be closed from here out as it was answered.  If the concept of why a database engine is installed behind VS2010 is up, start a new thread.  Others have experience with helping manage development machines so they don't get confusing and may be able to help.

     

     


     

    Ted Krueger Blog on lessthandot.com @onpnt on twitter
    Please click the Mark as Answer button if a post solves your problem!

    Tuesday, February 08, 2011 1:42 AM
  • Has Microsoft done a craptastic job of confusing developers, vendors, and even DBA's with the 2008R2 release?

     Would it be too much to ask Microsoft for fair and complete forewarning when major changes are made to SQL Server? The 2008 R2 release is causing many problems. A simple email to registered VS 2010 users with complete instructions, in addition to a comprehensive press release, could have prevented a lot of frustration and angst among developers. The issue is not how easy or difficult the problem is solved, it's the fact that most developers were not notified about the changes, which is very bad customer service.

    Tuesday, February 15, 2011 4:46 PM
  • Hello,

    The following article is a must read to understand the reason why you are getting the error.

    Why an SQL Server Database from a higher version cannot be restored onto a lower version?

    Hope that Helps!

    Cheers,
    Ashish Kumar Mehta

    Please click the Mark as Answer button if a post solves your problem and Vote as Helpful if a Post is Helpful!

    Tuesday, February 15, 2011 6:39 PM
  • Simple,

    Uninstall SQL SERVER 2008 (which might been installed by VS 2010 by default)

    Restart the PC.

    And then install SQL SERVER 2008 R2 using Microsoft Web Installer 3.0 (You need to be installed this first)

    Restart the PC.

    Thats it.

    it works for me.. 

    Thanks.

    Wednesday, November 02, 2011 8:06 PM
  • The problem is due incorrect server name in sql connection wizard. same problem occured i solved.
    Monday, January 30, 2012 8:50 PM
  •  Would it be too much to ask Microsoft for fair and complete forewarning when major changes are made to SQL Server? The 2008 R2 release is causing many problems.

    Also, why is this happening to me now?  I'd been working on the MVC Music Store tutorial because that was the only decent top-down presentation I've been able to find for dependency injection.  I had set up the downloaded sample database to run in SQL Server Express, to make the project more easily portable as this is an academic assignment.  It was working fine for the most part, until I ran into some resource contention issues.  I had originally downloaded this sample data maybe two or three months ago at most.

    A couple of days ago I decided to start over, and re-downloaded the sample data--and that's when the problem hit me, nearly two years after this thread was started.

    I next thought, for whatever reason I'm not running R2, so I'll just re-download SQL Server 2008 R2 from Dreamspark, where I have an account.  On attempting to do so, I was told I already have a version of the product installed (well naturally).  But when I check it out in the Control Panel, it seems I'm already running SQL Server 2008 R2.

    So what should I do now?  My time to get the project done is running seriously short.

     


    Monday, March 26, 2012 12:10 AM
  • That error indicates you are trying to restore a SQL 2008 R2 database to SQL 2008 Non-R2.  You need to install and restore to R2.

     

    From my Control Panel, there seem to be about a dozen different SQL Server 2008 components installed, most of which are already R2, so I don't know why this problem is surfacing now.  OK, I'll bite: I'll uninstall and reinstall all the components if that can be expected to fix this problem, but how do I go about doing this?  I know it sounds like a naive question, but my experience has been that MS products want the installation media to uninstall as well as install.  And I haven't kept the media files because they take up too much room on my hard drive; while saving them to DVDs has never worked for me as the discs invariably turn up corrupt when I try to reinstall the software from them.
    Monday, March 26, 2012 12:27 AM
  •  but how do I go about doing this? 
    And, I meant to emphasize that I'm getting the "existing-installation" error on attempting to download, so I can't get an image of the installation files to repair or delete the existing installation.
    Monday, March 26, 2012 2:46 AM
  • Thanks a lot CBHCMC. You saved my day.

    Monday, April 02, 2012 11:59 AM
  • Jonathan, the original poster did not seem to have any confusion that the version was off, but rather, why the computer which did have 2008 R2 on it, was failing to read 2008 R2 databases.

    I share CBHCMC's amazement that so many answers would just state the obvious that there was a version mismatch.

    In my own case that has led me to google up this unhelpful thread that is marked as answered, I have a dev machine which used to be able to read R2 databases just fine from MSVS 2010, and which can still use the R2 management studio just fine, but suddenly debugging in MSVS 2010 is seeming to ignore the app.config connectionString and is returning this error.

    Maybe there IS no answer to what seems like (to me) should be a simple question: How can I control where my app gets its connection string? And/or, how can I get MSVS to use the 2008 R2 SQL Server that is installed? And/or why did this change/break and how do I revert/fix it?

    And yes, if the best you can come up with is "uninstall all versions of SQL Server and then reinstall SQL Server 2008 R2", then you should acknowledge that that is a craptastic thing to have to do.

    Thursday, July 05, 2012 8:42 PM
  • The confusion on this issue is caused by the error being generaged by the Database Engine version, not the SSMS tool version used to restore the file.  Although you can connect to a SQL 2008 NON-R2 database engine with SMS 2008 R2, you cannot restore backups from a 2008 R2 database engine to 2008 non-R2.  The files are not compatible between version.  You must backup and restore to the same or higher version.

    Plesae login to the server with SSMS and run SELECT @@VERSION to see the Database Engine verison.

    Thursday, July 05, 2012 9:52 PM
  • It is, Tom? I get this error running my own program in Visual Studio, which used to work on this computer, and works on other computers. The error is from the program trying to connect to SQL Server 2008 instead of SQL Server 2008 R2, when the database is R2 and in my case both versions of SQL Server are installed on the computer, which used to not be a problem.

    I don't see that the error needs to be about restoring a database, just about trying to interact with one.

    Thursday, July 05, 2012 9:58 PM
  • I also have SQL 2008, 2008 R2 and 2005 installed on my laptop.  This error is specific to restoring or attaching a database (create with attach), not accessing a database.

    What exactly are you doing?  What tool are you using?

    Thursday, July 05, 2012 10:12 PM
  • It is, Tom? I get this error running my own program in Visual Studio, which used to work on this computer, and works on other computers. The error is from the program trying to connect to SQL Server 2008 instead of SQL Server 2008 R2, when the database is R2 and in my case both versions of SQL Server are installed on the computer, which used to not be a problem.

    I don't see that the error needs to be about restoring a database, just about trying to interact with one.

    If you are getting in Visual Studio, then it is likely because you are using the SQL Express user instance functionality and you are trying to attach a database to the wrong Express install, or at some point someone used the project and they had 2008 R2 Express installed instead of 2008 Express and now everyone on 2008 Express has this problem.  Either upgrade the Express Edition installed, target the information in the project to the 2008 R2 Express instance, or you have to manually export/import the contents to downgrade back to 2008 Express.

    Jonathan Kehayias | Principal Consultant, SQLSkills.com
    SQL Server MVP | Microsoft Certified Master: SQL Server 2008
    Author of Troubleshooting SQL Server: A Guide for Accidental DBAs
    Feel free to contact me through My Blog or Twitter. Become a SQLskills Insider!
    Please click the Mark as Answer button if a post solves your problem!

    Thursday, July 05, 2012 10:17 PM
  • I'm sorry, Tom. I expect you may be right about the original poster's situation. My own situation is different from the original poster's. I am getting a similar but different error message. I am developing a WPF application which connects to a SQL database, which can either be in a local file or a remote database, as specified in the applications app.config file. The "tool" I am using is MS Visual Studio 2010, debugging the WPF application. As soon as my code tries to access my database, I get the exception:

    {"The database 'C:\\...\\FOO.MDF' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.\r\nCould not open new database 'C:\\...\\FOO.MDF'. CREATE DATABASE is aborted.\r\nAn attempt to attach an auto-named database for file C:\\...\\FOO.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."}

    Thursday, July 05, 2012 11:42 PM
  • Thanks Jonathan. What seems to have happened is something mysterious (an update from MS Update is my suspect) has caused the project, on this dev laptop, to ignore the connectionString in App.Config, and instead try to connect to the wrong version of SQL Server on the dev laptop itself. I think it is using either the connection string in settings.settings (which I don't know how it gets set, or what I am supposed to do about that), or the connection string in the DBML file.
    Thursday, July 05, 2012 11:47 PM
  • Hi, I got the same problem, your information is really helpful, thank you.

    But I can't switch it to R2 in the Data Source property, there is only '.\SQLEXPRESS' there. Do you know how to fix it?

    Many thanks.

    Monday, August 27, 2012 10:51 PM
  • mxhyj, each computer can have different names for different SQL Server installations, which could be anything. SQLEXPRESS on your computer may be a non-R2 server instance, and your R2 one may be named something else. If you go in the Start Menu to the SQL Server 2008 R2 folder and find and run the SQL Configuration Manager, the name it refers to there should be the name of the R2 server. If you put that name in your config file, and your solution actually uses that part of the config file that you change, then it should work. In my case, Visual Studio occasionally decides to add a line which points it somewhere else, about once a month, and I need to go manually edit the file.
    Monday, August 27, 2012 11:37 PM
  • I encountered the similar issue, when trying to attache an .mdf files that was created on another machine running SQL Server 2008 R2 Express, to the SQL Server 2008 R2 Express on my machine..

    I did install 2008 (non-R2) and then 2008 R2 on my machine.

    After spending hours googling to find a solution, eventually unsuccessful, I simply decided to download the installer 'SQLEXPR_x64_ENU.exe' from http://www.microsoft.com/en-AU/download/details.aspx?id=30438 and run it again, hoping it would solve (Windows 7 64 bit)

    On the installation Wizard under 'Installation', I selected 'Upgrade from SQL Server 2000, SQL Server 2005 or SQL Server 2008' and continued to press Next until it disappeared (Obviously you will have to wait until it finish processiong each step).

    That's it. I was able to attach the same file..

    Sunday, March 03, 2013 11:45 AM