Solved

SQL Server Error

Posted on 2011-02-18
6
217 Views
Last Modified: 2012-05-11
"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 got a call from our Customer Service department saying a customer was having problems accessing a part of our website (they got the error message above). The CSR also got the error message. I, however, do not receive this message and everythign works fine.

How could some people see this error, and I cannot (another person in a cube next to me doesn't get the error either)?
0
Comment
Question by:infotechelg
  • 4
6 Comments
 
LVL 4

Expert Comment

by:rocky_lotus_newbie
ID: 34928935
The error indicates connectivity issues, Please check if the SQL Server service is running and if you are able to connect to the SQL Server locally. Also, check if the connection string is pointitng to the right server name and db name.

Below link has more details on how to troubleshoot the connectivity problems:
http://blogs.msdn.com/b/sql_protocols/archive/2005/12/22/506607.aspx

Thanks,
0
 
LVL 9

Assisted Solution

by:gdupadhyay
gdupadhyay earned 200 total points
ID: 34929702
There is no specific reason for this error. Some time due to firewall or not able to find server
instance. Please read the following posting, might be help you.

What is the OS on server?

http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

http://social.msdn.microsoft.com/forums/en-US/sqlgetstarted/thread/9354bf59-15a2-49f4-bc1f-f45371e054fc/

check the configuration for remote connection:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
0
 

Author Comment

by:infotechelg
ID: 34929975
On the database server or the Web server? Both are Windows Server 2003.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Accepted Solution

by:
infotechelg earned 0 total points
ID: 34930064
gdupadhyay,

One of the first things your first link says is "First of all, you get this error message only if you are trying to connect to a SQL Server named instance. For default instance, you never see this." This applies to my database server: there is no instance name.

The database and web server are on the same network. The database server is behind the firewall, but it allows the web server to access it. None of the other database driven pages on the Website are giving me problems, just this page.

And, like I said before, it works fine on my computer and on other's, but that error message appears for other people. I just don't see how that's possible. If there's a connectivity problem, it should be a problem for everyone, right?
0
 

Author Comment

by:infotechelg
ID: 34930110
Holy crap...I think I just figured out the issue.

I my ServerConfig.config file that the code accesses to obtain query strings, there are query strings in there for production, staging, and development.

The correct query string is pulled depending on my domain name. So if i'm running the website as http://localhost:1223, it will pull the dev connection string. If the site is being ran as http://mysite/ it will pull the staging connection string. If it's being ran as www.mysite.com, it will pull the production connection string.

The ServerConfig.config file is not accounting if someone does mysite.com (without the www.)! So, it's defaulting to the development connection string, whish DOES have a named instance.

I bet if I add to my .config file, mysite.com, the problem would go away.

Sorry to waste everyone's time on this, but i'm 99% sure this is the problem.
0
 

Author Closing Comment

by:infotechelg
ID: 34959270
So, the solution by gdupadhyay wasn't the correct solution to my problem, but his link guided me to the internal issue.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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