Skip to content

Commit c8278a1

Browse files
Merge pull request #28803 from anosov1960/docs-editor/manage-configuration-1697587895
Update manage-configuration.md
2 parents 501645e + 8ac45b9 commit c8278a1

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Run:
5050
az provider register --namespace 'Microsoft.AzureArcData'
5151
```
5252

53+
5354
---
5455

5556
## License types
@@ -219,6 +220,7 @@ az connectedmachine extension update --machine-name "simple-vm" -g "<resource-gr
219220
> * The update command overwrites all settings. If your extension settings have a list of excluded SQL Server instances, make sure to specify the full exclusion list with the update command.
220221
> * If you already have an older version of the Azure extension installed, make sure to upgrade it first, and then use one the modify methods to set the correct license type. For details, see [How to upgrade a machine extension](/azure/azure-arc/servers/manage-automatic-vm-extension-upgrade) for details.
221222
223+
222224
---
223225

224226
## Query SQL Server configuration
@@ -253,21 +255,26 @@ resources
253255

254256
This query identifies many details about each instance, including the license type, ESU setting and enabled features.
255257

258+
256259
```kusto
257260
resources
258-
| where type == "microsoft.hybridcompute/machines/extensions"
259-
| where properties.type in ("WindowsAgent.SqlServer","LinuxAgent.SqlServer")
260-
| project name, resourceGroup, subscriptionId,
261-
Provisioning_State = properties.provisioningState,
261+
| where type == "microsoft.hybridcompute/machines"| where properties.detectedProperties.mssqldiscovered == "true"| extend machineIdHasSQLServerDiscovered = id
262+
| project name, machineIdHasSQLServerDiscovered, resourceGroup, subscriptionId
263+
| join kind= leftouter (
264+
resources
265+
| where type == "microsoft.hybridcompute/machines/extensions" | where properties.type in ("WindowsAgent.SqlServer","LinuxAgent.SqlServer")
266+
| extend machineIdHasSQLServerExtensionInstalled = iff(id contains "/extensions/WindowsAgent.SqlServer" or id contains "/extensions/LinuxAgent.SqlServer", substring(id, 0, indexof(id, "/extensions/")), "")
267+
| project Extension_State = properties.provisioningState,
262268
License_Type = properties.settings.LicenseType,
263-
ESU_enabled = properties.settings.enableExtendedSecurityUpdates,
264-
Message = properties.instanceView.status.message,
265-
Version = properties.instanceView.typeHandlerVersion,
266-
Exlcuded_instaces = properties.ExcludedSqlInstances,
267-
iff(notnull(properties.settings.ExternalPolicyBasedAuthorization),"Purview enabled",""),
268-
iff(notnull(properties.settings.AzureAD),"Azure AD enabled",""),
269-
iff(notnull(properties.settings.AssessmentSettings),"BPA enabled","")
270-
269+
ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), iff(properties.settings.enableExtendedSecurityUpdates == true,"enabled","disabled"), ""),
270+
Extension_Version = properties.instanceView.typeHandlerVersion,
271+
Excluded_instances = properties.ExcludedSqlInstances,
272+
Purview = iff(notnull(properties.settings.ExternalPolicyBasedAuthorization),"enabled",""),
273+
Entra = iff(notnull(properties.settings.AzureAD),"enabled",""),
274+
BPA = iff(notnull(properties.settings.AssessmentSettings),"enabled",""),
275+
machineIdHasSQLServerExtensionInstalled)on $left.machineIdHasSQLServerDiscovered == $right.machineIdHasSQLServerExtensionInstalled
276+
| where isnotempty(machineIdHasSQLServerExtensionInstalled)
277+
| project-away machineIdHasSQLServerDiscovered, machineIdHasSQLServerExtensionInstalled
271278
```
272279

273280
#### List Arc-enabled servers with SQL Server

0 commit comments

Comments
 (0)