gpt4 book ai didi

Azure ARM 模板 - SQL 故障转移组错误 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified

转载 作者:行者123 更新时间:2023-12-03 00:01:36 25 4
gpt4 key购买 nike

已从 ARM 模板成功部署具有预期故障转移组的主 Azure SQL 服务器和辅助 Azure SQL 服务器。在后续部署中部署 ARM 模板将返回以下错误消息:

  "error": {
"code": "FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified",
"message": "The create or update failover group request body should not modify the read-only property 'location'."
}
} undefined

我们尚未对错误消息中所示的主服务器或辅助服务器的位置属性进行任何更改。

ARM 模板中的代码片段:

    {
"comments": "Azure SQL Server Failover Group",
"condition": "[parameters('isProduction')]",
"type": "Microsoft.Sql/servers/failoverGroups",
"apiVersion": "2015-05-01-preview",
"name": "[concat(variables('sqlServerPrimaryName'), '/', variables('sqlServerFailoverName'))]",
"location": "[parameters('sqlServerPrimaryLocation')]",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', variables('sqlServerPrimaryName'))]",
"[resourceId('Microsoft.Sql/servers', variables('sqlServerSecondaryName'))]",
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('adminDbName'))]",
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('trxnDbName'))]",
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('dbaDbName'))]"
],
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 60
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled"
},
"partnerServers": [
{
"id": "[resourceId('Microsoft.Sql/servers', variables('sqlServerSecondaryName'))]"
}
],
"databases": [
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('adminDbName'))]",
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('trxnDbName'))]",
"[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('dbaDbName'))]"
]
}
}

最佳答案

如果可能,请从 ARM 模板中删除该位置,因为您已经在故障转移组创建名称中指定了 sqlServerPrimaryName,所以它将采用 sqlServerPrimaryName 的位置。

关于Azure ARM 模板 - SQL 故障转移组错误 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64217266/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com