DB maintenance plan configuration for Azure SQL DB from Azure Portal

Rajendra Goud-Mala 51 Reputation points
2022-12-15T16:43:14.12+00:00

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.

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. JimmySalian-2011 42,481 Reputation points
    2022-12-15T17:32:58.167+00:00

    Hi,

    It seems you have restrictive access to the tenant to write the RG , you might have to elevate the access to update the Resource Groups.

    elevate-access-global-admin

    Check the RBAC properties of that user and go through this page to understand the roles that can be assigned at the tenant or scope level.overview

    Hope this helps.
    JS

    ==
    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.