I am deploying an ARM template with SQL Server Auto Tuning, I am enabling create index, drop index, and force last good plan . Here is my ARM template code.
{
"apiVersion": "2014-04-01",
"name": "[variables('databaseServerName')]",
"type": "Microsoft.Sql/servers",
"location": "[variables('databaseServerLocation')]",
"tags":{
"displayName": "SqlServer"
},
"properties": {
"administratorLogin": "[variables('databaseAdminLogin')]",
"administratorLoginPassword": "[variables('databaseAdminPassword')]",
"version": "12.0"
},
"resources": [
{
"apiVersion": "2015-01-01",
"name": "[variables('databaseName')]",
"type": "databases",
"location": "[variables('databaseServerLocation')]",
"tags": {
"displayName": "Database"
},
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('databaseServerName'))]"
],
"properties": {
"edition": "[parameters('databaseEdition')]",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"requestedServiceObjectiveName": "[parameters('databaseRequestedServiceObjectiveName')]"
}
},
{
"type": "firewallRules",
"apiVersion": "2014-04-01",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('databaseServerName'))]"
],
"location": "[variables('databaseServerLocation')]",
"name": "AllowAllWindowsAzureIps",
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
},
{
"type": "advisors",
"name": "ForceLastGoodPlan",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]"
]
},
{
"type": "advisors",
"name": "CreateIndex",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]"
]
},
{
"type": "advisors",
"name": "DropIndex",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]"
]
}
]
},
When I try to deploy the template I am experiencing this error. As far as I understand if I try to deploy twice in a short amount of time this error might occur. However, the first deploy was 24 hours ago.
BadRequest {
"code": "45363",
"message": "Server automatic tuning settings from previous request have not propagated to all databases yet. Please try again in few minutes.",
"target": null,
"details": [{
"code": "45363",
"message": "Server automatic tuning settings from previous request have not propagated to all databases yet. Please try again in few minutes.",
"target": null,
"severity": "16"
}],
"innererror": []
}
Can anyone provide some insights into how I can avoid this error? When I try again in a few minutes it did work but it also caused an application to be down for a few minutes.