We have an application that uses Azure SQL for the database backend. Under normal load/conditions this database can successfully run on a Premium 1 plan. However, during the early morning hours we have jobs that run that increase database load. During these few hours we need to move to a Premium 3 plan. The cost of a Premium 3 is about 8 times more, so obviously we do not want to pay the costs of running on this plan 24/7.
Is it possible to autoscale the database up and down? Cloud services offer an easy way to scale the number of instances in the Azure Portal, however, nothing like this exists for Azure SQL databases. Can this be done programmatically with the Azure SDK? I have been unable to locate any documentation on this subject.
Another way to do it is using Azure automation and using run book below:
Ref:
Azure Vertically Scale Runbook
Setting schedule when u want to scale up/down.
For me, I used 2 schedules with input parameters, 1 for scaling up and another one for scaling down.
Hope that help.
Yes, that feature has is available: Azure SQL Database Elastic Scale
https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-elastic-scale-introduction
In some cases the easiest option might be to just run SQL query as described in msdn.
For example:
After digging through the articles in @ErikEJ's answer (Thanks!) I was able to find the following, which appears to be newly published with the release of the Elastic Scale preview:
Changing Database Service Tiers and Performance Levels
The following REST APIs are now newly available as well, which let you do pretty much whatever you want to your databases:
REST API Operations for Azure SQL Databases
And for my original question of scaling service tiers (ex. P1 -> P3 -> P1):
Update Database REST API
With these new developments I am going to assume it's only a matter of time before autoscaling is also available as a simple configuration in the Azure Portal, much like cloud services.