I have created two virtual machines - a Windows 2012 Server (front end server to run IIS) and a separate server running SQL Server.

I am attempting to connect from the Windows 2012 Server to the server running SQL Server. I have entered the private IP address of the SQL server but my application says it cannot connect to the sql server.

In the simplest way possible (as this is just for test purposes at this stage) what do I have to do in order to make the front end server see the backend server?

I have tried turning off the firewall on the SQL server but this hasn't helped.

  • * Can you connect with NOT sql? I.e. is the network operatble (ping, access to drive can tell you that) and * Did you configure the firewall? It is closed by default and SQL installer does NOT change that.
    – TomTom
    Feb 28 '16 at 19:03
  • @TomTom - ping fails on the private ip address. The firewall is turned off. Additional info - in the Azure portal settings of both machines are in the same Resouce Group, but show as being in a different "Virtual network/subnet" - I didn't specify this at time of provisioning though and not sure if I understand the difference between "Resource group" and "Virtual network/subnet". I'm guessing it could well be the case that they need to be in the same "Virtual network/subnet" - will see if I can figure out how to change this.
    – P2l
    Feb 29 '16 at 8:34
  • So your real problem is you ahve no network. Nice. UNless you can connect to he port of the sql server with telnet, this is not a sql server problem but a "my network does not work" issue.
    – TomTom
    Feb 29 '16 at 8:47

By default, SQL Server has no network protocols enabled that would allow you to connect to it from a remote host.

You need to enable those network protocols in SQL Server Configuration Manager.

  • I have checked this and TCP was enabled by default within SQL Server Configuration Manager
    – P2l
    Feb 29 '16 at 8:35

Based on your comment above, it seems the machines or on different virtual networks, which will prevent them from communicating.

To answer your question in that comment, a resource group is just a container that allows you to group resources for a specific purpose together. It does not grant any communication between the resources, it is just a container. Resource groups have the benefit that you can see what resources you have in that group, and you can easily delete the group, which deletes all resources in it.

A virtual network will sit inside a resource group, and it's this that will join your Virtual Machines and allow them to communicate with each other. You will need to make sure that your VM's are on the same Virtual network.

Azure will also likely have created a network security group for each virtual machine. This is effectively a firewall, and can be configured either at machine level or subnet level. By default they get created at machine level, but have a set of default rules that allow communication between machines on the same Virtual Network, so it should just work in your case (once the machines are on the same network). However if you want to allow outside access to either machine you will need to amend these.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .