我当前正在使用 ARM 创建环境部署包,并且希望能够将现有的 Azure SQL 数据库(架构和数据)复制到新资源组中的另一个 Azure SQL 数据库。我从原始 SQL 数据库创建了一个 .bacpac 文件并将其上传到存储帐户中。然后,我将 SQL 数据库导入资源添加到我的模板中,并将其指向我创建的 .bacpac 文件的 URI。当我尝试运行部署时,出现此错误。
指定 Microsoft Azure SQL 数据库 v12 作为
目标平台无法发布到 Microsoft Azure SQL 数据库
{
"name": "[concat(parameters('environment'),'dbagg')]",
"type": "databases",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[variables('sqlServerName')]"
],
"tags": {
"displayName": "AggregationDatabase"
},
"properties": {
"collation": "[parameters('AggregationDatabaseCollation')]",
"edition": "[parameters('AggregationDatabaseEdition')]",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "[parameters('AggregationDatabaseRequestedServiceObjectiveName')]"
},
"resources": [
{
"name": "Import",
"type": "extensions",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[concat(parameters('environment'),'dbagg')]"
],
"tags": {
"displayName": "Copy Azure SQL DB"
},
"properties": {
"storageKeyType": "Primary",
"storageKey": "key",
"storageUri": "https://test.blob.core.windows.net/databasefiles/AggregationServerDCT.bacpac",
"administratorLogin": "[parameters('sqlAdminLogin')]",
"administratorLoginPassword": "[parameters('sqlAdminLoginPassword')]",
"operationMode": "Import"
}
}
]
}
对此任何帮助将不胜感激。