Hi Team,
I am looking for automate the rebuild index and update statistics DB maintenance plan for Azure SQL DB from Azure Portal which is DB is around 2 TB.
Please suggest that what are possibilities to automate.
I am trying to automate the maintenance by using the following steps.
Create Azure automation account
Import SQLServer module
Add Credentials to access SQL DB
Add a runbook to run the maintenance
Schedule task
I am getting the below error while Creating Azure automation account
Deployment validation failed.
Deployment failed with multiple errors: 'Authorization failed for template resource 'SQLAutomationAct' of type 'Microsoft.Automation/automationAccounts'. The client 'RGoud' with object id '18888-11aa-6789x-b8dd-db81123412' does not have permission to perform action 'Microsoft.Automation/automationAccounts/write' at scope '/subscriptions/dadg5467-8b30-63b9-83ca-3464e3521q64/resourceGroups/DefaultResourceGroup-EUS/providers/Microsoft.Automation/automationAccounts/SQLAutomationAct'.:Authorization failed for template resource
Please suggest what kind of permissions require in Azure Portal to setup the automation.