?
Solved

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

Posted on 2011-10-05
5
Medium Priority
?
268 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:jazzIIIlove
  • 3
  • 2
5 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 36915395
I think you should read this article to know how to identify instances on your computer, and to troubleshoot the connectivity;:
http://www.experts-exchange.com/A_1881.html
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36915758
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
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 36930387
>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?
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36941820
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.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 37045240
So, any update?

Kind regards.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question