Opening up SQL Server instances hosted on Azure VM’s is just one of those manual, repetitive and error-prone tasks. Given that I’m spinning up new VM’s in a daily basis, I’ve decided to automate the process using PowerShell and SQL Server Management Objects (SMO). This makes setting up SQL Remote Access on Azure a simple task.
SQL Remote Access on Azure Vm’s
What will be covered within this blog post:
- Discovering all SQL Server instances using the SQL browser service and therefore must be installed.
- Enabling remote access on all instances found in step one
- Add new entries within the Windows Server Firewall
- Add new AzureEndpoints entries in Windows Azure Firewall
Note: I’m assuming you haven’t altered the default protocol configuration and if so, just make sure to incorporate your standards within the script. Additional SQL ports might need to be enables depending on security and feature usage. For details; http://support.microsoft.com/kb/968872