.NET Daily


How to Change SQL Default Instance in Visual Studio 2010

Posted on .

How to Change SQL Default Instance in Visual Studio 2010


After I have installed SQL Server 2008 Developer edition, I wanted to add a local database file (.mdf), but I received an error which said that I need to install the SQL Server Express version back.
As I still had the Express version installed, I went to services and started the SQL Server Express process. This was not enough.
After many hours I have found the solution. I had to change the SQL default instance in Visual Studio.
Go to Tools -> Options -> Database Tools -> Data Connections -> change the SQL Server Instance Name to “SQLEXPRESS“.

Select SQL Default Instance

Select SQL Default Instance

Note: In order to work, you also have to start the service from Control Panel.

UPDATE: The error that I’ve received when I tried to add the SQL Local Database File(.mdf) is the following:
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:…



Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

  • user

    AUTHOR Krishna

    Posted on 3:33 pm April 19, 2012.

    Thanks Dear,
    can u tell me about that if we keep SQL Server instance name blank then,what happened.
    would there any setting changes require for connecting to SQL Server.

  • This site uses Akismet to reduce spam. Learn how your comment data is processed.

    View Comments (0) ...