When moving your SQL Servers from on-premises to Azure cloud, minimal efforts are required to do the move. However, there are some subtle differences that you need to pay attention. One thing you need to plan is the networking piece. Azure Virtual Networks (VNET) serves as a level of isolation that secures your resources and also can be a bridge to your on-premises resources. We have seen repeated mistakes by SQL Server users where they took all the effort creating SQL Server VMs and client VMs (like IIS) but they ended up not able to talk to each other. They created the VMs in different VNETs. VMs in different VNET can’t communicate with each other unless you create VPN using Dynamic gateway. They will receive the following error.
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and i SQL Server is configured to allow remote connections. For more information see SQL Server Books Online
It’s very easy to make such mistake. In Azure Resource Manager deployment mode, the new portal defaults to create a new VNET for new VM creation. Here are a couple of ways to solve the problem.
Option 1: create Site-to-Site (VNET to VNET) VPN connection using gateway.