4

借助 Azure 混合权益 (AHB),现有的本地 SQL Server 许可证可以转换为 Azure SQL 托管实例价格的 40% 折扣。如果已经创建了没有 AHB 的托管实例,如何在现有托管实例上应用 Azure 混合权益?

4

2 回答 2

2

将托管实例转换为 AHB 的最简单方法是转到 Azure 门户,打开托管实例的详细信息,转到设置/定价层并确认您拥有要使用的有效 SA 许可证。

可以使用 AzureRm.Sql PowerShell 库和Set-AzureRmSqlManagedInstance命令将托管实例的定价转换为 AHB :

Set-AzureRmSqlManagedInstance `
               -Name $instanceName `
               -ResourceGroupName $resourceGroup `
               -LicenseType BasePrice

您可以使用 AzureRm 库和Set-AzureRmResource命令代替 AzureRm.Sql:

$subId = "70b3d058-a51a-****-****-**********"
$resourceGroup = "my-resource-group"
$instanceName = "my-instance"

Select-AzureRmSubscription -SubscriptionId $subId

$properties = New-Object System.Object
$properties | Add-Member -type NoteProperty -name licenseType -Value BasePrice

Set-AzureRmResource -Properties $properties `
                    -ResourceName $instanceName `
                    -ResourceType "Microsoft.SQL/managedInstances" `
                    -ResourceGroupName $resourceGroup -Force `
                    -ApiVersion "2015-05-01-preview"

Azure CLI 可用于使用az sql mi update命令更新许可证类型:

az sql mi update -g my_res_group -n my-managed-instance --license-type BasePrice
于 2019-01-09T11:39:18.883 回答
1

另一种选择是使用 Azure 门户:

  1. 在创建托管实例时,在门户的配置(配置 vCore 和存储的地方)中,有一个应用 AHB(Azure 混合权益)的选项
  2. 随后,一旦您部署了托管实例,请转到定价层,您将再次获得 AHB 选项。附上截图(适用于两者)

在 Azure 门户中为托管实例启用 Azure 混合权益

于 2019-07-31T12:52:22.527 回答