Skip to content

Commit ffdc6b7

Browse files
Merge pull request #30352 from MikeRayMSFT/240411-arc-sql-uninstall
Arc SQL | Update uninstall instructions
2 parents 1542d15 + 3b6ddb8 commit ffdc6b7

2 files changed

Lines changed: 45 additions & 11 deletions

File tree

docs/sql-server/azure-arc/delete-from-azure-arc.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,39 @@ This article describes how you can disconnect the Arc-enabled SQL Server instanc
1616

1717
## Prerequisites
1818

19-
* You're in a [Contributor role](/azure/role-based-access-control/built-in-roles#contributor) for the subscriptions and resource groups in which the Arc-enabled SQL Server instances have been created.
19+
Your Azure account is in a [Contributor role](/azure/role-based-access-control/built-in-roles#contributor) for the instance subscription and resource group.
2020

2121
> [!IMPORTANT]
22-
> You don't need access to the hosting machine to disconnect from Azure Arc.
22+
> You don't need access to the hosting machine to disconnect from Azure Arc.
2323
24-
## Disconnect and unregister individual SQL Server instances from Azure Arc
24+
## Opt out of automatic installation
25+
26+
Before you uninstall the Azure extension for SQL Server, opt out of the automatic installation of Azure extension for SQL Server, add the following tag and value to the Arc Server resource.
27+
28+
| Tag | Value |
29+
| --- | ----- |
30+
| `ArcSQLServerExtensionDeployment` | `Disabled` |
31+
32+
Alternatively, you can 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).
33+
34+
## Uninstall Azure extension for SQL Server
2535

2636
### [Azure portal](#tab/azure)
2737

2838
To uninstall Azure extension for SQL Server:
2939

3040
1. Go to **Azure Arc** portal
31-
1. Under **Machines** select the specific machine hosting SQL Server instance(s) you wish to disconnect from Azure Arc
41+
1. Under **Machines** select the specific server that hosts the SQL Server instance
3242
1. Under **Extensions**, select the extension you want to uninstall (*`WindowsAgent.SqlServer`* if it's a Windows machine, or *`LinuxAgent.SqlServer`* if it's a Linux machine)
3343
1. Click on the **Uninstall** tab
3444
1. Confirm that you want to uninstall the extension when prompted
3545

36-
To remove the SQL Server - Azure Arc resource(s):
46+
To remove the SQL Server - Azure Arc resources:
3747

3848
1. Go to **Azure Arc** portal
3949
1. Under **SQL Servers instances** select the specific SQL Server instances you wish to remove
4050
1. Click on the **Delete** tab
41-
1. Confirm that you want to delete the resource(s) when prompted
51+
1. Confirm that you want to delete the resource when prompted
4252

4353
### [PowerShell](#tab/powershell)
4454

@@ -50,7 +60,7 @@ Remove-AzConnectedMachineExtension -MachineName "{your machine name}" -ResourceG
5060

5161
For Windows machines, the extension name is `WindowsAgent.SqlServer`. For Linux machines, the extension name is `LinuxAgent.SqlServer`.
5262

53-
To remove the SQL Server - Azure Arc resource(s), run:
63+
To remove the SQL Server - Azure Arc resource, run:
5464

5565
```powershell
5666
remove-azresource -ResourceGroup "{your resource group name}" -ResourceType Microsoft.AzureArcData/SqlServerInstances -Name "{full SQL instance name}" -Force
@@ -68,7 +78,7 @@ To uninstall Azure extension for SQL Server, run:
6878
az connectedmachine extension delete --machine-name "{your machine name}" --resource-group "{your resource group name}" --name "{OS}Agent.SqlServer" --publisher "Microsoft.AzureData"
6979
```
7080

71-
To remove the SQL Server - Azure Arc resource(s), run:
81+
To remove the SQL Server - Azure Arc resource, run:
7282

7383
```azurecli
7484
az resource delete --resource-group "{your resource group name}" --resource-type Microsoft.AzureArcData/SqlServerInstances --name "{full SQL instance name}"
@@ -78,4 +88,28 @@ az resource delete --resource-group "{your resource group name}" --resource-type
7888

7989
---
8090

81-
To disconnect all the Arc-enabled SQL Server instances in a larger scope, such as a resource group, subscription, or multiple subscriptions, with a single command, use the [Uninstall Azure Extension for SQL Server](https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-arc-enabled-sql-server/uninstall-azure-extension-for-sql-server) script. It's published as an open source SQL Server sample and includes the step-by-step instructions.
91+
To disconnect all the Arc-enabled SQL Server instances in a larger scope, such as a resource group, subscription, or multiple subscriptions, with a single command, use the [script to uninstall Azure Extension for SQL Server](https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-arc-enabled-sql-server/uninstall-azure-extension-for-sql-server). The script is as an open source SQL Server sample and includes the step-by-step instructions.
92+
93+
## Residual files and accounts
94+
95+
This section explains files and database objects left after you uninstall.
96+
97+
### Files
98+
99+
Uninstalling deletes the binary files.
100+
101+
Extension logs and other data may not be deleted.
102+
103+
Disabling doesn't delete any binary files or folders.
104+
105+
### Tables
106+
107+
Tables created by the agent stay after the extension is uninstalled.
108+
109+
### Accounts
110+
111+
If you didn't install the extension in least privilege mode, the agent uses **NTAUTHORITY\SYSTEM** account.
112+
113+
Disabling or deleting the extension doesn't remove **NTAUTHORITY\SYSTEM** login from any databases because other applications may require this login. You have to manually remove the role from each user database.
114+
115+
**NTAUTHORITY\SYSTEM** account doesn't apply to installations with least privilege. For details about least privilege mode, see [Operate SQL Server enabled by Azure Arc with least privilege (preview)](configure-least-privilege.md).

docs/sql-server/azure-arc/manage-autodeploy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ The value 'Configuration needed' indicates that the onboarding process didn't ha
8686
> [!NOTE]
8787
> Setting license type to **Paid** or **PAYG** will unlock to valuable management features provided to SA customers.
8888
89-
## How to opt out of automatic connecting
89+
## Opt out of automatic connecting
9090

91-
If you want to opt out of the automatic installation of Azure extension for SQL Server, you can add the following tag and value to a subscription or resource group(s) or Arc Server resource(s).
91+
To opt out of the automatic installation of Azure extension for SQL Server, add the following tag and value to a subscription, resource group(s), or Arc Server resource(s).
9292

9393
| Tag | Value |
9494
| --- | ----- |

0 commit comments

Comments
 (0)