Share via


SQLAssessmentRecommendation 數據表的查詢

依焦點區域的 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

AffectedObjectType 的 SQL 建議

依受影響的物件類型計算失敗結果的 SQL 建議。

SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by AffectedObjectType

每個唯一的 SQL 建議觸發程式有多少次?

依建議計算失敗結果的 SQL 建議。

SQLAssessmentRecommendation
| where RecommendationResult == "Failed"
| summarize AggregatedValue = count() by Recommendation

高優先順序 SQL 評定建議

建議標識碼失敗的結果為最新的高優先順序安全性建議。

SQLAssessmentRecommendation
| where FocusArea == 'Security and Compliance' and RecommendationResult == 'Failed' and RecommendationScore>=35
| summarize arg_max(TimeGenerated, *) by RecommendationId