none
SQLExpress 2008 and VS2010

    Question

  • I can create a Database Connection from VS 2010 Server Explorer but unable to create a database in App_Data folder (using add new item).  I receive a Warning Dialog Box stating:

    "Connections to SQL Server database files (.mdf) require SQL Server 2005 Express  or SQL Server 2008 Express to be installed and running on the local computer......" and tells me where to download SSE.

    SQLExpress 2008 r2 is running on local computer (Network Services account).  SSE configuration has the SharedMemory, TCP/IP and NamedPipes all enabled.   I should mention that SSE was installed befored VS2010.

    Appreciate any help,

    Thanks. 


    -Art
    Thursday, April 15, 2010 1:56 AM

All replies

  • Hello,

    I would like to suggest you to let VS 2010 install SQL Server 2008 Express for you, because it will install an edition of SQL Server 2008 Express that support .Net Framework 4.

    See the following post about how SQL Server 2008 Express SP1 and .NET Framework are related each other when installing VS 2010. You will also find information about functionalities of SQL Server that will be available or not depending of version of the .Net Framework installed on your computer.

    http://blogs.msdn.com/sqlexpress/archive/2009/12/09/sql-server-express-and-net-4.aspx

    Hope this helps.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Thursday, April 15, 2010 4:09 AM
    Moderator
  • Alberto,

    Thanks for your response and link, however problem the problem persists. (Problem: SQLExpress performs nomally when accessed from ServerExplorer windows but I can't create a database from the Solution Explorer window....  Add | Add New | SQL Server Database.)

    I tried repair, unistalled and reinstalled VS 2010 (including SQLExress).  I suspect an improper registry key value or improper instance is lingering out there.... but where? 

     

     


    -Art
    Saturday, April 17, 2010 12:16 AM
  • Hello,

    Let’s file a bug in the following link and let’s wait for an answer:

    https://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=4193&FeedbackType=1\

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Monday, April 19, 2010 12:16 PM
    Moderator
  • Hello,

    Please, let me know the operating system on the computer that has VS 2010 installed. I need that information to file the bug.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Tuesday, April 20, 2010 3:45 PM
    Moderator
  • Hello Alberto,

     

    I expierence the same problem. When I try to open file mdf. in visual studio 2010 I get error (Required Components Missing):

    "connections to sql server database files (.mdf) require sql server 2005 express or sql server 2008 express to be installed and running on the local computer. The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883"

    OS: Windows 7 Ultimate.

    I don't know if that matters but previously I had VS 2008 with SQL server 2005 Express installed. Then installed VS 2010 RC. Then I uninstalled VS 2008, SQL Server 2005 Express.

    Finally I installed VS 2010, then SQL server 2008 Express r2 with advanced tools (SQLEXPRESS instance), Team Foundation Server 2010.

     

    Regards

    Greg

     

    Monday, April 26, 2010 10:40 AM
  • Hello,

    I just filed a bug on Microsoft Connect with this issue on the following link:

    https://connect.microsoft.com/VisualStudio/feedback/details/554033/connections-to-sql-server-database-files-mdf-require-sql-server-2005-express-or-sql-server-2008-express-to-be-installed-and-running-on-the-local-computer

    Let’s wait for Microsoft engineers to start working with issue. Usually they ask for more details and request some log files, so please keep visiting this thread or the link above to help them find a solution for you faster.

    Thank you for your cooperation.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Monday, April 26, 2010 12:41 PM
    Moderator
  • Hello Alberto,

     

    I expierence the same problem. When I try to open file mdf. in visual studio 2010 I get error (Required Components Missing):

    "connections to sql server database files (.mdf) require sql server 2005 express or sql server 2008 express to be installed and running on the local computer. The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883"

    OS: Windows 7 Ultimate.

    I don't know if that matters but previously I had VS 2008 with SQL server 2005 Express installed. Then installed VS 2010 RC. Then I uninstalled VS 2008, SQL Server 2005 Express.

    Finally I installed VS 2010, then SQL server 2008 Express r2 with advanced tools (SQLEXPRESS instance), Team Foundation Server 2010.

     

    Regards

    Greg

     


    It is not a bug I just created Test.mdf with VS2010 Ultimate in Windows 7 Ultimate running VS2008, VS2010, SQL Server 2005 and SQL Server 2008 developer edition and Express both with SP1 because my VS2010 installer installed SQL Server 2008 Express SP1.

    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Monday, April 26, 2010 10:34 PM
    Moderator
  • Hello,

    I just filed a bug on Microsoft Connect with this issue on the following link:

    https://connect.microsoft.com/VisualStudio/feedback/details/554033/connections-to-sql-server-database-files-mdf-require-sql-server-2005-express-or-sql-server-2008-express-to-be-installed-and-running-on-the-local-computer

    Let’s wait for Microsoft engineers to start working with issue. Usually they ask for more details and request some log files, so please keep visiting this thread or the link above to help them find a solution for you faster.

    Thank you for your cooperation.

    Regards,

    Alberto Morillo
    SQLCoffee.com


    It is not a bug because I can create it in the same operating system and the same SQL Server 2008 Express and Visual Studio.

    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Tuesday, April 27, 2010 1:21 AM
    Moderator
  • Hello Greg,

    Microsoft Support is requesting some log files. Please see the procedure to collect those files on the following link:

    https://connect.microsoft.com/VisualStudio/feedback/details/554033/connections-to-sql-server-database-files-mdf-require-sql-server-2005-express-or-sql-server-2008-express-to-be-installed-and-running-on-the-local-computer

    You can send them those files yourself or send them to me.

    Many thanks in advance for taking the time to response.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Tuesday, April 27, 2010 12:55 PM
    Moderator
  • Finally I installed VS 2010, then SQL server 2008 Express r2 with advanced tools (SQLEXPRESS instance), Team Foundation Server 2010.

     

    Hi Alberto,

    I got the above text from your Connect post and it is not related to this thread because if it is TFS related, the issue may be different and the user is best served at the TFS forums not SQL Server.  And I Unproposed your answer because what your posted is related to beta VS2010 and this thread is about RTM VS2010 which installs SQL Server 2008 Express SP1 during the install.

     


    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Tuesday, April 27, 2010 2:34 PM
    Moderator
  • Finally I installed VS 2010, then SQL server 2008 Express r2 with advanced tools (SQLEXPRESS instance), Team Foundation Server 2010.

     

    Hi Art and Greg,

    I can see only issues related to VS2010 in this thread that is Server Explorer and Solution Explorer.  So if the above text in the Connect post is related to your issue please start a new thread in TFS General forum in the link below.

    http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/threads

     
    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Tuesday, April 27, 2010 2:39 PM
    Moderator
  • Hello Caddre,

    You are right; probably this issue is not related to this forum. But now, I cannot leave the customer alone, unless he decides to move the issue to that forum. He has invested sometime with me in this thread.

    I you feel you need to take action and move this thread to another forum to find a solution for the customer faster, please do.

    Thank you for your suggestion.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Tuesday, April 27, 2010 2:59 PM
    Moderator
  • Hello Caddre,

    You are right; probably this issue is not related to this forum. But now, I cannot leave the customer alone, unless he decides to move the issue to that forum. He has invested sometime with me in this thread.

    I you feel you need to take action and move this thread to another forum to find a solution for the customer faster, please do.

    Thank you for your suggestion.

    Regards,

    Alberto Morillo
    SQLCoffee.com


    Hi Alberto,

    I know you are helping I am just saying your bug post is not the same with the thread issue because TFS is included.  Microsoft is asking for log files because that will show what in the users computers is different which may be the reason for the issue because I don't have the same problem. 

    I have used Windows 7 with VS2008, SQL Server 2005 and 2008 for eight months before VS2010 RTM on the 12th of this month when I added it.  I have also deployed Asp.net code with Windows 7 and will deploy new code in a few weeks using both SQL Server 2005 and 2008.

    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Tuesday, April 27, 2010 5:54 PM
    Moderator
  • Hello Greg,

    Microsoft Support is requesting some log files. Please see the procedure to collect those files on the following link:

    https://connect.microsoft.com/VisualStudio/feedback/details/554033/connections-to-sql-server-database-files-mdf-require-sql-server-2005-express-or-sql-server-2008-express-to-be-installed-and-running-on-the-local-computer

    You can send them those files yourself or send them to me.

    Many thanks in advance for taking the time to response.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    • Proposed as answer by Micro Cygnet Friday, March 18, 2011 1:35 PM
    • Unproposed as answer by Micro Cygnet Friday, March 18, 2011 1:35 PM
    Tuesday, April 27, 2010 6:28 PM
    Moderator
  • Hello Alberto,

     

    Thank You very much for being helpfull. Sorry I didn't respond to Your call for log files.

    I was trying to solve it myself and I didn't look at this site for a few days (that's why I haven't respond).

    What I did:

    I went to the site: http://go.microsoft.com/fwlink/?LinkId=125883 and downloaded SQLEXPRWT_x86_ENU.exe

    (Previously I tried to go to this site but there was message that there is no such site (probably I made a mistake writing this url - by the way its a pity You can't copy the url from info window in Visual Studio). So I downloaded the SQL setup file from different site (file SQLManagementStudio_x86_ENU.exe). I installed instance named SQLEXPRESS. This didn't work.)

    I ran the file SQLEXPRWT_x86_ENU.exe and installed sqlexpress but this time I let the system install default instance (MSSQLEXPRESS).

    Then in Visual Studio / Tools/Options/Database Tools/Data Connections/ in SQL Server Instance  Name field I left it blank.

    And from that moment it started to work properly.

    I can still send the log files if needed.

    Thank You Alberto again.

    Best Regards

    Greg

    PS

    I will be away for a few days so I will respond to You on monday/tuesday.

     

     

    Friday, April 30, 2010 11:29 AM
  • Hello Greg,

    Thank you for your feedback. It could help others in the future.

    Have a great weekend!

    Alberto Morillo

    Friday, April 30, 2010 11:35 AM
    Moderator
  • Hello Alberto,

     

    Thank You very much for being helpfull. Sorry I didn't respond to Your call for log files.

    I was trying to solve it myself and I didn't look at this site for a few days (that's why I haven't respond).

    What I did:

    I went to the site: http://go.microsoft.com/fwlink/?LinkId=125883 and downloaded SQLEXPRWT_x86_ENU.exe

    (Previously I tried to go to this site but there was message that there is no such site (probably I made a mistake writing this url - by the way its a pity You can't copy the url from info window in Visual Studio). So I downloaded the SQL setup file from different site (file SQLManagementStudio_x86_ENU.exe). I installed instance named SQLEXPRESS. This didn't work.)

    I ran the file SQLEXPRWT_x86_ENU.exe and installed sqlexpress but this time I let the system install default instance (MSSQLEXPRESS).

    Then in Visual Studio / Tools/Options/Database Tools/Data Connections/ in SQL Server Instance  Name field I left it blank.

    And from that moment it started to work properly.

    I can still send the log files if needed.

    Thank You Alberto again.

    Best Regards

    Greg

    PS

    I will be away for a few days so I will respond to You on monday/tuesday.

     

     

    So your problem was user error just as I said in my first post and not a bug because there are many reasons for your problem because the many values in  the Visual Studio connection property was the reason for the error.  Those values can be adjusted and changed as needed if you go to advanced setting in the same pane. 


    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Friday, April 30, 2010 1:01 PM
    Moderator
  • SQLExpress 2008 r2 is running on local computer (Network Services account).  SSE configuration has the SharedMemory, TCP/IP and NamedPipes all enabled.   I should mention that SSE was installed befored VS2010.

     

    Please look up the User instance restrictions in the BOL because it uses only Named Pipes and not TCP/IP before creating a User Instance in the App_Data folder.  I have an existing thread with the limitations listed I will add it to this thread.


    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Friday, April 30, 2010 1:06 PM
    Moderator
  • Caddre,  sorry for the long pause between reponses.  I still cannot create or connect to a SQLExpress database in the Solution Explorer. (using VS2010 RTM + SQLExpress included in VS2010 )  Again, everything works perfectly within Server Explorer.  One addtional piece of info:

    • cannot connect to SQLExpress using TOOLS | Connect to Server 
    • I can connect to a database using TOOLS | Connect to Database 

    These two conflicting results emulate the Solution Explorer and Server Explorer.  

    I do have named pipes, TCP and Shared Memory protocols enabled.


    -Art
    Tuesday, May 04, 2010 1:39 PM
  • Here are some of the restrictions based on the SQL Server BOL.

     

    There are also other considerations (after BOL):

        * One user can only have one user instance.
        * Replication will be disabled.
        * User Instance does not support SQL Server Authentication. Only Windows Authentication is supported.
        * The network protocol support for user instances is local named pipes only.
        * The user instance shares the registry entries of the parent instance.
        * There is no support for user instance with native code. This feature is only supported with ADO .NET.
        * Full text Search is not supported on a SQL Server Express user instance.
        * WMI Provider for Server Events will not be supported on the dynamically spawned user instances. This should still work on the parent SQL Server Express instance.

    So based on your reply you may want to make sure you can create user instance because connecting to database and database file which is the user instance are very different.


    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Wednesday, May 05, 2010 3:43 AM
    Moderator
  • I had the same problem, read all the posts, installed new instance of SQL 2008 express, called the instance MSSQLEXPRESS , in Visual Studio 2010 made the setting change Options->Database Tools->Data Connections to the new instance...still didn't work.

    In the end I went into the registry and set the following HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\MSSQLEXPRESS\MSSQLServer\CurrentVersion and set Default key value to MSSQLEXPRESS

    It worked after that! 

    Friday, October 22, 2010 2:41 PM
  • Hi, 

     

    I am getting error when I am trying to open or add database file(created in sql server 2008 management studio (not express edition)) inside VS2010 solution Explorer.

     

    Error I get is : Connections to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local computer.  The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883

     

    OS : windows 7

     

    I had seen these two thread

    1) https://connect.microsoft.com/VisualStudio/feedback/details/554033/connections-to-sql-server-database-files-mdf-require-sql-server-2005-express-or-sql-server-2008-express-to-be-installed-and-running-on-the-local-computer#details

    and

    2)http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/f2ba8c13-f453-4886-9287-4c115cdd7305?prof=required.

     

    But from these thread I didn't get complete solution. It says to download SQL Express edition and use default instance name  from,

    <!--

    http://go.microsoft.com/fwlink/?LinkId=125883 and downloaded SQLEXPRWT_x86_ENU.exe

    (Previously I tried to go to this site but there was message that there is no such site (probably I made a mistake writing this url - by the way its a pity You can't copy the url from info window in Visual Studio). So I downloaded the SQL setup file from different site (file SQLManagementStudio_x86_ENU.exe). I installed instance named SQLEXPRESS. This didn't work.)

    I ran the file SQLEXPRWT_x86_ENU.exe and installed sqlexpress but this time I let the system install default instance (MSSQLEXPRESS).

     

    --!>

     

    But I want to use SQL server 2008 (no express edition) with Visual Studio 2010(ultimate) even with different instance name( other than SQLEXPRESS or MSSQLEXPRESS).

    So please tell me what should I do...

     

    Thanks in advance...

    Please do reply at borne_jones@yahoo.com

     
    Friday, March 18, 2011 1:37 PM
  • Depending on our conversation I may split your post out of this thread because you are getting a valid error because there is no database file in a server instance of SQL Server, which is the one you want to use.  In a server instance of SQL Server a database is at least two files MDF and LDF.  When you change a database file which is a User Instance by default to a server instance SQL Server generates a new LDF file to complete the database when attaching the MDF to the server instance.


    MCPD Web C#, MCTS TFS, MCITP BI and DBA
    Thursday, March 24, 2011 5:02 PM
    Moderator
  • This solution worked great!!! 

     I have 2008 R2 developer installed  with instances "MSSQLSERVER" and "SQLEXPRESS" but couldn't add a Database to my project because I kept getting the message about needing a SQLEXPRESS installed.

    So I tried creating a "MSSQLEXPRESS" instance - solved problem instantly.

    I simply did this "Then in Visual Studio / Tools/Options/Database Tools/Data Connections/ in SQL Server Instance  Name field I left it blank" - except instead of leaving the field blank, I added "MSSQLEXPRESS" in that field, and evertything is working.

    It's sad that someone has to spend hours looking for a solution and trying all kinds of silly installs and uninstalls - Shame on Microsoft for having such issues.

    Adam

    Sunday, December 09, 2012 7:06 AM
  • 9 hrs of searching and this post solved my problem. Thank you!
    Thursday, November 21, 2013 4:52 PM