Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to connect to my MSSQL server 2008 web instance and im failing horribly... i get the error 26 and before you jump on me i have done these

  • Check the spelling of the SQL Server instance name that is specified in the connection string.
  • Use the SQL Server Surface Area Configuration tool to enable SQL Server to accept remote connections over the TCP or named pipes protocols. For more information about the SQL Server Surface Area Configuration Tool, see Surface Area Configuration for Services and Connections.
  • Make sure that you have configured the firewall on the server instance of SQL Server to open ports for SQL Server and the SQL Server Browser port (UDP 1434).
  • Make sure that the SQL Server Browser service is started on the server.

in addition to theese i have disabled the firewall completely and tried other ports nothing works the same credentials work on the server but not on the client.

this is the exact error message

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) (.Net SqlClient Data Provider)

Can anybody help?

share|improve this question
    
Stupid questions, but, for clarification. Is this SQL server on a domain as a member server, is it a domain controller, or is it a stand alone server not on a domain? and is the workstation you are trying to connect with on a domain. –  Tom Mar 17 '10 at 21:31
    
its a standalon windows server 2008 r2 –  Sevki Mar 17 '10 at 21:33
    
Because it is a standalone box and not on a domain, can you ping the server by name, if not, set up a reference to it in the workstations host file, if you do have a dns server, add an entry for the SQL server in it, and then the a ipconfig /flushdns on the workstation and give it a try. HTH –  Tom Mar 17 '10 at 21:49
    
I haven't been trying with fqdn i tried with the ip like so {ip adress}\{instance name} does that matter.. thanks for the help –  Sevki Mar 18 '10 at 13:48
    
First and foremost, connecting via IP address is usually slow to begin with, if it even works, yes, try the fqdn, but, dont forget the hosts file or DNS entry. HTH –  Tom Mar 18 '10 at 17:11
show 1 more comment

3 Answers 3

up vote 1 down vote accepted

Hi guys and thanks for all the answers...I have lost so much sleep over this... unfortunately none of the answers worked because surprise surprise hosting companies firewall policies... anyways what worked for me if anyone is interested is I setup a VPN and now i tunnel into my server which seems to be the most secure way as well... and again thanks so much for all the help..

share|improve this answer
1  
Hi Sevki. You might want to give this answer your checkmark so that it disappears from the un-answered question queue :) –  Mark Henderson Dec 1 '13 at 22:48
add comment

Firstly I'd try to connect to port 1433 on the remote hostname via telnet. If that works, try logging in remotely using the username and password. If that doesn't work, try telnetting to the server port locally on the internal IP address and on the loopback address (localhost or 127.0.0.1). If still no luck, SQL isn't running or is running on a non-standard port.

If you can connect locally but not remotely, try to PING the hostname. If it says "unable to resolve host" you've either not setup the DNS correctly, or you don't have internet access (which I'm guessing you do given where the question is posted) - you can verify which of these it is by trying to PING the IP address; if it works then it's a DNS issue.

If the hostname PINGs correctly, check it resolves to the correct IP address. If all of this is correct, then it's a firewall issue.

share|improve this answer
    
The host does not respond to pings and i have checked the sql server configuration manager and that it runs on 1433. I tried to telnet into it but that doesnt work on both local and remote clients. I will look into the ping thing with the firewall closed and open.. thanks alot –  Sevki Mar 18 '10 at 13:47
add comment

At the end of the day, each instance is listening on a specific port. Find out what port your instance is listening on and try connecting to the port instead of the instance name. This will give you some insight on where the problem really lies.

share|improve this answer
    
Its 1433. I will look into that thanks.. –  Sevki Mar 18 '10 at 13:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.