You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/manage/azure-hybrid-benefit/README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ services: Azure SQL
3
3
platforms: Azure
4
4
author: anosov1960
5
5
ms.author: sashan
6
-
ms.date: 10/26/2022
6
+
ms.date: 01/07/2023
7
7
---
8
8
9
9
# Overview
@@ -42,9 +42,10 @@ The following resources are in scope for the license utilization analysis:
42
42
> - For IaaS workloads, such as SQL Server in Virtual Machines or SSIS integration runtimes, each vCPU is counted as one vCore.
43
43
> - For PaaS workloads, each vCore of Business Critical service tier is counted as one Enterprise vCore and each vCore of General Purpose service tier is counted as one Standard vCore.
44
44
> - In the DTU-based purchasing model, the SQL license cost is built into the individual SKU prices. These resources are not eligible for Azure Hybrid Benefit or HADR benefit, and therefore are not in scope of the tool.
45
-
> - You must be at least a *Reader* of each subscription you scan.
46
-
> - To report unregistered vCores, you must be a subscription *Contributor* or *Owner*, otherwise this column will show a zero value. Selecting this option will substantially increase the execution time, especially for the subscriptions with large numbers of virtual machines.
47
-
> - The values AHB ECs and PAYG ECs are reserved for the future use and should be ignored
45
+
46
+
# Required permissions
47
+
48
+
You must be at least a *Reader* of each subscription you scan. If you report unregistered vCores, you must have the `Microsoft.Compute/virtualMachines/runCommand/action` permission. The [Virtual Machine Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#virtual-machine-contributor) role and higher levels have this permission. If you don't have this permission, the tool will shows zero value for unregistered cores.
48
49
49
50
# Launching the script
50
51
@@ -59,15 +60,16 @@ The script accepts the following command line parameters:
59
60
|-Cred|credential_object|Optional: value of type PSCredential to securely pass database user and password|
60
61
|-FilePath|csv_file_name|Optional: filename where the data will be saved in a .csv format. Ignored if database parameters are specified|
61
62
|-ShowUnregistered|\$True or \$False (default)|Optional: causes the script to report the total size of VMs with a self-hosted SQL server instance that is unregistered with the IaaS SQL extension|
62
-
|-ShowNC|\$True or \$False (default)|Optional: causes the script to report the AHB and PAYG consumption in normalized cores (NC). For more information about normalized cores, see [How licenses apply to Azure resources](https://learn.microsoft.com/azure/cost-management-billing/scope-level/overview-azure-hybrid-benefit-scope#how-licenses-apply-to-azure-resources).|
63
-
64
63
65
64
<sup>1</sup>You can create a .csv file using the following command and then edit to remove the subscriptions you don't want to scan.
If both database parameters and *FilePath* are omitted, the script will write the results to a `.\sql-license-usage.csv` file. The file is created automatically. If the file already exists, the consecutive scans will append the results to it. If the database parameters are specified, the data will be saved in a *Usage-per-subscription* table. If the table doesn't exist, it will be created automatically.
70
69
70
+
>[!IMPORTANT]
71
+
> Selecting `-ShowUnregistered` option will substantially increase the execution time, especially for the subscriptions with a large number of virtual machines.
72
+
71
73
## Example 1
72
74
73
75
The following command will scan all the subscriptions to which the user has access to and save the results in `.\sql-license-usage.csv`
0 commit comments