代码之家  ›  专栏  ›  技术社区  ›  Mark Allison

如何使用ARM模板启用SQL身份验证?

  •  -1
  • Mark Allison  · 技术社区  · 6 年前

    我有一个ARM模板,它使用以下图像部署多个Azure虚拟机:

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

    sqliaas-vm扩展不会使SQL Server处于SQL身份验证模式,也不会创建SQL身份验证帐户。否则其他一切都会好起来的。以下是ARM模板中sqliaas的一部分。你知道为什么不设置SQL认证吗?

    {
          "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 回复  |  直到 6 年前
        1
  •  -1
  •   Mark Allison    6 年前

    我从来没有深入到这个问题的底部,但它现在起作用了。不确定这是否对任何人都有帮助,但我想回答这个问题。