Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access SQL Server remotely or through an IP, but can access it locally with either localhost or the computer name

There's a server I'm setting up right now, and I'm only able to access SQL Server 2012 locally on that machine; other machines can't access it. Furthermore I was having to specify either localhost or the computer's name when connecting - the machine's IP did't work. Just now, as I was writing this, I've gotten past the IP problem on the local machine, but remote access still needs to be enabled.

I've already tried:

  1. Going into server->Properties->Connections and checking "Allow remote connections to this server".

  2. Going into SQL Server Configuration Manager->SQL Server Network Configuration->Protocols for server and enabling everything.

  3. Going into SQL Server Configuration Manager->SQL Server Network Configuration->Protocols for server->TCP/IP->Properties->IP Addresses, setting all the TCP Dynamic Ports to be blank, and specifying a typical port number in all the TCP Port fields.

  4. Setting SQL Server Browser to Automatic and starting it up (this is what solved the IP issue on the local machine basically).

  5. Doing everything I'm personally able to to ensure a firewall isn't getting in the way. (I don't have any control over the real firewall, just Windows firewall, and there's some redtape involved in asking the network engineer to get involved.)

Etc.

What next? How do you resolve this problem?

EDIT

I've checked with engineering, and they say that there's still no firewall around the machine. I also used Telnet to experiment with port 1433, but the results were inconclusive, in relation to SQL Server.

like image 813
Panzercrisis Avatar asked Feb 02 '26 07:02

Panzercrisis


2 Answers

You definitely need the SQL Browser service running, that is what has caused the problem for me in the past.

I would try telnet to port 1433 from the remote computer and see if the port is blocked or not

like image 112
jazza1000 Avatar answered Feb 04 '26 19:02

jazza1000


Are you able to try from another computer on the same LAN (ie, not from outside of your router)? If that works, you may just need to modify your router settings to pass requests through to your machine on the ports it needs. This would be necessary if your local IP address is something like 192.168.1.100 (the kind given out by routers) but visiting http://checkip.amazonaws.com shows the IP of your router.

As for whether a firewall is in the way, the simplest way is to turn it off completely (temporarily) and see if anything changes.

like image 37
Always Learning Avatar answered Feb 04 '26 21:02

Always Learning



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!