0

Introduction

I'm trying to deploy an ARM template through Azure Pipelines in which a Synapse Workspace is deployed and a Synapse Serverless Database is created thereafter. Please note, this is not a Dedicated SQL Pool, it is a Synapse Serverless Database.

The 'clicky' way to do this is:

Add SQL Database

Choose Serverless and Add


Existing Template

I have an ARM template that is successfully creating my Synapse Workspace:

    {
        "type": "Microsoft.Synapse/workspaces",
        "apiVersion": "2021-06-01",
        "name": "[variables('synapseName')]",
        "location": "[parameters('location')]",
        "tags": "[parameters('tags')]",
        "identity": {
            "type": "SystemAssigned"
        },
        "properties": {
            "defaultDataLakeStorage": {
                "resourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageName'))]",
                "createManagedPrivateEndpoint": true,
                "accountUrl": "[concat('https://', variables('storageName'),'.dfs.core.windows.net')]",
                "filesystem": "[concat('lake', parameters('project'))]"
            },
            "encryption": {},
            "managedResourceGroupName": "[variables('synapseManager')]",
            "managedVirtualNetwork": "default",
            "sqlAdministratorLogin": "[variables('adminusername')]",
            "sqlAdministratorLoginPassword": "[parameters('sec_syn')]",
            "privateEndpointConnections": [],
            "publicNetworkAccess": "Enabled",
            "managedVirtualNetworkSettings": {
                "preventDataExfiltration": false,
                "allowedAadTenantIdsForLinking": []
            },
            "cspWorkspaceAdminProperties": {
                "initialWorkspaceAdminObjectId": "[parameters('cliid')]"
            },
            "trustedServiceBypassEnabled": true,
            "azureADOnlyAuthentication": false
        },
        "resources": [
            {
                "condition": true,
                "type": "firewallRules",
                "apiVersion": "2021-06-01",
                "name": "AllowAllConnections",
                "properties": {
                    "startIpAddress": "0.0.0.0",
                    "endIpAddress": "255.255.255.255"
                },
                "dependsOn": [
                    "[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
                ]
            },
            {
                "condition": true,
                "type": "firewallRules",
                "apiVersion": "2021-06-01",
                "name": "AllowAllWindowsAzureIps",
                "properties": {
                    "startIpAddress": "0.0.0.0",
                    "endIpAddress": "0.0.0.0"
                },
                "dependsOn": [
                    "[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
                ]
            },
            {
                "condition": true,
                "type": "integrationRuntimes",
                "apiVersion": "2021-06-01",
                "name": "AutoResolveIntegrationRuntime",
                "properties": {
                    "type": "Managed",
                    "typeProperties": {
                        "computeProperties": {
                            "location": "AutoResolve"
                        }
                    }
                },
                "dependsOn": [
                    "[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
                ]
            }
        ],
        "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', variables('storageName'), 'default', concat('lake', parameters('project')))]"
        ]
    }

Options to Create Synapse Serverless SQL Database

However, there appear to be two documented options for creating a database. I have tried both shown below:

  • sqlDatabase

    {
        "type": "sqlDatabases",
        "apiVersion": "2020-04-01-preview",
        "name": "laketestdb",
        "location": "[parameters('location')]",
        "properties": {
            "collation": "Latin1_General_100_BIN2_UTF8"
        },
        "dependsOn": [
            "[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
        ]
    }
    

This approach is nested within the Synapse resource template, but I have also run it externally in a follow-up pipeline task; the same error occurs and it fails during deployment:

Pipeline Error

  • sqlPool

    {
        "type": "Microsoft.Synapse/workspaces/sqlPools",
        "apiVersion": "2021-06-01",
        "name": "string",
        "location": "string",
        "tags": {
            "tagName1": "tagValue1",
            "tagName2": "tagValue2"
        },
        "sku": {
            "capacity": "int",
            "name": "string",
            "tier": "string"
        },
        "properties": {
            "collation": "string",
            "createMode": "string",
            "maxSizeBytes": "int",
            "provisioningState": "string",
            "recoverableDatabaseId": "string",
            "restorePointInTime": "string",
            "sourceDatabaseDeletionDate": "string",
            "sourceDatabaseId": "string",
            "storageAccountType": "string"
            }
     }
    

With this approach, I simply don't know if there's a service tier or sku that will create a serverless database. All examples online (of which there are few) seem to show typical data warehouse provisioning ("DW2000c", for example). I haven't been able to get it working with guesswork.


Azure Shell Attempt

I also notice that when I use the Azure Shell command:

New-AzSynapseSqlDatabase -ResourceGroupName rg_admin -WorkspaceName synjmi -Name testazpssqldb

I get the same error as I get during the deployment, namely:

New-AzSynapseSqlDatabase: Operation returned an invalid status code 'BadRequest' Specified edition or service level objective is not supported

New-AzSynapseSqlDatabase: Operation returned an invalid status code 'BadRequest' Specified edition or service level objective is not supported

I have absolutely no idea what's going wrong and can't seem to find much in the way of supporting documentation or troubleshooting materials online.

Any help is much appreciated.

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
JMoss84
  • 96
  • 7

1 Answers1

0

When I try using New-AzSynapseSqlDatabase command to create serverless SQL pool in synapse workspace I got error. Command:

New-AzSynapseSqlDatabase -ResourceGroupName v-abhavani-mindtree  -WorkspaceName synarm -Name db

Error:

enter image description here

I tried with below command It worked without any error and serverless SQL pool is created successfully in synapse workspace: Command:

az synapse sql pool create --resource-group v-abhavani-mindtree --name mySampleDataWarehouse  --performance-level "DW1000c" --workspace-name synarm

Image for reference:

enter image description here

SQL Pool:

enter image description here

Bhavani
  • 1,725
  • 1
  • 3
  • 6
  • Hi, as I stated at the top, this is for an Azure Serverless Database - not a Dedicated SQL Pool. – JMoss84 Jan 03 '23 at 00:32
  • check this [ARM Template](https://learn.microsoft.com/en-us/answers/questions/135105/arm-template-for-serverless-azure-sql-database.html) for serverless database. – Bhavani Jan 03 '23 at 09:01