Arun Sirpal shows how to use Azure Automation to rebuild indexes on an Azure SQL Database database:
The answer is via Azure Automation.
At a high level this is what I did.
-
Create an Automation Account.
-
Create a credential.
-
Create a PowerShell Runbook which has the code for index rebuilds.
-
Create a schedule and link it to the above.
-
Configure parameters within the schedule (if any).
-
Configure logging level (if desired).
Click through for the detailed steps.