1
votes

I cannot get my Azure VM with SQL Server to connect from anything other than the local machine. This is a Windows VM where I downloaded and installed SQL Server manually. I am at a loss.

If I RDP to the machine and connect to SQL Server it succeeds. If I attempt to hit it from any other box on my Virtual Network it will not connect. I can ping the box and the name resolves to the proper IP address. Test-NetConnection shows that I cannot connect on port 1433, but I can connect on other ports like 3389.

Here is all I've tried/confirmed thus far.

TCP/IP is enabled in configuration manager and set to listen on port 1433. Remote access is enabled in configurations.

I added a port 1433 Windows firewall rule for all 3 profiles.

I turned off the Windows firewall for all 3 profiles.

Confirmed both machines are definitely on the same virtual network.

The default NSG rule is in place for any port/protocol on the same Virtual Network.

I added an explicit NSG rule for the source IP of another machine to any port/protocol.

I modified the rule that allowed me to RDP to the box from my personal IP to include 1433 in addition to 3389. Test-NetConnection succeeds on 3389 and fails on 1433.

None of these made a difference.

I created a new VM where the machine came pre-installed with SQL Server. It connects just fine from any other machine on the VirtualNetwork without making any changes to any firewall or NSG rules.

What am I missing?

2
What version of SQL Server did you install on that box? - DavidG
SQL Server 2017 Standard - Eric Blinn
Is it set up to listen to external connections? - DavidG
Yes. TCP/IP is on. Remote Access is on. Is there something else to check? - Eric Blinn

2 Answers

0
votes

Sound like your MSSQL is setup with a dynamic port in the tcp/ip protocol. Check the TCP/IP protocol and if the port is blank, set it to the desired port (1433) and set NSG to allow communication on this port.