Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,
This might be a common problem to MS SQL Server users but my problem is a bit different from many of the similar problem explained on many forums.
I have SQL server database located on remote server, whenever I tried to access the database by using LAN(other computer on the same network with server) I'm able to connect but when I try to use other network such as modem I got the following error:
"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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)"
I have try to allow port 1433 on firewall exception then turn off firewall but the problem continues.
When I try to telnet the port 1433 by using LAN network it seems to success but when I'm using modem network it refuse connection.
I used online tools to telnet port 1433 but the status showed that it is closed. I checked with my network administrator they said they allow port 1433 through central firewall so the problem might be on my server.
My assumption is that network infrastructure prohibit 1433 port but if the problem is on my server, what is it? as I'm able to access through the LAN.
Any help will be appreciated.
Posted
Comments
RedDk 6-Jul-13 13:05pm    
Show the connection string here in the Q&A. Often here, the connection string is not properly formattted or contains spurious characters ...
Andrew Augustino 8-Jul-13 9:34am    
Here the connection string I'm using
remoteConnection="Data Source=41.456.23.24; Initial Catalog=TestDB; User ID=MyUser; pwd=MyPassword"
The values I'm showing here are not real but the real IP address is public. When I said I can access through LAN I mean I can access by other computers which are using internet from the ISP where my server resides.
Thanks again
RedDk 8-Jul-13 16:13pm    
Ok. And yes, using ssmse will be an advantage. Especially when sleuthing this particular error ... first instinct is to forget about the network for now and just make sure the instance is running. In computer managment console under S&A/services make sure the SQL Server is "Started". Now fire up ssmse and connect through that interface to the one that's started.

The error is "... instance specific" so the next step is try Configuration Manager ... try setting all "protocol" to "enabled".

If the instance is running and you've no problem accessing it through ssmse, next best bet is to check the antivirus settings. Find that running instance among the ALLOWED connections. Failing this, the final spot to check is Server Manager ... or whatever the "rules" interface is called on the version of Windows. Firewall might be managed by antivirus but it still might be possible to add a "role" somewhere in this Windows security mashup.

1 solution

If u can use it in LAN, How come you can use it with Public IP. find the public IP and connect it in Connection string.

Or you can take the server with Public IP (in WAN) and you can use the SSMS to access the DB.
 
Share this answer
 
Comments
Andrew Augustino 8-Jul-13 9:57am    
When I said I can access through LAN I mean I can access by other computers which are using internet from the ISP where my server resides. The IP address I'm using is public one and also I'm using SSMS to access the DB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900