Solved

SQL Server Error

Posted on 2011-02-18
6
215 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now