What permissions are required to scale a database?

Edgar Walther (ITsmart) 46 Reputation points
2022-04-26T13:05:59.21+00:00

Hi all,

I try to find what permissions are required to scale a database. But I cannot find that anywhere.

In my particular case, I run a powershell command from azure data factory and that fails, with the following error:

Failure type: User configuration issue
Details: Operation on target Get current database properties failed: {"error":{"code":"AuthorizationFailed","message": "The client 'xxxx-xxxx-xxxx' with object id 'xxxx-xxxx-xxxx' does not have authorization to perform action 'Microsoft.Sql/servers/databases/read' over scope '/subscriptions/xxxx-xxxx-xxxx/resourceGroups/XXXX/providers/Microsoft.Sql/servers/xxxx.database.windows.net/databases/DBNAME' or the scope is invalid. If access was recently granted, please refresh your credentials."}}

My ADF currently has the role 'SQL Server Contributor' on the azure sql server. But it looks like that is not enough?

Can anyone help me out here?

Many thanks,
Edgar Walther

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,630 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Edgar Walther (ITsmart) 46 Reputation points
    2022-05-11T12:26:26.6+00:00

    The issue on our end is solved. The subscription guid appeared to be wrong in the url.

    1 person found this answer helpful.
    0 comments No comments

  2. Alberto Morillo 32,896 Reputation points MVP
    2022-04-26T13:23:17.207+00:00

    You need to add the Contributor role as you already did. Here you will find another way of doing the same using a Web Activity.

    Another way to try the same is using a pipeline as explained here.


  3. Edgar Walther (ITsmart) 46 Reputation points
    2022-05-11T12:23:02.277+00:00

    This is the relevant part of the json definition of the ADF pipeline:

    {
                                "name": "Scale up database to requested service objective",
                                "type": "WebActivity",
                                "dependsOn": [],
                                "policy": {
                                    "timeout": "0.02:00:00",
                                    "retry": 1,
                                    "retryIntervalInSeconds": 30,
                                    "secureOutput": false
                                },
                                "userProperties": [],
                                "typeProperties": {
                                    "url": "https://management.azure.com/subscriptions/<subscription guid>/resourceGroups/<rg name>/providers/Microsoft.Sql/servers/<sqlserver name>/databases/<database name>?api-version=2021-02-01-preview",
                                    "method": "PUT",
                                    "headers": {
                                        "Content-Type": "application/json"
                                    },
                                    "body": {
                                        "sku": {
                                            "name": "GP_S_Gen5_20"
                                        },
                                        "location": "UK South"
                                    },
                                    "authentication": {
                                        "type": "MSI",
                                        "resource": "https://management.azure.com"
                                    }
                                }
                            }
    
    0 comments No comments