Hello. I have set up a new Azure SQL Managed Instance and imported copies of my databases. I have an Azure VM in the same VNET (but different subnet) that will ultimately connect to these databases to run an application. This VM is running Windows Server 2022.
I also have an Azure VPN gateway configured on this VNET and can connect with my laptop via Point to Site VPN.
I can connect to the SQL Managed Instance over the P2S VPN from my laptop using SSMS without any problems.
However, I cannot seem to connect to the SQL Managed Instance from the Azure VM.
I have checked all the usual things, including the following:
- Windows firewall on the VM
- Azure Network Security Groups on both the SQL subnet and the VM subnet
Interestingly enough, I ran an nmap scan from the VM to the entire SQL MI subnet. The nmap scan reveals that I can connect to some of the IP addresses within the SQL MI subnet, but not the primary SQL IP address, i.e. the IP address that the SQL MI host name (xxx.database.windows.net) resolves to.
I've tried rebooting the VM a number of times. I even tried moving the entire SQL MI to a new subnet to see if that would help - no change, same problem.
I've tried running packet captures and various Azure networking troubleshooting tools - nothing is helping and I'm out of ideas.
Does anyone have any thoughts? Am I missing something obvious?
Thanks in advance!