mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Removed DR from filter for MI
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
"TenantID","SubID","ResourceName","ResourceType","Status","OriginalLicenseType","ResourceGroup","Location"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","SQL2012EEArc","Microsoft.SqlVirtualMachine/sqlVirtualMachines","VM running","AHUB","ajayj","westus2"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","SQL2022EE","Microsoft.SqlVirtualMachine/sqlVirtualMachines","VM running","AHUB","ajayj","westus2"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","sql2022rtm","Microsoft.SqlVirtualMachine/sqlVirtualMachines","VM running","AHUB","ajayj","westus2"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","sql2025devstd","Microsoft.SqlVirtualMachine/sqlVirtualMachines","VM running","AHUB","ajayj","westus2"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","ajayjsqlmi","Microsoft.Sql/managedInstances","Ready","BasePrice","ajayj","westus2"
|
||||
"72f988bf-86f1-41af-91ab-2d7cd011db47","fa58cf66-caaf-4ba9-875d-f310d3694845","AdventureworksLT","Microsoft.Sql/servers/databases","Online","BasePrice","ajayj","westus2"
|
||||
|
+3
-3
@@ -335,13 +335,13 @@ foreach ($sub in $subscriptions) {
|
||||
Write-Error "An error occurred while updating SQL VMs: $_"
|
||||
}
|
||||
|
||||
# --- Section: Update SQL Managed Instances (Stopped then Ready) "hybridSecondaryUsage": "Passive"---
|
||||
# --- Section: Update SQL Managed Instances (Stopped then Ready) "
|
||||
$sqlMIsToUpdate = [System.Collections.ArrayList]::new()
|
||||
try {
|
||||
|
||||
|
||||
# Build Managed Instance query
|
||||
$miRunningQuery = "[?licenseType!='${LicenseType}' && licenseType!='DR' && hybridSecondaryUsage!='Passive' && state=='Ready'"
|
||||
$miRunningQuery = "[?licenseType!='${LicenseType}' && state=='Ready'"
|
||||
|
||||
# Add resource group filter if specified
|
||||
if ($rgFilter) {
|
||||
@@ -621,7 +621,7 @@ foreach ($sub in $subscriptions) {
|
||||
Write-Output "Searching for SQL Instance Pools that require a license update..."
|
||||
|
||||
# Build instance pool query (skip the passive replicas)
|
||||
$instancePoolsQuery = "[?licenseType!='${LicenseType}' && licenseType!='DR' && hybridSecondaryUsage!='Passive' && state=='Ready'"
|
||||
$instancePoolsQuery = "[?licenseType!='${LicenseType}' && state=='Ready'"
|
||||
|
||||
# Add resource group filter if specified
|
||||
if ($rgFilter) {
|
||||
|
||||
Reference in New Issue
Block a user