question

PJL-9169 avatar image
0 Votes"
PJL-9169 asked learn2skills edited

Problem accessing SQL Managed Instance from on-prem network

I am trying to connect to an Azure SQL Server Managed Instance from my on-prem network which is connected to Azure via a Gateway VPN.

The gateway VPN terminates in VNET A and the SQL Server Managed Instance is in its own standalone VNET B.

Do I need to peer VNET A and B to be able to connect to the instance from my on-prem network and is there anything else I need to do?

azure-sql-databaseazure-sql-virtual-machines
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PJL-9169 Were you able to check the document provided below Please let us know if you have any questions.

0 Votes 0 ·

To follow-up, Please let us know if you have further query on this.
Please don’t forget to Accept the answer

0 Votes 0 ·

To follow-up, Please let us know if you have further query on this.
Please don’t forget to Accept the answer

0 Votes 0 ·

1 Answer

learn2skills avatar image
0 Votes"
learn2skills answered PaulLeonard-9590 commented

Hi @PJL-9169

If you have SQL managed instance on the VNET B and VPN Gateway installed in VNET A, you should peer VNET A and VNET B.

Connecting an application when it resides within a different virtual network from SQL Managed Instance is a bit more complex because SQL Managed Instance has private IP addresses in its own virtual network.

Whatever choice you make, you can connect it to Azure SQL Managed Instance.

85045-image.png

Another scenario implemented by customers is where a VPN gateway is installed in a separate virtual network and subscription from the one hosting SQL Managed Instance. The two virtual networks are then peered. The following sample architecture diagram shows how this can be implemented.

Virtual network peering



VPN gateway can see the IP addresses in the virtual network that hosts SQL Managed Instance. To do so, make the following very specific changes under the Peering settings.

  1. In the virtual network that hosts the VPN gateway, go to Peerings, go to the peered virtual network connection for SQL Managed Instance, and then click Allow Gateway Transit.

  2. In the virtual network that hosts SQL Managed Instance, go to Peerings, go to the peered virtual network connection for the VPN gateway, and then click Use remote gateways.

Refer-
https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/connect-application-instance


If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.



image.png (22.6 KiB)
image.png (269.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.