Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

Microsoft SQL Server 2005 and 2008 in one machine. A network-related or instance-specific error occurred problem. Fix?

Hi there;

I got the following problem as follows:

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)

The issue is that I have SQL Server 2005 and 2008. I believe that 2005 comes with my VS2010 whereas I installed 2008 as far as I remember.

So, the first question is that my connection string is as:
connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=mydb;Integrated Security=True"
            providerName="System.Data.SqlClient" />
and which MSSQL server instance is utilized for my case?

and how to fix the problem?

Kind regards.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazzIIIlove

ASKER

Good article but I still couldn't find out the problem.

Since my application uses a specific port with Remoting, I believe that I have to enable remote connections which I followed your link:

Is the SQL Server instance allowing remote connections?  Starting with SQL Server 2005, the default is to block remote connections. To configure, see: http://support.microsoft.com/kb/914277

The problem is that I created/use the instance I create in my C# program which is as:

connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=myDb;Integrated Security=True"
            providerName="System.Data.SqlClient" />

So, all in all, I couldn't find out the instance in surface area. How should I proceed?

Any tips?

I am under 7-64 bit.
SQLExpress is in running state.
TCP for SQLExpress is enabled as follows.

I also added the port to inbound/outbound exceptions of firewall.

and finally the screenshot for IP but I got the confusion, I think I messed up with the following screenshot. Any way to revert the following?

Regards.

Kind regards.
angel.png
>So, all in all, I couldn't find out the instance in surface area. How should I proceed?
what exactly do you see in the surface area, in regards to instance names?
Hi there;

Ok, funny thing is that I can see my instance which is SQLExpress (localhost\SQLExpress) in one of my computers, but cannot see that instance in this machine which is the object of this question.

How can we proceed?

Regards.
So, any update?

Kind regards.