Blog Post

Visual Studio Team System - Database Professionals: Database Connection Error

,

If you're like me, you don't have SQL Server 2005 sitting on the

default instance because SQL Server 2000 is sitting on the default

instance. I actually have several instances installed, one of which is

a SQL Server Express instance. I finally got around to downloading and

installing Visual Studio Team System - Database Professionals this

weekend. When I first tried to open up a new database project, I

received the following error:

An error has occurred while establishing a connection to the server.

When connecting to SQL Server 2005, this failure may be caused by the

fact that under the default settings SQL Server does not allow remote

connections. (provider: SQL Network Interfaces, error: 26 - Error

locating Server/Instance Specified).

I quickly go up to Tools >> Options >> Database Tools

>> Data Connections and set the SQL Server Express instance name.

I then immediately tried to create a new SQL Server 2005 database

project and received the same error. Thinking the computer name might

need to be specified, I include it in the normal computer\instance

format. Again, the same error. At this point, I decided not to waste

any more time and search online. There I came across the following

thread on the MSDN forums:

CTP4 Problem

Here's what needs to be done if you don't have SQL Express or a SQL

Server 2005 instance as the default instance (it must be SQL Server

2005):

  1. Go to Tools >> Options >> Database Tools >> Data Connections
  2. Set the instance name to whichever instance you want it to use.

    Do note, this is just the instance name itself, not the full

    computer\instance. So if you're running an instance called

    SQL2K5Express on MyDevSystem, you just want SQL2K5Express. You do not

    want MyDevSystem\SQL2K5Express.

  3. Exit out of Visual Studio 2005 completely and come back in.

This last step is key. Leave it out and it won't notice your new

setting for data connection. That was what was getting me before I did

the search.

Technorati Tags: |

|

|

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating