MS SQL Server is accessible locally but not over the internet

sql-server-2008-r2

When I try to access a named instance of Microsoft SQL server 2008 R2 SP2 on the local network, I have no problem. But when access it outside office from the internet, I can not connect to the database server.

It send back the "famous" following error:

A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. Verify 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)

This error happen in the winforms application and through the SQL Server Management studio.

The server instance name is correct since I can use it on the same local network. I precised that the server is a domain name such as "sql2008.domainname.com\sqldbname".
I also make sure to configure SQL Server to allow remote connections from the SSMS > Server Properties > Connections > Remote connections.

More precisions: SQL Browser is up and running. TCP/IP enabled. No problem when installing the database server.

I did a lot of research the last few days and tried everything… I do not have any more ideas.

The system administrator responsible for this server assure me that the ports 1433 and 1434 are open on the database server. I can ping the server from home and when i use putty the command telnet host port I got no error. The command is waiting for me to type something.

Do you have any other ideas that may cause this problem? Port forwarding, etc?

Thank you,
LB

Best Answer

We had some weird network issues after applying SQL 2008 R2 SP2.

There is already a Cumulative Update 1 for it that includes 35 hotfixes.

Cumulative update package 1 for SQL Server 2008 R2 Service Pack 2
http://support.microsoft.com/kb/2720425

You may want perform a packet capture as the amount of data to reproduce the issue is quite low and the issue is easily reproducible. The SQL parsers for NetMon are actually quite good.