Skip to content

Commit 87ec912

Browse files
committed
Modified the extension installatiomn steps
1 parent b33a21c commit 87ec912

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

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

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,59 @@ az provider register --namespace 'Microsoft.AzureArcData'
4444
```
4545
---
4646

47+
4748
## Initiate the connection from Azure
4849

4950
If the machine with SQL Server is already connected to Azure Arc, you can register the SQL Server instances on that machine by installing the SQL Server extension (*WindowsAgent.SqlServer*). Once installed, the SQL Server extension will recognize all the installed SQL Server instances and register them with Azure Arc. The extension will run continuously to detect changes of the SQL Server configuration. For example, if a new SQL Server instance is installed on the machine, if will be automatically registered with Azure. See [virtual machine extension management](/azure/azure-arc/servers/manage-vm-extensions) for instructions how to install and uninstall extensions using Azure Portal, Azure PowerShell or Azure CLI.
5051

5152
> [!IMPORTANT]
52-
> The __SQL Server - Azure Arc__ resource for each SQL Server instance installed on the machine will be created in the same region and the resource group as the corresponding __Machine - Azure Arc__ resource.
53+
>1. The Managed System Identity for the corresponding **Machine - Azure Arc** must have the *Azure Connected SQL Server Onboarding* role at resource group level.
54+
>2. The __SQL Server - Azure Arc__ resource for each SQL Server instance installed on the machine will be created in the same region and the resource group as the corresponding __Machine - Azure Arc__ resource.
5355
5456
# [Azure portal](#tab/azure)
5557

58+
To assign the *Azure Connected SQL Server Onboarding* role to Arc machine managed identity, use the following steps:
59+
60+
* Select the resource group with the **Machine - Azure Arc** resource.
61+
* Select **Access control (IAM)**
62+
* Click **+ Add** and select **Add role assignment**
63+
For **Role**, select `Azure Connected SQL Server Onboarding`
64+
For **Assign access to**, select `User, group or service principal`
65+
For **Select**, search for your **Machine - Azure Arc** name and select it.
66+
* Click **Save**.
67+
68+
To install the SQL Server extension, use the following steps:
69+
5670
1. Open the __Machine - Azure Arc__ resource.
5771
2. Under __Extensions__, click __+ Add__
5872
1. Select `WindowsAgent.SqlServer` from the list and click __Create__.
5973

6074
# [PowerShell](#tab/powershell)
6175

76+
To assign *Azure Connected SQL Server Onboarding* role to the machine's managed identity, run:
77+
6278
```powershell
63-
$Settings = @{\"SqlManagement\":{\"IsEnabled\":true}, \"excludedSqlInstances\":[]}
79+
$spID = (Get-AzADServicePrincipal -DisplayName $arcMachineName).Id
80+
New-AzRoleAssignment -ObjectId $spID RoleDefinitionName "Azure Connected SQL Server Onboarding" -ResourceGroupName {resource group name}
81+
```
82+
83+
To install the SQL Server extension, run:
6484

85+
```powershell
86+
$Settings = @{\"SqlManagement\":{\"IsEnabled\":true}, \"excludedSqlInstances\":[]}
6587
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"
6688
```
6789

6890
# [Azure CLI](#tab/az)
6991

70-
Run:
92+
To assign the *Azure Connected SQL Server Onboarding* role to Arc machine managed identity, run:
93+
94+
```azurecli
95+
spID=$(az resource list -n <ArcMachineName> --query [*].identity.principalId --out tsv)
96+
az role assignment create --assignee $spID --role 'Azure Connected SQL Server Onboarding ' --scope /subscriptions/<mySubscriptionID>/resourceGroups/<myResourceGroup>
97+
```
98+
99+
To install the SQL Server extension, run:
71100

72101
```azurecli
73102
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\":[]}'

docs/sql-server/azure-arc/release-notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Azure Arc-enabled SQL Server releases for general availability support
1919

2020
This release introduces a SQL Server extension that continuously monitors for changes of the SQL Server configuration and automatically updates the corresponding __SQL Server - Azure Arc__ resources. The extension is installed as part of the SQL Server instance registration process. To upgrade your existing __SQL Server - Azure Arc__ resources to an agent-based configuration, use any of the methods described in [Connect your SQL Server to Azure Arc](connect.md).
2121

22+
This release also introduces a built-in role *Azure Connected SQL Server Onboarding* that defines the minimal permissions that would allow the hosting machine's MSI to onboard both the machine and the SQL Server instances to to Azure Arc.
23+
2224
> [!NOTE]
2325
> In this release, the SQL Server extension is only available for Windows. A Linux version of the extension will be announced separately.
2426

0 commit comments

Comments
 (0)