How to enable SQL Authentication with ARM Template?

爷,独闯天下 提交于 2019-12-12 06:56:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!