azure - How to seeextract SQL MI quota limits for all subscriptionsregions - Stack Overflow

The Azure Portal does not have anywhere to view the current SQL MI quota limits. Quota limits are set p

The Azure Portal does not have anywhere to view the current SQL MI quota limits. Quota limits are set per Subscription/Region pair.

The Quota blade does not contain any of this information. You may get some information from the error if you try and create or scale in SQLMI instance that would exceed the limits.

How can I extract this information or where in Azure Portal can I see this?

The Azure Portal does not have anywhere to view the current SQL MI quota limits. Quota limits are set per Subscription/Region pair.

The Quota blade does not contain any of this information. You may get some information from the error if you try and create or scale in SQLMI instance that would exceed the limits.

How can I extract this information or where in Azure Portal can I see this?

Share Improve this question edited Mar 26 at 7:56 Thom A 96.3k11 gold badges61 silver badges95 bronze badges asked Mar 26 at 5:58 RohanRohan 5988 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Currently the Quota blade does not have a Provider specific to SQL MI.
There is also no other Portal feature where you can view the SQL MI quota limits.

The only current known way is through PowerShell in the Azure CLI.

The following script print all limits for each subscription / region pair where you already have an SQL MI instance pausing between each.


$subscriptions = Get-AzSubscription | Select-Object -ExpandProperty Name

foreach ($subscription in $subscriptions) {
    az account set --subscription $subscription
    $sqlmi_locations = @(az sql mi list --query "[].location" --output tsv)

    # Store unique locations list of SQL managed instances in a subscription
    $unique_sqlmi_location = @($sqlmi_locations | Sort-Object -Unique)

    # Display the quotas and utilization for SQL Managed instances in a location
    for ($i = 0; $i -lt $unique_sqlmi_location.Length; $i++) {
        $location = $unique_sqlmi_location[$i]
        $subname_context = $subscription
        $az_output = az sql list-usages --location $location --query "[].{SubName:'$subname_context', Location:'$location', DisplayName:displayName, CurrentValue:currentValue, Limit:limit}" -o table
        #Display the output of the quotas
        $az_output | Format-Table | Out-String | Write-Host
        pause
    }
}

For a single subscription/region you can run the following command where
$location = Azure region eg. australiaeast
$subname_context = your subscription name

az sql list-usages --location $location --query "[].{SubName:'$subname_context', Location:'$location', DisplayName:displayName, CurrentValue:currentValue, Limit:limit}" -o table

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744162999a4561176.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信