0
votes

We have setup where our applications are hosted in Azure Virtual Machine, and our Databases are hosted in SQL Managed instance. Both are in same region, same subscriptions, but different Vnet as is the requirement of SQL Managed Instance.

We have whitelisted the IPs, open the port on NSG of both VM and SQL Instance.

We are able to open SQL in SSMS, in the local machine as well as in the VM itself. But for some reason same server does not work when added in the connection string.

We have tried with both 1433 and 3342 ports. We have tried proxy vs redirect We have tried VNET Peering as well, But nothing seems to work, we always get below 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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)'

Our applications are based on .Net.

We are moving our servers from on-premise to Azure.

Any help will be appreicated.

Thank you.