Monday, February 16, 2009

SQL 2005 - Error: 26 - Error Locating Server/Instance Specified)

One of my colleague added a database project for deploying the database before unit test is run. Whenever I tried to open the solution I got the error as below

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

To resolve the problem perform the following

Change the VSTS Options; From Tools -> Options -> Data base Tools -> Design Time - Validation Data base -> Connection Options -> SQL Serevr Instance Name = Blank.


2 comments:

Linglom said...

Hi,
The error message may caused from the SQL Server doesn't allow remote connection (in case the SQL Server is on remote PC). So you have to configure the SQL Server to enable remote connection. I wrote one about this, visit Enable remote connection to SQL Server 2005 Express.

Bhavik Patel said...

Hi Linglom,

Thanks for the comment.

I did check before this to make sure that Remote connection is enabled. For Remote connection the error will be Error 28 but I got Error 26.