问题
I have an ARM template which deploys multiple Azure VMs with the following images:
"SQL2008R2SP3-WS2008R2SP1",
"SQL2012SP4-WS2012R2",
"SQL2014SP2-WS2012R2",
"SQL2016SP2-WS2016",
"SQL2017-WS2016"
The SQLIaaS VM Extension is not leaving the SQL Server in SQL Authentication mode, and not creating the SQL Authentication account. Otherwise everything else works fine. Here's the snippet for the SQLIaaS part of the ARM template. Any ideas why SQL Auth is not being set up?
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'), copyIndex(1), '/SqlIaasExtension')]",
"location": "[parameters('location')]",
"condition": "[parameters('deploySqlIaasExtension')]",
"tags": {
"displayName": "SQLIaas VM Extension"
},
"dependsOn": [
"[concat(parameters('virtualMachineName'),copyIndex(1))]",
"[concat('Microsoft.Storage/storageAccounts','/', variables('storageNameSQLBackups'))]"
],
"copy": {
"name": "virtualMachineExtensionsGroup",
"count": "[parameters('sqlServerCount')]"
},
"properties": {
"type": "SqlIaaSAgent",
"publisher": "Microsoft.SqlServer.Management",
"typeHandlerVersion": "1.2",
"autoUpgradeMinorVersion": "true",
"settings": {
"AutoTelemetrySettings": {
"Region": "[parameters('location')]"
},
"AutoPatchingSettings": {
"PatchCategory": "WindowsMandatoryUpdates",
"Enable": true,
"DayOfWeek": "Sunday",
"MaintenanceWindowStartingHour": "0",
"MaintenanceWindowDuration": "240"
},
"AutoBackupSettings": {
"Enable": true,
"RetentionPeriod": "[parameters('sqlAutobackupRetentionPeriod')]",
"EnableEncryption": false,
"BackupSystemDbs": "[parameters('backupSystemDbs')]"
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"ConnectivityType": "Public",
"Port": "[parameters('sqlPortNumber')]"
},
"SQLWorkloadTypeUpdateSettings": {
"SQLWorkloadType": "General"
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "false"
}
},
"protectedSettings": {
"SQLAuthUpdateUserName": "[parameters('sqlAuthenticationLogin')]",
"SQLAuthUpdatePassword": "[parameters('sqlAuthenticationPassword')]"
}
}
}
}
回答1:
I never got to the bottom of this, but it's working now. Not sure if that helps anyone but I wanted to answer the question.
来源:https://stackoverflow.com/questions/51156924/how-to-enable-sql-authentication-with-arm-template