Skip to content

Commit 283255d

Browse files
Merge pull request #26491 from pochiraju/connect-autodeploy
Connect at scale - autodeploy
2 parents db58023 + 17d4108 commit 283255d

2 files changed

Lines changed: 121 additions & 2 deletions

File tree

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Automatically connect Azure Arc-enabled SQL Servers
3+
description: In this article, you learn how Microsoft helps you automatically connect SQL Server instance resources to Azure Arc at scale.
4+
author: pochiraju
5+
ms.author: rajpo
6+
ms.reviewer: mikeray, randolphwest
7+
ms.date: 03/22/2023
8+
ms.service: sql
9+
ms.topic: conceptual
10+
---
11+
12+
# Automatically connect Azure Arc-enabled SQL Servers
13+
14+
To streamline the experience of connecting SQL Servers to Azure, Microsoft automatically installs the Azure extension for SQL Server on all Arc-enabled servers that have SQL Server installed which will result in all of the SQL Server instance resources being automatically created in Azure. To learn more, see [Azure Arc-enabled SQL Server](overview.md).
15+
16+
> [!IMPORTANT]
17+
> Microsoft will begin automatically connecting Azure Arc-enabled SQL Servers on April 11, 2023.
18+
19+
This article details how the streamlined process of connecting SQL Server to Azure works.
20+
21+
## Prerequisites
22+
23+
Complete the [Prerequisites](prerequisites.md).
24+
25+
## Specify license type
26+
27+
Optionally, you can specify the license type for each instance of SQL Server.
28+
29+
To specify the desired license type, provide the license type value tag. The automatic connecting work flow requires that tag. [Tag resources, resource groups, and subscriptions for logical organization - Azure Resource Manager | Microsoft Learn](/azure/azure-resource-manager/management/tag-resources).
30+
31+
Add one of the tags and values below to a subscription or resource group(s) or Arc Server resource(s).
32+
33+
|Tag |Value |
34+
|---------|---------|
35+
|`ArcSQLServerExtensionDeployment` |`Paid`|
36+
|`ArcSQLServerExtensionDeployment` |`PAYG`|
37+
|`ArcSQLServerExtensionDeployment` |`LicenseOnly`|
38+
39+
Microsoft uses this value when the SQL Server extension is deployed via the automatic connecting work flow.
40+
41+
## Opt out
42+
43+
There is no cost associated with connecting SQL Server to Azure. However, if you decide to opt out from automatically installing the SQL Server extension on Arc servers that have SQL Server, follow the instructions in the [How to opt out of automatic connecting](#how-to-opt-out-automatic-connecting) section.
44+
45+
## Automatically connect on new servers connected to Arc
46+
47+
Microsoft automatically installs Azure extension for SQL Server on each machine connected to Azure Arc if it has SQL Server instance(s) installed on the machine. This automated process involves the following tasks:
48+
49+
1. Registers the `Microsoft.AzureArcData` resource provider, if not already registered.
50+
1. Sets the license type, if the `ArcSQLServerExtensionDeployment` tag value is set.
51+
1. Installs the Azure extension for SQL Server.
52+
1. Creates Arc-enabled SQL Server instance resource in Azure.
53+
54+
Once the connecting is complete, you can benefit with the Azure features for SQL Server. To learn more, see [Manage SQL Server license and billing options](manage-license-type.md).
55+
56+
## Fix missing License type
57+
58+
There can be SQL Server machines successfully connected to Arc but missing the proper “License Type” to unlock the free Arc enabled SQL Server benefits. To verify, run this resource graph query.
59+
60+
```msgraph-interactive
61+
resources
62+
|extend licenseType =properties.licenseType
63+
|extend licenseType = iff(licenseType=='','Configuration needed',licenseType)
64+
|extend ResourceName=name
65+
|where type =="microsoft.azurearcdata/sqlserverinstances" and licenseType in('Configuration needed')
66+
|project id,tenantId,ResourceName,licenseType
67+
```
68+
To know more about license types and modify, see [Manage SQL Server license and billing options](manage-license-type.md).
69+
70+
71+
## How to opt out automatic connecting
72+
73+
If you would like to opt out of the automatic installation of Azure extension for SQL Server, you can add the tag and value below to a subscription or resource group(s) or Arc Server resource(s).
74+
75+
|Tag |Value |
76+
|---------|---------|
77+
|`ArcSQLServerExtensionDeployment`|`Disabled`|
78+
79+
Alternatively, you can also limit which extensions can be installed on your server, you can configure lists of the extensions you wish to allow and block on the server. To learn more, see [Extension allowlists and blocklists](/azure/azure-arc/servers/security-overview#extension-allowlists-and-blocklists).
80+
81+
## Learn how Microsoft automatically deploy Azure extension for SQL Server
82+
83+
Microsoft can run extension installations on an Arc-enabled server through the Windows service Guest Configuration Extension service (`ExtensionService`). When the server is connected to Arc, the Windows service Guest Configuration Extension service (`ExtensionService`) is installed. This service is responsible for installing, upgrading, and deleting extensions (agents, scripts, or other software) on the machine. The guest configuration and extension services run as Local System on Windows, and as root on Linux. For details about the Arc agent services and service accounts review [Agent security and permissions | Agent security and permissions](/azure/azure-arc/servers/security-overview#agent-security-and-permissions)
84+
85+
Microsoft can call APIs to deploy Azure extension for SQL Server and automatically connecting to Arc enabled SQL Server
86+
87+
You can also install the extensions using the Azure portal, Azure Resource Manager (ARM) APIs, Azure Policy, ARM templates, the Azure CLI, or the Azure PowerShell module. [Deployment options for Azure Arc-enabled SQL Server](deployment-options.md)
88+
89+
90+
91+
## Find SQL Servers connected to Arc, but missing Azure extension for SQL Server
92+
93+
Use the Azure graph query below to list the machine and subscription IDs that contain Arc Servers with SQL Server installed but missing Azure extension for SQL Servers.
94+
95+
```msgraph-interactive
96+
resources
97+
| where type == "microsoft.hybridcompute/machines" and properties['detectedProperties']['mssqldiscovered'] has "true"
98+
| extend
99+
joinID = toupper(id)
100+
| join kind= inner (
101+
resources
102+
| where type == "microsoft.hybridcompute/machines/extensions"
103+
| extend machineId = toupper(substring(id, 0, indexof(id, '/extensions')))
104+
| project machineId, name
105+
| summarize allExtensions = make_list(name) by machineId
106+
| where allExtensions !has ("SqlServer")
107+
) on $left.joinID == $right.machineId
108+
| project id, subscriptionId, tenantId
109+
110+
```
111+
112+
## Next steps
113+
114+
- [Azure Arc-enabled SQL Server](overview.md)
115+
- [Deployment options for Azure Arc-enabled SQL Server](deployment-options.md)
116+
- [Prerequisites](prerequisites.md)
117+
- [Data collected by Arc enabled SQL Server](data-collection.md)

docs/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10431,10 +10431,12 @@ items:
1043110431
href: sql-server/azure-arc/connect-already-enabled.md
1043210432
- name: Connect at scale
1043310433
items:
10434-
- name: Connect at scale | Azure policy
10434+
- name: Azure policy
1043510435
href: sql-server/azure-arc/connect-at-scale-policy.md
10436-
- name: Connect at scale | Script
10436+
- name: Script
1043710437
href: sql-server/azure-arc/connect-at-scale-script.md
10438+
- name: Autodeploy
10439+
href: sql-server/azure-arc/connect-at-scale-autodeploy.md
1043810440
- name: Connect machines using Configuration Manager custom task sequence
1043910441
href: sql-server/azure-arc/onboard-configuration-manager-custom-task.md
1044010442
- name: Manage

0 commit comments

Comments
 (0)