如何使用ARM模板启用SQL身份验证? [英] How to enable SQL Authentication with ARM Template?

查看:107
本文介绍了如何使用ARM模板启用SQL身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ARM模板,该模板使用以下图像部署多个Azure VM:

I have an ARM template which deploys multiple Azure VMs with the following images:

    "SQL2008R2SP3-WS2008R2SP1",
    "SQL2012SP4-WS2012R2",
    "SQL2014SP2-WS2012R2",
    "SQL2016SP2-WS2016",
    "SQL2017-WS2016"

SQLIaaS VM Extension没有使SQL Server处于SQL身份验证模式,也没有创建SQL身份验证帐户.否则,其他一切工作正常.这是ARM模板的SQLIaaS部分的代码段.为什么不建立SQL Auth的任何想法?

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')]"
          }
        }
      }
    }

推荐答案

我从不深入了解它,但是现在可以正常工作了.不确定是否对任何人有帮助,但我想回答这个问题.

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.

这篇关于如何使用ARM模板启用SQL身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆