Azure Web App accessing the Sql Server running in Azure VM(IaaS) Solution

Amar-Azure-Practice 661 Reputation points
2020-09-11T06:22:51.53+00:00

Hi

I have Azure Web App running in EAST us region and associated with the Virtual network.

1) I have Sql Server Database running on my On premise Environment,I need to access On premise SqlServer database from Azure Web App.

2) I have another Sql Server database running in Azure VM in the same VNet where my web App is running.

Please let me know how can i access these 2 databases in Azure Web App.

Thanks
-Amar

SQL Server on Azure Virtual Machines
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,123 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 23,391 Reputation points Microsoft Employee
    2020-09-11T19:30:13.067+00:00

    Thanks for the good question.

    You could leverage App Service Hybrid Connections -Which enables your apps to make outbound calls to specified TCP endpoints. The endpoint can be on-premises (database), in a VNet or anywhere that allows outbound traffic to Azure on port 443. The feature requires the installation of a relay agent called the Hybrid Connection Manager (HCM) on a Windows Server 2012 or newer host. Each Hybrid Connection correlates to a single TCP host and port combination.
    App Service Hybrid connection - how it works

    For the 2nd case, As I understand you have both VM and App Service on the same VNet already. The new VNet Integration feature enables you to place the backend of your app in a subnet in a Resource Manager VNet in the same region.