你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询。
各重点领域的 SQL 建议
统计各重点领域中的所有 SQL 建议。
SQLAssessmentRecommendation
| summarize AggregatedValue = count() by FocusArea
计算机提供的 SQL 建议
按计算机统计失败的 SQL 建议数量。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by Computer
各实例的 SQL 建议
按实例统计失败的 SQL 建议数量。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by SqlInstanceName
数据库的 SQL 建议
按数据库统计失败的 SQL 建议数量。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by DatabaseName
SQL 建议(按 AffectedObjectType)
按受影响的对象类型统计失败的 SQL 建议数量。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by AffectedObjectType
每个唯一 SQL 建议触发了多少次?
结果为失败的 SQL 建议计数(按建议)。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by Recommendation
高优先级 SQL 评估建议
按建议 ID 统计失败的最新高优先级安全建议数量。
SQLAssessmentRecommendation
| where FocusArea == 'Security and Compliance' and RecommendationResult == 'Failed' and RecommendationScore>=35
| summarize arg_max(TimeGenerated, *) by RecommendationId