Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
"enabled": false
}
]
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@
]
}
}

13 changes: 13 additions & 0 deletions samples/manage/sql-assessment-api/QueryStoreCheck_fix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"checks":[
{
"id": "SqlServer.Database.QueryStoreOn",
"target":{
"type": "Database",
"version": "[13.0,)",
"platform": "Windows",
"name": { "not": "/^(master|tempdb)$/" }
}
}
]
}
10 changes: 10 additions & 0 deletions samples/manage/sql-assessment-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,13 @@ Demonstrates how to make a custom rule set containing two checks. The sample con
]
}
```

## QueryStoreCheck_fix.json

Overrides the default ruleset to fix the rule "Query Store should be on." Query Store appeared in SQL Server 2016 but the rule checks for it starting with SQL Server 2014.

Here's an example of applying the fix to running the InvokeSqlAssessment cmdlet.

```PowerShell
Get-SqlInstance -ServerInstance 'localhost' | Get-SqlDatabase | Invoke-SqlAssessment -configuration "C:\SQLAssessment\QueryStore_fix.json"
```