Skip to content

Commit 4a991eb

Browse files
Alexander NosovAlexander Nosov
authored andcommitted
Modified readme
1 parent a41e8e4 commit 4a991eb

File tree

2 files changed

+64
-10
lines changed

2 files changed

+64
-10
lines changed

samples/manage/azure-hybrid-benefit/README.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,63 @@
11
---
2-
services: azure automation
3-
platforms: azure
2+
services: Azure SQL
3+
platforms: Azure
44
author: anosov1960
5+
ms.author: sashan
6+
ms.date: 12/15/2020
57
---
68

7-
# Managing Azure Hybrid Benefit
9+
# Overview
10+
11+
This script is provided to help you manage the SQL Server licenses that are consumed by the SQL Servers deployed to Azure. The script's output is a `sql-license-usage.csv` file with the consolidated SQL Server license usage by all SQL resources in the specific subscriptions or the entire account. The usage is broken down into the following categories of licenses:
12+
13+
- AHB Standard vCores
14+
- AHB Enterprise vCores
15+
- PAYG Standard vCores
16+
- PAYG Enterprise vCores
17+
- HADR Standard vCores
18+
- HADR Enterprise vCores
19+
- Developer vCores
20+
- Express vCores
21+
22+
>[!NOTE]
23+
> - The usage data is a snapshot at the time of the script execution based on the size of the deployed SQL resources in vCores.
24+
> - For IaaS workloads, such as SQL Server in Virtual Machines or SSIS integration runtimes, each vCPU is counted as one vCore.
25+
> - 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.
26+
27+
28+
# Running the script using Cloud Shell
29+
30+
Use the following steps to calculate the SQL Server license usage:
31+
32+
1. Launch the [Cloud Shell](https://shell.azure.com/). For details, [read more about PowerShell in Cloud Shell](https://aka.ms/pscloudshell/docs).
33+
34+
2. Upload the script to the shell using the following command:
35+
36+
```console
37+
curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-hybrid-benefit/sql-license-usage.ps1 -o sql-license-usage.ps1
38+
```
39+
40+
3. Run the script in interactive mode. The script will prompt for a subscriptions ID or `*`. The latter will automatically scan all the subscriptions in you account.
41+
42+
```console
43+
./sql-license-usage.ps1
44+
```
45+
46+
If you need to scan a subset of the subscriptions, use the following steps:
47+
48+
1. Create a `.csv` with the list off all subscriptions in your account using the following command. You can edit the file to remove the subscriptions you don't want to scan.
49+
50+
```console
51+
Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation
52+
```
53+
54+
2. Run the script and specify the `.csv` file as a parameter.
55+
```console
56+
./sql-license-usage.ps1 .\mysubscriptions.csv
57+
```
58+
59+
> [!NOTE]
60+
> - To paste the commands into the shell, use `Ctrl-Shift-V` on Windows or `Cmd-v` on MacOS.
61+
> - The script will be uploaded directly to the home folder associated with your Cloud Shell session.
62+
> - The script will prompt for the resource group name and print a message when migration is completed.
863

9-
Provides the scripts to help you manage the [Azure Hybrid Benefit](https://azure.microsoft.com/pricing/hybrid-benefit/).

samples/manage/azure-hybrid-benefit/sql-license-usage.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
# limitations under the License.
1313
# ---------------------------------------------------------------------------------
1414
#
15-
# Sample script to calculate the total SQL Server license usage by all of the SQL resources in a specific subscription or the entire the account.
16-
17-
# This script acceptes a .CSV file as a parameter taht provides the list of subscriptions to be scanned for the license usage. You can create
15+
# Sample script to calculate the consolidated SQL Server license usage by all of the SQL resources in a specific subscription or the entire the account.
16+
#
17+
# This script accepts a .csv file as a parameter, which provides a list of subscriptions to be scanned for the license usage. You can create
1818
# such a file by the following command and then edit to remove the subscriptions you don't want to scan:
1919
# > Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation
2020
#
21-
# If no file is provoded, the script will prompt for a subscriptiobn ID or "*". The latter will automatically scan all subscription you account
22-
# hass access to.
21+
# If no file is provided, the script will prompt for a subscriptiobn ID or `*`. The latter will automatically scan all the subscriptions you account
22+
# has access to.
2323
#
2424
#
25-
# NOTE: The script does not calculate usage for Azure SQL resources that use the DTU-based putchase model
25+
# NOTE: The script does not calculate usage for Azure SQL resources that use the DTU-based purchasing model
2626
#
2727

2828
# Import the subscription info

0 commit comments

Comments
 (0)