question

JanKosmala-8085 avatar image
0 Votes"
JanKosmala-8085 asked JanKosmala-8085 commented

ARM template for SQL Elastic Pool with maintenanceConfigurationId

Hi All,

I have an issue with ARM template - I was willing to set non-default maintenanceConfigurationId, however I found only CLI call to retrieve available options. Is there any option to get it in ARM template and set for my Elastic Pool? Default maintenance window is 5PM-8AM , I would set FRI-SUN 10PM-6AM.

Could you please advise how to achieve this?

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered JanKosmala-8085 commented

Hi @JanKosmala-8085, welcome to Microsoft Q&A forum.

Can you try something like below:

 "properties": {
                 "collation": "SQL_Latin1_General_CP1_CI_AS",
                 "maxSizeBytes": 34359738368,
                 "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
                 "zoneRedundant": false,
                 "licenseType": "LicenseIncluded",
                 "readScale": "Disabled",
                 "requestedBackupStorageRedundancy": "Geo",
                 "maintenanceConfigurationId": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxf/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_WestUS2_DB_2",
                 "isLedgerOn": false
             }

Just have the proper configuration id and subscription id. Above code uses 'SQL_WestUS2_DB_2' but you can try as per your region. Please let me know if this helps.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, I went to Azure Portal and with CLI I checked available options for the regions which I'm interested in.

It seems that full answer is:
/subscriptions/xxxxxxxxxxxxxxxxxxxxxf/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_{RegionName}_DB_2


The command: az maintenance public-configuration list --query "[?location=='northeurope'&&contains(maintenanceScope,'SQLDB')]" - taken from https://docs.microsoft.com/en-us/azure/azure-sql/database/maintenance-window-configure?tabs=azure-cli

1 Vote 1 ·