azure - Azure ARM 模板 SQL Server 自动调整部署错误
问题描述
我正在使用 SQL Server Auto Tuning 部署 ARM 模板,我正在启用 create index、drop index 和 force last good plan。这是我的 ARM 模板代码。
{
"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'))]"
]
}
]
},
当我尝试部署模板时,我遇到了这个错误。据我了解,如果我尝试在短时间内部署两次,则可能会发生此错误。但是,第一次部署是 24 小时前。
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": []
}
谁能提供一些关于如何避免此错误的见解?当我在几分钟内再次尝试时,它确实有效,但它也导致应用程序关闭了几分钟。
解决方案
{
"type": "advisors",
"name": "ForceLastGoodPlan",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]",
"CreateIndex"
]
},
{
"type": "advisors",
"name": "CreateIndex",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]",
"DropIndex"
]
},
{
"type": "advisors",
"name": "DropIndex",
"apiVersion": "2014-04-01",
"properties": {
"autoExecuteValue": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('databaseServerName'))]",
"[variables('databaseName')]"
]
}
我会尝试使用这些子资源创建一个dependsOn 链。
推荐阅读
- ios - SwiftSoup cocoapods 仅安装且仅安装 1.4 版,而不是 1.5
- javascript - 为特定文件添加一个新行的 Gulp 任务
- elasticsearch - Filebeat 没有将日志发送到 logstash
- c# - 如何在带有 C# 的 .Net 应用程序中使用 Oracle 云基础设施 JAVA SDK 来访问存储
- javascript - 如何禁止用户从 DOM 中手动删除 HTML 元素?
- c# - 如何在 C# 中使用 mongodb changeStream?
- zabbix - Zabbix 外部检查和仪表板日志记录
- python - Python sed 正则表达式匹配
- r - 抓取跨越多行的单元格的维基百科表格
- asp.net-mvc - 显示错误行的 ASP.Net MVC Razor 视图