Skip to content

Commit f3b4d89

Browse files
committed
Learn Editor: Update manage-configuration.md
1 parent 8bb3f54 commit f3b4d89

1 file changed

Lines changed: 24 additions & 13 deletions

File tree

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

Lines changed: 24 additions & 13 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,30 @@ 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,
262-
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-
261+
| where type == "microsoft.hybridcompute/machines"
262+
| where properties.detectedProperties.mssqldiscovered == "true"
263+
| extend machineIdHasSQLServerDiscovered = id
264+
| project name, machineIdHasSQLServerDiscovered, resourceGroup, subscriptionId
265+
| join kind= leftouter (
266+
    resources
267+
    | where type == "microsoft.hybridcompute/machines/extensions"
268+
    | where properties.type in ("WindowsAgent.SqlServer","LinuxAgent.SqlServer")
269+
    | extend machineIdHasSQLServerExtensionInstalled = iff(id contains "/extensions/WindowsAgent.SqlServer" or id contains "/extensions/LinuxAgent.SqlServer", substring(id, 0, indexof(id, "/extensions/")), "")
270+
    | project Extenstion_State = properties.provisioningState,
271+
    License_Type = properties.settings.LicenseType,
272+
    ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), iff(properties.settings.enableExtendedSecurityUpdates == true,"enabled","disabled"), ""),
273+
    Extension_Version = properties.instanceView.typeHandlerVersion,
274+
    Exlcuded_instaces = properties.ExcludedSqlInstances,
275+
    Purview = iff(notnull(properties.settings.ExternalPolicyBasedAuthorization),"enabled",""),
276+
    Entra = iff(notnull(properties.settings.AzureAD),"enabled",""),
277+
    BPA = iff(notnull(properties.settings.AssessmentSettings),"enabled",""),
278+
    machineIdHasSQLServerExtensionInstalled)
279+
on $left.machineIdHasSQLServerDiscovered == $right.machineIdHasSQLServerExtensionInstalled
280+
| where isnotempty(machineIdHasSQLServerExtensionInstalled)
281+
| project-away machineIdHasSQLServerDiscovered, machineIdHasSQLServerExtensionInstalled
271282
```
272283

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

0 commit comments

Comments
 (0)