Once we have our RDS deployment, we would like to setup SQL Database autoscaling for our Connection Broker, so we can deliver more power during logon storms and then scale down after those peaks. This tutorial allows you to setup automatic SQL Database scale up/down by using Azure Automation. While this is showing how to automate depending on the user workload, you can setup an schedule on the workbook to scale up the SQL Database before the storm occurs.
-
In this GitHub, go to VirtualLabs > Deploy > Architecture-HA > Scripts and download Set-AzureSQLDatabaseEdition.ps1
-
Import this file into Azure.
- If you don’t have an Azure Automation Account you can follow this steps to create one: Azure Automation
- Click your-RDS-Automation-Account > Runbooks > Add Runbook
- Click Import an existing runbook
- It is mandatory to select the Runbook type, we are using “PowerShell Workflow”.
-
Automation Account allow us to add credential asset. Let’s add a SQL server credential that we will use in our script.
-
Let’s test our script
-
We may associate a webhook to the Runbook to automate scale up/down:
-
SQL database DTU percentage alerts might be configured to scale up/down: