SQLAssessmentRecommendation 表的查询
有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询。
计数各重点领域的所有 SQL 建议。
SQLAssessmentRecommendation
| summarize AggregatedValue = count() by FocusArea
计数各计算机的失败结果相关 SQL 建议。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by Computer
计数各实例的失败结果相关 SQL 建议。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by SqlInstanceName
计数各数据库的失败结果相关 SQL 建议。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by DatabaseName
计数各受影响对象类型的失败结果相关 SQL 建议。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by AffectedObjectType
计数各建议的失败结果相关 SQL 建议。
SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by Recommendation
各建议 ID 的失败结果相关最新高优先级安全建议。
SQLAssessmentRecommendation
| where FocusArea == 'Security and Compliance' and RecommendationResult == 'Failed' and RecommendationScore>=35
| summarize arg_max(TimeGenerated, *) by RecommendationId