The basic requirements for enabling remote access to SQL Server are pretty straightforward:
1. Ensure that “Allow Remote Connections” is enabled in SQL Server Management Studio.
2. Open your firewall to allow communication (by default TCP port 1433).
To get access to your SQL Server running on a Windows Azure Virtual Machine (VM), you need to take some additional steps—just as you would using an Amazon Web Services virtual machine. The same is true for opening HTTP access (e.g., over port 80), or any other port for that matter.
- First login to the new Azure Management Portal (currently in “Preview).
2. Click on the Virtual Machine you want to configure and then click “Endpoints.”
3. By default, SQL Server will use TCP port 1433, so add an endpoint with any name (using the allowed characters and character limit).
(I haven’t read up on it yet, but I’m assuming the public port is what you’ll be using from the outside and the private port is the one that will actually be forwarded to the VM. To keep it simple, I left them the same in my test.)
That’s it, you’re done! Now you can connect from a client machine to your remote SQL Server machine.