SQL 2008 Express edition error

Last post 11-19-2008 5:23 AM by Jian Kang - MSFT. 12 replies.

Sort Posts:

  • SQL 2008 Express edition error

    11-17-2008, 9:10 AM
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    I got this error message when opening

    The database 'C:\USERS\KVDMAST\DOWNLOADS\TEST.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 'C:\USERS\KVDMAST\DOWNLOADS\TEST.MDF'. CREATE DATABASE is aborted.

    I installed SQL Server Express 2008 besides a developer edition of SQL Server 2005 but still I retrieve the same error message. I also rebooted the system just to be sure but still the error message appears. Is there anything else that needs to be taken care of? 

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-17-2008, 10:39 AM
    • Contributor
      4,522 point Contributor
    • tompy_nation
    • Member since 02-28-2007, 10:45 AM
    • Gent
    • Posts 1,157

     

    on which db engine did you create your TEST database?

    Downloaded and installed the latest version of 2008 express?

     

    Don't forget to click "Mark as Answer" on the post that helped you.
  • Re: SQL 2008 Express edition error

    11-17-2008, 11:00 AM
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    tompy_nation:
    on which db engine did you create your TEST database?

    I didn't create the database. It was something found on the internet as a sample. I looked up the error message and found out that I needed to install SQL 2008.

    tompy_nation:
    Downloaded and installed the latest version of 2008 express?

    Yes.

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-17-2008, 12:03 PM
    • All-Star
      87,071 point All-Star
    • limno
    • Member since 06-10-2005, 7:50 PM
    • Iowa, USA
    • Posts 4,947
    • Moderator
      TrustedFriends-MVPs

     

    Kris,

    You cannot attach SQL Server 2008 database to your SQL Server 2005 instance.

    Limno

    Format your SQL query with instant sql formatter:
    http://www.dpriver.com/pp/sqlformat.htm
  • Re: SQL 2008 Express edition error

    11-17-2008, 3:23 PM
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    limno:
    You cannot attach SQL Server 2008 database to your SQL Server 2005 instance.

    I did install SQL Server Express 2008 besides the full blown version of 2005 Developer edition. Do I need to upgrade that 2005 to a 2008 version? I don't attach it to the 2005 as I thought the Express edition could also run as a separate process? 

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-17-2008, 3:53 PM
    • All-Star
      87,071 point All-Star
    • limno
    • Member since 06-10-2005, 7:50 PM
    • Iowa, USA
    • Posts 4,947
    • Moderator
      TrustedFriends-MVPs

    I don't know how you got the error message. I can reproduce it from attaching a SQL Server 2008 database to SQL Server 2005 instance. I have all versions on my machine without problem. Kris, do you have SQL Server Management Studio Express 2008 installed? You cannot attach a SQL Server 2008 database from the SSMS 2005.

    It took me a while to uninstall SSMS express 2005 and install SSMS express 2008.  Let me know if I can help more.

     

    Limno

    Format your SQL query with instant sql formatter:
    http://www.dpriver.com/pp/sqlformat.htm
  • Re: SQL 2008 Express edition error

    11-18-2008, 4:20 AM
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    no I don't have SSMS 2008 installed. I just tried to run the webapplication with the .mdf in it and also tried double clicking in Visual Studio 2008 SP1. I thought that would do the trick no?

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-18-2008, 12:40 PM
    • All-Star
      87,071 point All-Star
    • limno
    • Member since 06-10-2005, 7:50 PM
    • Iowa, USA
    • Posts 4,947
    • Moderator
      TrustedFriends-MVPs

    Interesting. Can you tell me where the sample is? I want to see why. Or you can send the sample to me. Thanks.

    Limno

    Format your SQL query with instant sql formatter:
    http://www.dpriver.com/pp/sqlformat.htm
  • Re: SQL 2008 Express edition error

    11-19-2008, 3:27 AM
    Answer

    XIII:

    Hi,

    I got this error message when opening

    The database 'C:\USERS\KVDMAST\DOWNLOADS\TEST.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 'C:\USERS\KVDMAST\DOWNLOADS\TEST.MDF'. CREATE DATABASE is aborted.

    I installed SQL Server Express 2008 besides a developer edition of SQL Server 2005 but still I retrieve the same error message. I also rebooted the system just to be sure but still the error message appears. Is there anything else that needs to be taken care of? 

    Grz, Kris.

    Hi XIII,

    Just like limmo said, this issue occurs when we attach SQL Server 2008 database files to SQL Server 2005 instance.

    From your description, it seems that you installed SQL Server 2008 Express later than SQL Server 2005, when you double clicked the database file in Visual Studio, Visual Studio still called the SQL Server 2005 instance by default.

    I think you can refer to the following steps to fix this issue:

    In Visual Studio, go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. 

    Also please view another thread:

    http://forums.asp.net/t/1315279.aspx

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: SQL 2008 Express edition error

    11-19-2008, 4:12 AM
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    Jian Kang - MSFT:

    In Visual Studio, go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. 

    After changing this, and after closing and starting up VS2008 again, it worked. I can open it in VS2008 and view the data. However execution of the sample gave me this error:

    Unable to open the physical file "C:\Temp\wcfRest\WcfAjax\WcfAjax\App_Data\WcfAjax.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
    An attempt to attach an auto-named database for file C:\Temp\wcfRest\WcfAjax\WcfAjax\App_Data\WcfAjax.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-19-2008, 4:33 AM

    From the exception, it seems that the database file is been using.

    Are you trying to run the application and connect to the database while the database is been using in Visual Studio? If so, we cannot do this. That is, if two different user instances use the same database file, one instance must close the file before the other instance can open it.

    Please right-click on the data connection in Server Explorer, and chose "Close Connection", then rerun the application.

    MSDN:

    3. The other main issue with user instances occurs because SQL Server opens database files with exclusive access. This is necessary because SQL Server manages the locking of the database data in its memory. Thus, if more than one SQL Server instance has the same file open, there is the potential for data corruption. If two different user instances use the same database file, one instance must close the file before the other instance can open it. There are two common ways to close database files, as follows.

    For more information, please refer to the document below:

    SQL Server 2005 Express Edition User Instances
    http://msdn.microsoft.com/en-us/library/bb264564.aspx


     

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: SQL 2008 Express edition error

    11-19-2008, 5:07 AM
    Answer
    • All-Star
      124,193 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,719
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    to open the mdf file in VS2008 your previous tip helped. To be able to run it, and to get around the error message I got I used this approach:

    Shut down all SQLExpress (2005) and SQL Server 2005 services. Then changed the connection string to

    Data Source=.\SQLEXPRESS2008;

    in which I added the 2008 so it became the SQLExpress2008 instance name. Then I was able to run it. After that I enabled the formentioned services again and it still works. Even when I set it in Options again to SQLEXPRESS (only it doesn't open any more in VS2008).

    Grz, Kris.

  • Re: SQL 2008 Express edition error

    11-19-2008, 5:23 AM

    When we create new database or open existing database files in Visual Studio with SQL Server Express edition, I think the option Database Connections is used to specify the parent SQL Server Express instance .

    If you still want to create or visit SQL Server 2008 database in Visual Studio, I think you need specify it to the SQL Server 2008 instance (SQLEXPRESS2008 on your machine).

     

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (13 items)