通过


通过使用迁移仪表板跟踪迁移过程 - 启用了 Azure Arc 的 SQL Server

applies to:SQL Server

迁移仪表板是一个方便的视图,显示所有通过 Azure Arc 启用并具有迁移就绪性的 SQL Server 实例。 由Azure Arc启用的SQL Server会自动生成迁移到Azure的评估。 此评估对于云迁移和现代化旅程的成功具有至关重要的作用。 使用此仪表板,可以大规模跟踪迁移过程。 就绪情况将作为属性投影到Azure管理平面中,这允许使用本机Azure的组织、标记和查询功能。

仪表板提供:

  • 已发现SQL Server实例和数据库的概述。
  • 使用生成的评估结果对SQL Server实例进行概述。
  • 每个Azure SQL产品的迁移就绪情况摘要。
  • 丰富的筛选功能,可用于根据需求定制视图。

审查迁移评估

可以通过以下方式访问迁移仪表板:

  • 在Azure门户中,搜索 Azure Arc并转到Azure Arc中心。
  • 在左窗格中,展开 数据服务 并转到 SQL 服务器
  • 选择 “迁移仪表板 ”选项卡。

显示由 Azure Arc 启用的 SQL Server 迁移仪表板的屏幕截图

已发现的SQL Server实例和数据库的概述

仪表板的第一部分概述了可访问的所有SQL Server实例和数据库。 还可以按版本和版本号查看实例的分布情况。

截图显示迁移仪表板,展示了 SQL Server 实例、数据库,以及按版本和版本分布的情况。

SQL Server迁移评估摘要

仪表板的此部分概述了Azure Arc启用的SQL Server实例的迁移评估和迁移准备情况。可以看到有多少实例具有可用的评估。 每个Azure SQL产品的迁移准备情况单独显示。

截图显示了迁移仪表板,概述了针对 Azure SQL 产品的实例和数据库的迁移评估及准备情况。

Azure Resource Graph 查询

Azure Resource Graph提供高效且高性能的方法,用于查询Azure Arc启用的SQL Server实例的就绪性属性。下面是一些示例查询。

resources
 | where type == 'microsoft.azurearcdata/sqlserverinstances'
 | where properties.migration.assessment.assessmentUploadTime > ago(14d) and properties.migration.assessment.enabled == true and isnotnull(parse_json(properties.migration.assessment.skuRecommendationResults))
 | extend azureSqlDatabaseRecommendationStatus = tostring(properties.migration.assessment.skuRecommendationResults.azureSqlDatabase.recommendationStatus)
 | extend azureSqlManagedInstanceRecommendationStatus = tostring(properties.migration.assessment.skuRecommendationResults.azureSqlManagedInstance.recommendationStatus)
 | extend azureSqlVirtualMachineRecommendationStatus = tostring(properties.migration.assessment.skuRecommendationResults.azureSqlVirtualMachine.recommendationStatus)
 | extend serverAssessments = tostring(properties.migration.assessment.serverAssessments)
 | extend subscriptionId = extract(@"/subscriptions/([^/]+)", 1, id)
 | extend resourceGroup = extract(@"/resource[g/G]roups/([^/]+)", 1, id)
 | mv-expand platformStatus = pack_array(
     pack("platform", "Azure SQL Database", "status", azureSqlDatabaseRecommendationStatus),
     pack("platform", "Azure SQL Managed Instance", "status", azureSqlManagedInstanceRecommendationStatus),
     pack("platform", "Azure SQL Virtual Machine", "status", azureSqlVirtualMachineRecommendationStatus)
   )
 | extend platformIncludedString = strcat('"AppliesToMigrationTargetPlatform":', strcat('"', replace(" ", "", tolower(tostring(platformStatus["platform"]))), '"'))
 | extend platformHasIssues = tolower(serverAssessments) has tolower(platformIncludedString)
 | project Platform = tostring(platformStatus["platform"]), status = tostring(platformStatus["status"]), tostring(serverAssessments), id, platformHasIssues
 | extend finalStatus = case(
     status == "Ready" and platformHasIssues, "Ready with Conditions",
     status == "Ready", "Ready",
     status == "NotReady", "NotReady",
     isnull(status) or status !in ("Ready", "NotReady", "Ready with Conditions"), "Unknown",
     "Unknown")
 | summarize TotalAssessed = count(), Ready = countif(finalStatus == "Ready"), NotReady = countif(finalStatus == "NotReady"),
     ReadyWithConditions = countif(finalStatus == "Ready with Conditions"), Unknown = countif(finalStatus == "Unknown")
     by Platform
az graph query -q "resources | where type =~ 'microsoft.hybridcompute/machines' | extend machineId = tolower(tostring(id)), datacenter = iif(isnull(tags.Datacenter), '', tags.Datacenter), status = tostring(properties.status) | extend mssqlinstalled = coalesce(tobool(properties.detectedProperties.mssqldiscovered),false) | extend pgsqlinstalled = coalesce(tobool(properties.detectedProperties.pgsqldiscovered),false) | extend mysqlinstalled = coalesce(tobool(properties.detectedProperties.mysqldiscovered),false) | extend osSku = properties.osSku, osName = properties.osName, osVersion = properties.osVersion | extend coreCount = tostring(properties.detectedProperties.logicalCoreCount), totalPhysicalMemoryinGB = tostring(properties.detectedProperties.totalPhysicalMemoryInGigabytes)  | extend operatingSystem = iif(isnotnull(osSku), osSku, osName) | where mssqlinstalled or mysqlinstalled or pgsqlinstalled | project id ,name, type, resourceGroup, subscriptionId, location, kind, osVersion, status, osSku,coreCount,totalPhysicalMemoryinGB,tags, mssqlinstalled, mysqlinstalled, pgsqlinstalled | sort by (tolower(tostring(name))) asc"