Why “SQL Server Configuration” section on my Azure Virtual Machine is not available?

If you created an SQL Server VM via azure portal, there will be a section called “SQL Server Configuration” which was introduced via blog “Introducing a simplified configuration experience for SQL Server in Azure Virtual Machines”. Here is a screenshot of that setting.  It allows you to configure various things like auto backup, patching or storage etc.

 

image

 

I got a customer who created a SQL VM via powershell.  But that VM doesn’t have the section “SQL Server Configuration”.   Using his powershell script, I was able to reproduce the behavior.  When I created via portal UI, I got the “SQL Server Configuration”.

With help from my colleague Keith Elmore, we were able to figure out what was going on.  When you create a SQL VM via portal, the template has a section for SQL Server configuration.  In fact, auto patching is enabled by default via the portal.   But the powershell script used didn’t have any of those settings enabled.  So how do you the SQL Server Configuration setting ‘appear’?

Solution

You can use an Azure template called “Existing SQL Server Auto Patching setup” to enable auto patching.  After enabling auto patching, the “SQL Server Configuration” section becomes available.  The template even allows you to automate it by running Powershell command (New-AzureRmResourceGroupDeployment).   You can make changes to other settings.  Note that even you disable auto patching later, the “SQL Server Configuration” section will stay. 

Jack Li |Senior Escalation Engineer | Microsoft SQL Server

twitter| pssdiag |Sql Nexus