Skip to content

Commit 27b850f

Browse files
authored
Merge pull request #28630 from MikeRayMSFT/20231002-update-monitoring
acknowledge future mention. IN this case it's required as mentioned in previous PRs on this content.
2 parents 587c15e + bbaf008 commit 27b850f

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

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

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,39 @@ This article explains how to prevent your Arc-enabled SQL Server instances from
1616

1717
## Disable or enable collection
1818

19-
To disable the collection of monitoring data, run the following command in the Azure CLI. Replace the placeholders for subscription ID, resource group, and resource name:
19+
> [!IMPORTANT]
20+
> In order to disable or enable data collection, the `sqlServer` extension must be on `v1.1.2451.59` or later. [Upgrade VM extensions using the Azure Portal.](/azure/azure-arc/servers/manage-vm-extensions-portal)
21+
22+
### Enable the feature flag
23+
24+
Prior to disabling or enabling monitoring data collection, you must first enable the `SqlManagement` feature flag. This is a feature flag that will automatically be enabled in a future release. However, it is required to toggle the `monitoring.enabled` property on your Arc-enabled SQL Server using the Azure CLI.
25+
26+
1. Download the [`set-feature-flags.ps1`](https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-arc-enabled-sql-server/monitoring/set-feature-flags.ps1) PowerShell script from GitHub.
27+
28+
1. Configure and run `set-feature-flags.ps1` in a PowerShell terminal on your Azure Arc-enabled Server.
29+
30+
```powershell
31+
set-feature-flags.ps1 `
32+
-Subscription "<Your-subscription-ID>" `
33+
-ResourceGroup "contoso-rg" `
34+
-MachineName "contoso-sql-host" `
35+
-FeatureFlagsToEnable ("SqlManagement")
36+
```
37+
38+
### Disable monitoring data collection
39+
40+
After enabling the SqlManagement feature flag, run the following command in the Azure CLI to disable monitoring data collection for your Azure Arc-enabled SQL Server. Replace the placeholders for subscription ID, resource group, and resource name:
2041

2142
```azurecli
22-
az resource patch --ids "/subscriptions/<sub_id>/resourceGroups/<resource_group>/providers/Microsoft.AzureArcData/SqlServerInstances/<resource_name>" -p '{\"monitoring\": {\"enabled\": false}}' --api-version 2023-09-01-preview
43+
az resource update --ids "/subscriptions/<sub_id>/resourceGroups/<resource_group>/providers/Microsoft.AzureArcData/SqlServerInstances/<resource_name>" -p '{"monitoring": {"enabled": false}}' --api-version 2023-09-01-preview
2344
```
2445

46+
### Enable monitoring data collection
47+
2548
To enable the monitoring data collection for an Azure Arc-enabled SQL Server, run the following command in the Azure CLI. Replace the placeholders for subscription ID, resource group, and resource name:
2649

2750
```azurecli
28-
az resource patch --ids "/subscriptions/<sub_id>/resourceGroups/<resource_group>/providers/Microsoft.AzureArcData/SqlServerInstances/<resource_name>" -p '{\"monitoring\": {\"enabled\": true}}' --api-version 2023-09-01-preview
51+
az resource update --ids "/subscriptions/<sub_id>/resourceGroups/<resource_group>/providers/Microsoft.AzureArcData/SqlServerInstances/<resource_name>" -p '{"monitoring": {"enabled": true}}' --api-version 2023-09-01-preview
2952
```
3053

3154
## Collected data
@@ -55,3 +78,4 @@ Initially, the monitoring data is:
5578

5679
- [Azure Arc-enabled SQL Server and Databases activity logs](activity-logs.md)
5780
- [Azure Arc-enabled SQL Server data collection and reporting](data-collection.md)
81+

0 commit comments

Comments
 (0)