Skip to content

Commit a261d3c

Browse files
MikeRayMSFTpochirajuMike Ray (Microsoft)anosov1960prmerger-automator[bot]
authored
Final stage for January release. (#25639)
Co-authored-by: Raj Pochiraju <rajpo@microsoft.com> Co-authored-by: Mike Ray (Microsoft) <noreply-mikeray@microsoft.com> Co-authored-by: Alexander (Sasha) Nosov <alex.nosov@hotmail.com> Co-authored-by: prmerger-automator[bot] <40007230+prmerger-automator[bot]@users.noreply.github.com> Co-authored-by: Stacyrch140 <102548089+Stacyrch140@users.noreply.github.com>
1 parent 6cc25e8 commit a261d3c

23 files changed

Lines changed: 265 additions & 133 deletions

azure-sql/virtual-machines/windows/sql-agent-extension-automatic-registration-all-vms.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to enable the automatic registration feature to automatic
44
author: adbadram
55
ms.author: adbadram
66
ms.reviewer: mathoma
7-
ms.date: 10/26/2021
7+
ms.date: 01/10/2021
88
ms.service: virtual-machines-sql
99
ms.subservice: management
1010
ms.topic: how-to
@@ -37,6 +37,21 @@ By default, Azure VMs with SQL Server 2016 or later installed will be automatica
3737
> [!IMPORTANT]
3838
> The SQL IaaS Agent extension collects data for the express purpose of giving customers optional benefits when using SQL Server within Azure Virtual Machines. Microsoft will not use this data for licensing audits without the customer's advance consent. See the [SQL Server privacy supplement](/sql/sql-server/sql-server-privacy#non-personal-data) for more information.
3939
40+
## Integration with centrally managed Azure Hybrid Benefit
41+
42+
Centrally managed Azure Hybrid Benefit (CM-AHB) is a service that helps customers optimize their Azure costs and use other benefits such as:
43+
44+
- Moving all pay-as-you-go (full price) SQL PaaS/IaaS workloads to take advantage of your Hybrid Benefits without individually configuring them to enable Azure Hybrid Benefit
45+
- Ensuring that all your SQL workloads are licensed in compliance with the existing license agreements.
46+
- Separating the license compliance management roles from devops roles using RBAC
47+
- Take advantage of free business continuity by ensuring that your passive & DR environments are properly identified.
48+
- Leverage your MSDN licenses in Azure for non-production environments.
49+
50+
CM-AHB uses data provided by the SQL IaaS Agent extension to account for the number of SQL Server licenses used by the individual Azure VMs and provides recommendations to the billing admin during the license assignment process. Using the recommendations ensures that you get the maximum discount by using Azure Hybrid Benefit. If your VMs are not registered with the SQL IaaS Agent extension when CM-AHB is enabled by your billing admin, the service will not receive the full usage data from your Azure subscriptions and therefore the CM-AHB recommendations will be inaccurate.
51+
52+
> [!IMPORTANT]
53+
> If automatic registration is activated after CM-AHB is enabled, you will run the risk of unnecessary pay-as-you-go charges for your SQL Server on Azure VM workloads.
54+
To mitigate this risk, you need to adjust your license assignments in CM-AHB to account for the additional usage that will be reported by the SQL IaaS Agent extension after auto-registration. We published an [open source tool](https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-hybrid-benefit) that provides insights into the utilization of SQL Server licenses, including the utilization by the SQL Servers on Azure Virtual Machines that are not yet registered with the SQL IaaS Agent extension.
4055

4156
## Prerequisites
4257

docs/sql-server/azure-arc/assess.md

Lines changed: 84 additions & 45 deletions
Large diffs are not rendered by default.

docs/sql-server/azure-arc/billing.md

Lines changed: 87 additions & 53 deletions
Large diffs are not rendered by default.

docs/sql-server/azure-arc/connect-at-scale.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: In this article, you learn different ways of connecting SQL Server
44
author: anosov1960
55
ms.author: sashan
66
ms.reviewer: mikeray, randolphwest
7-
ms.date: 09/06/2022
7+
ms.date: 01/12/2023
88
ms.service: sql
99
ms.topic: conceptual
1010
---
@@ -65,6 +65,22 @@ You can automatically connect SQL Server instances on multiple Arc-enabled machi
6565

6666
To create an Azure Policy assignment, you need the `Resource Policy Contributor` role assignment on the scope - subscription or resource group - that you are targeting the assignment to. Further, if you are going to create a *new* system assigned managed identity, you need the `User Access Administrator` role assignment in the subscription.
6767

68+
### Connect at-scale using Azure Policy assignment
69+
70+
If you want to select an existing user assigned managed identity or have more granular control over the configuration of the at-scale onboarding policy, you can create the Azure Policy assignment.
71+
72+
1. Navigate to **Azure Policy** in the Azure portal and choose **Definitions**.
73+
1. Search for *Configure Arc-enabled machines running SQL Server to have SQL Server extension installed.* and click on the policy.
74+
1. Select **Assign**.
75+
1. Choose a Scope.
76+
1. Select **Next**, and **Next**.
77+
1. On the **Remediation** tab, click **Create a remediation task**.
78+
1. Choose **System assigned managed identity** (recommended) or **User assigned managed identity** and choose a managed identity which has *User Access Administration* and *Log Analytics Contributor* role assignments.
79+
1. Click **Review + Create**.
80+
1. Click **Create**.
81+
82+
See [Azure Policy documentation](/azure/governance/policy) for general instructions about how to assign an Azure policy using Azure portal or an API of your choice.
83+
6884
> [!IMPORTANT]
6985
> The Arc-enabled SQL Server resources for the `SQL Server - Azure Arc` resources are created in the same region and the resource group as the `Server - Azure Arc` resources on which they are hosted.
7086
@@ -85,21 +101,7 @@ To do this,
85101

86102
These steps create a new Azure Policy assignment of the *Configure Arc-enabled machines running SQL Server to have SQL Server extension installed* policy definition to the selected subscription and, optionally, a specific resource group scope. A new system assigned managed identity is created and granted the required permissions to onboard Arc-enabled SQL Servers. This new managed identity is used by the policy remediation to install the Azure extension for SQL Server.
87103

88-
### Connect at-scale using Azure Policy assignment
89-
90-
If you want to select an existing user assigned managed identity or have more granular control over the configuration of the at-scale onboarding policy, you can create the Azure Policy assignment.
91104

92-
1. Navigate to **Azure Policy** in the Azure portal and choose **Definitions**.
93-
1. Search for *Configure Arc-enabled machines running SQL Server to have SQL Server extension installed.* and click on the policy.
94-
1. Select **Assign**.
95-
1. Choose a Scope.
96-
1. Select **Next**, and **Next**.
97-
1. On the **Remediation** tab, click **Create a remediation task**.
98-
1. Choose **System assigned managed identity** (recommended) or **User assigned managed identity** and choose a managed identity which has *User Access Administration* and *Log Analytics Contributor* role assignments.
99-
1. Click **Review + Create**.
100-
1. Click **Create**.
101-
102-
See [Azure Policy documentation](/azure/governance/policy) for general instructions about how to assign an Azure policy using Azure portal or an API of your choice.
103105

104106
## Connect multiple SQL Server instances using script
105107

docs/sql-server/azure-arc/connect.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Connect an instance of SQL Server to Azure Arc. Allows you to manag
44
author: anosov1960
55
ms.author: sashan
66
ms.reviewer: mikeray, maghan
7-
ms.date: 12/06/2022
7+
ms.date: 01/12/2023
88
ms.service: sql
99
ms.topic: conceptual
1010
ms.custom: event-tier1-build-2022
@@ -26,6 +26,8 @@ You can connect your existing SQL Server instance to Azure Arc by following thes
2626

2727
Microsoft.AzureArcData/sqlServerInstances/write
2828

29+
Users can be assigned to built-in roles that have these permissions, for example Contributor or Owner. See [Assign Azure roles using the Azure portal](/azure/role-based-access-control/role-assignments-portal) for more information.
30+
2931
> [!NOTE]
3032
> SQL Server on Azure Arc-enabled servers does not support SQL Server Failover Cluster Instances.
3133
@@ -64,7 +66,6 @@ If the machine with SQL Server is already connected to Azure Arc, you can connec
6466

6567
> [!IMPORTANT]
6668
>
67-
> - The Managed System Identity used by the Azure connected machine agent must have the *Azure Connected SQL Server Onboarding* role at the resource group level.
6869
> - The Azure resource with type `SQL Server - Azure Arc` representing the SQL Server instance installed on the machine uses the same region and resource group as the Azure resources for Arc-enabled servers.
6970
7071
## [Azure portal](#tab/azure)
@@ -75,15 +76,18 @@ To install the Azure extension for SQL Server, use the following steps:
7576
1. Search for the connected server with the SQL Server instance that you want to connect to Azure.
7677
1. Under **Extensions**, select **+ Add**.
7778
1. Select `Azure extension for SQL Server` and select **Next**.
78-
1. Specify the SQL Server instance(s) you want to exclude from registering (if you have multiple instances installed on the server) and select **Review + Create**.
79+
1. Specify the SQL Server edition and license type you are using on this machine.
80+
1. Specify the SQL Server instance(s) you want to exclude from registering (if you have multiple instances to skip, separate them by spaces) and select **Review + Create**.
81+
:::image type="content" source="media/join/license-type-in-extension.png" alt-text="Screenshot for license type and exclude instances.":::
7982
1. Select **Create**.
8083

8184
## [PowerShell](#tab/powershell)
8285

8386
To install *Azure extension for SQL Server*, run:
8487

8588
```powershell
86-
$Settings = @{\"SqlManagement\":{\"IsEnabled\":true}, \"excludedSqlInstances\":[]}
89+
$Settings = @{ SqlManagement = @{ IsEnabled = $true }; ExcludedSqlInstances = @(<Comma separated names of SQL Server instances, eg: "MSSQLSERVER01","MSSQLSERVER">); LicenseType="<License Type>"}
90+
8791
New-AzConnectedMachineExtension -Name "WindowsAgent.SqlServer" -ResourceGroupName {your resource group name} -MachineName {your machine name} -Location {azure region} -Publisher "Microsoft.AzureData" -Settings $Settings -ExtensionType "WindowsAgent.SqlServer"
8892
```
8993

@@ -92,15 +96,18 @@ New-AzConnectedMachineExtension -Name "WindowsAgent.SqlServer" -ResourceGroupNam
9296
To install *Azure extension for SQL Server* for Windows Operating System, run:
9397

9498
```azurecli
95-
az connectedmachine extension create --machine-name "{your machine name}" --location "{azure region}" --name "WindowsAgent.SqlServer" --resource-group "{your resource group name}" --type "WindowsAgent.SqlServer" --publisher "Microsoft.AzureData" --settings '{\"SqlManagement\":{\"IsEnabled\":true}, \"excludedSqlInstances\":[]}'
99+
az connectedmachine extension create --machine-name "{your machine name}" --location "{azure region}" --name "WindowsAgent.SqlServer" --resource-group "{your resource group name}" --type "WindowsAgent.SqlServer" --publisher "Microsoft.AzureData" --settings "{\"SqlManagement\":{\"IsEnabled\":true}, \"LicenseType\":\"<License Type>\", \"ExcludedSqlInstances\":[]}"
96100
```
97101

98102
To install *Azure extension for SQL Server* for Linux operating system, run:
99103

100104
```azurecli
101-
az connectedmachine extension create --machine-name "{your machine name}" --location "{azure region}" --name "LinuxAgent.SqlServer" --resource-group "{your resource group name}" --type "LinuxAgent.SqlServer" --publisher "Microsoft.AzureData" --settings '{\"SqlManagement\":{\"IsEnabled\":true}, \"excludedSqlInstances\":[]}'
105+
settings="{\"SqlManagement\":{\"IsEnabled\":true},\"LicenseType\":\"<License Type>\"}"
106+
az connectedmachine extension create --machine-name "{your machine name}" --location "{azure region}" --name "LinuxAgent.SqlServer" --resource-group "{your resource group name}" --type "LinuxAgent.SqlServer" --publisher "Microsoft.AzureData" --settings $settings
102107
```
103108

109+
The possible licensing types that you can set are, PAYG, Paid and LicenseOnly
110+
104111
*Azure extension for SQL Server* for Linux is available for preview.
105112

106113
---
@@ -119,18 +126,31 @@ If the server that runs your SQL Server instance isn't yet connected to Azure, y
119126

120127
:::image type="content" source="media/join/start-creation-of-sql-server-azure-arc-resource.png" alt-text="Screenshot of the start creation.":::
121128

122-
1. Select **Connect SQL Server to Azure Arc**
129+
1. Under **Connect SQL Server to Azure Arc**, select **Connect Servers**
123130

124131
1. Review the prerequisites and select **Next: Server details**
125132

126-
1. Select the subscription, resource group, Azure region, and host operating system. If necessary, specify the proxy your network uses to connect to the Internet.
133+
1. Specify:
134+
135+
- **Subscription**
136+
- **Resource group**
137+
- **Region**
138+
- **Operating system**
139+
140+
If necessary, specify the proxy your network uses to connect to the Internet.
141+
142+
:::image type="content" source="media/join/server-details-sql-server-azure-arc.png" alt-text="Screenshot of server details.":::
143+
144+
1. Select the SQL Server edition and license type you are using on this machine. [Learn more:](billing.md).
145+
146+
1. Specify the SQL Server instance(s) you want to exclude from registering (if you have multiple instances installed on the server). Separate each excluded instance by a space.
127147

128148
> [!IMPORTANT]
129149
> If the machine hosting the SQL Server instance is already [connected to Azure Arc](/azure/azure-arc/servers/onboard-portal), make sure to select the same resource group that contains the corresponding **Server - Azure Arc** resource.
130150
131-
:::image type="content" source="media/join/server-details-sql-server-azure-arc.png" alt-text="Screenshot of server details.":::
151+
:::image type="content" source="media/join/server-details-sql-server-management-azure-arc.png" alt-text="Screenshot of server management details.":::
132152

133-
1. Select **Tags** to optionally add tags to the resource for your SQL Server instance.
153+
1. Select **Next: Tags** to optionally add tags to the resource for your SQL Server instance.
134154

135155
1. Select **Run script** to generate the onboarding script.
136156
Screenshot of
@@ -182,15 +202,15 @@ Alternatively, you can also onboard your SQL Servers to Azure Arc by directly us
182202

183203
If you use Azure Active Directory service principal to authenticate, execute the command below on the target SQL Server.
184204

185-
```powershell
186-
'& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid> --resourceGroup <resourceGroupName> --location <AzureLocation> --tenantid <TenantId> --service-principal-app-id <servicePrincipalAppId> --service-principal-secret <servicePrincipalSecret> --proxy <proxy> --tags ""'
187-
```
205+
```powershell
206+
'& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid> --resourceGroup <resourceGroupName> --location <AzureRegion> --tenantid <TenantId> --service-principal-app-id <servicePrincipalAppId> --service-principal-secret <servicePrincipalSecret> --proxy <proxy> --licenseType <licenseType> --excluded-SQL-instances <"MSSQLSERVER01 MSSQLSERVER02 MSSQLSERVER15">'
207+
```
188208

189209
Otherwise, execute the command below on the target SQL Server.
190210

191-
```powershell
192-
'& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid>--resourceGroup <resourceGroupName> --location <AzureLocation> --tenantid <TenantId> --proxy <proxy> --tags ""'
193-
```
211+
```powershell
212+
'& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid> --resourceGroup <resourceGroupName> --location $location --tenantid <TenantId> --proxy <proxy> --licenseType <licenseType> --excluded-SQL-instances <"MSSQLSERVER01 MSSQLSERVER02 MSSQLSERVER15">'
213+
```
194214

195215
> [!IMPORTANT]
196216
> Microsoft Azure Arc-enabled SQL Server is licensed to you as part of your or your company's subscription license for Microsoft Azure Services. You may only use the software with Microsoft Azure Services and are subject to the terms and conditions of the agreement under which you obtained Microsoft Azure Services. You may not use the software if you do not have an active subscription license for Microsoft Azure Services.
29.8 KB
Loading
76.5 KB
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)