Skip to content

Commit b6e7c25

Browse files
authored
Merge pull request #789 from altanatsedenova/master
Update SQL Assessment folder for July release
2 parents 0900969 + 19754f9 commit b6e7c25

10 files changed

Lines changed: 6007 additions & 1645 deletions

File tree

samples/manage/sql-assessment-api/DefaultRuleset.csv

Lines changed: 182 additions & 202 deletions
Large diffs are not rendered by default.

samples/manage/sql-assessment-api/MakingCustomChecks_sample.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"target": {
88
"type": "Database",
99
"version": "[13.0,)",
10-
"platform": "/^(Windows|Linux)$/",
10+
"platform": "Windows, Linux",
1111
"engineEdition": "OnPremises, ManagedInstance",
1212
"name": { "not": "/^(master|tempdb|model)$/" }
1313
},
@@ -26,7 +26,7 @@
2626
{
2727
"target": {
2828
"type": "Server",
29-
"platform": "/^(Windows|Linux)$/",
29+
"platform": "Windows, Linux",
3030
"engineEdition": "OnPremises"
3131
},
3232
"id": "Custom_TF834",
@@ -60,7 +60,7 @@
6060
"target": {
6161
"type": "Database",
6262
"version": "(,12.0)",
63-
"platform": "/^(Windows|Linux)$/",
63+
"platform": "Windows, Linux",
6464
"engineEdition": "OnPremises, ManagedInstance"
6565
},
6666
"implementation": {
@@ -72,7 +72,7 @@
7272
"target": {
7373
"type": "Database",
7474
"version": "[12.0, 13.0)",
75-
"platform": "/^(Windows|Linux)$/",
75+
"platform": "Windows, Linux",
7676
"engineEdition": "OnPremises, ManagedInstance"
7777
},
7878
"implementation": {
@@ -84,7 +84,7 @@
8484
"target": {
8585
"type": "Database",
8686
"version": "[13.0,)",
87-
"platform": "/^(Windows|Linux)$/",
87+
"platform": "Windows, Linux",
8888
"engineEdition": "OnPremises, ManagedInstance"
8989
},
9090
"implementation": {

samples/manage/sql-assessment-api/QuickStart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You will see in the results that each rule has some properties (not the full lis
2828
- Message property explains the recommendation but if you need more info, there is a HelpLink property that points at documentation on the subject.
2929
- Origin shows which ruleset and version the recommendation is coming from
3030

31-
See [config.json](./config.json) for a full list of rules and properties.
31+
See [ruleset.json](./ruleset.json) for a full list of rules and properties.
3232

3333
If you want to get recommendations for all databases on the local instance, run this command.
3434

@@ -42,4 +42,4 @@ To learn more about SQL Assessment API such as customizing and extending the rul
4242

4343
- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview
4444
- GitHub repo: http://aka.ms/sql-assessment-api
45-
- SQL Assessment API Tutorial notebook: coming soon
45+
- SQL Assessment API Tutorial notebook: [SQLAssessmentAPITutorialNotebook.ipynb](./notebooks/SQLAssessmentAPITutorialNotebook.ipynb)

samples/manage/sql-assessment-api/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ SQL Assessment API provides a mechanism to evaluate the configuration of your SQ
44

55
Learn more about the API on the [SQL Assessment API docs page](https://docs.microsoft.com/en-us/sql/sql-assessment-api/sql-assessment-api-overview).
66

7+
If you are into Azure Data Studio, you can evaluate your SQL Server right from it. Learn about SQL Assessment ADS extension [here](https://techcommunity.microsoft.com/t5/sql-server/released-sql-server-assessment-extension-for-azure-data-studio/ba-p/1470603).
8+
79
## QuickStart.md
810

911
Learn how to assess your SQL Server configuration for best practices in 2 simple steps.
1012

11-
## config.json
13+
## ruleset.json
1214

1315
This is the default set of rules shipped with SQL Assessment API. Feel free to open issues to have us fix or add rules. Also, we're happy to see your pull requests to this file.
1416

@@ -34,7 +36,7 @@ Demonstrates how to make a custom ruleset containing two checks. The sample cont
3436
"type": "Database", //This check targets Database object
3537
"version": "[13.0,)", //Applies to SQL Server 2016 and higher
3638
//Another example: "[12.0,13.0)" reads as "any SQL Server version >= 12.0 and < 13.0"
37-
"platform": "/^(Windows|Linux)$/", //Applies to SQL Server on Windows and Linux
39+
"platform": "Windows, Linux", //Applies to SQL Server on Windows and Linux
3840
"engineEdition": "OnPremises, ManagedInstance", //Applies to SQL on Premises and Azure SQL Managed Instance. Here you can also filter specific editions of SQL Server
3941
"name": { "not": "/^(master|tempdb|model)$/" } //Applies to any database excluding master, tempdb, and msdb
4042
},
@@ -67,7 +69,7 @@ Demonstrates how to make a custom ruleset containing two checks. The sample cont
6769
"target": { //Probes have their own target, usually to separate implementation for different versions, editions, or platforms. Probe targets work the same way as rule targets do.
6870
"type": "Database",
6971
"version": "(,12.0)", //This target is for SQL Server of versions prior to 2014
70-
"platform": "/^(Windows|Linux)$/",
72+
"platform": "Windows, Linux",
7173
"engineEdition": "OnPremises, ManagedInstance"
7274
},
7375
"implementation": { //Implementation object with a T-SQL query. This probe is used in many rules, that's why the query return so many fields
@@ -79,7 +81,7 @@ Demonstrates how to make a custom ruleset containing two checks. The sample cont
7981
"target": {
8082
"type": "Database",
8183
"version": "[12.0, 13.0)",
82-
"platform": "/^(Windows|Linux)$/",
84+
"platform": "Windows, Linux",
8385
"engineEdition": "OnPremises, ManagedInstance"
8486
},
8587
"implementation": {
@@ -91,7 +93,7 @@ Demonstrates how to make a custom ruleset containing two checks. The sample cont
9193
"target": {
9294
"type": "Database",
9395
"version": "[13.0,)",
94-
"platform": "/^(Windows|Linux)$/",
96+
"platform": "Windows, Linux",
9597
"engineEdition": "OnPremises, ManagedInstance"
9698
},
9799
"implementation": {

samples/manage/sql-assessment-api/notebooks/CustomizationSamples/CustomRuleCLRProbe.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"probes":{
66
"ManagedCodeRuleProbe": [
77
{
8-
"type": "CLR",
8+
"type": "External",
99
"target": {
1010
"type": "Server"
1111
},
1212
"implementation": {
13-
"class": "TestsProbeLibrary.Probe1",
13+
"class": "TestsProbeLibrary.Probe2",
1414
"assembly": "C:\\SQLAsmnt\\CustomizationSamples\\TestsProbeLibrary.dll"
1515
}
1616
}
@@ -27,11 +27,11 @@
2727
"itemType": "definition",
2828
"displayName": "Check uses 3rd-party assembly",
2929
"description": "This is an example of a check using an assembly to get required data.",
30-
"message": "Method from the assembly returned a number greater than the threshold: @{QueryResult} > @{threshold}.",
30+
"message": "Method from the assembly returned a number greater than the threshold: @{ActualCpuUtilization} > @{threshold}.",
3131
"target": { "type": "Server" },
3232
"probes": ["ManagedCodeRuleProbe"],
3333
"threshold": 83,
34-
"condition": { "less": ["@QueryResult", "@threshold"] }
34+
"condition": { "less": ["@ActualCpuUtilization", "@threshold"] }
3535
}
3636
]
3737
}
Binary file not shown.

samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"Supported products and platforms: SQL Server 2012 and up, both on Windows and Linux. Azure SQL DB Managed Instance. More products to come.\n",
2929
"\n",
30-
"Microsoft ruleset ([config.json](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/config.json)) is published on SQL Assessment API GitHub repo and continuously improved.\n",
30+
"Microsoft ruleset ([ruleset.json](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/ruleset.json)) is published on SQL Assessment API GitHub repo and continuously improved.\n",
3131
"\n",
3232
"Useful links at the bottom of the tutorial."
3333
],
@@ -239,7 +239,7 @@
239239
"source": [
240240
"### 4. Browse applicable rules\r\n",
241241
"\r\n",
242-
"The full Microsoft ruleset is in [config.json](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/config.json) in the GitHub repo. If you want to list the rules that apply to a particular instance or database, you can use Get-SqlAssessmentItem cmdlet. Below are some different ways of listing the rules."
242+
"The full Microsoft ruleset is in [ruleset.json](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/ruleset.json) in the GitHub repo. If you want to list the rules that apply to a particular instance or database, you can use Get-SqlAssessmentItem cmdlet. Below are some different ways of listing the rules."
243243
],
244244
"metadata": {
245245
"azdata_cell_guid": "97414396-2557-44c4-80e2-5afa6a5a5516"
@@ -508,4 +508,4 @@
508508
}
509509
}
510510
]
511-
}
511+
}
-198 KB
Binary file not shown.

samples/manage/sql-assessment-api/release-notes.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,63 @@
11
# Release notes for SQL Assessment API
22

3-
This article provides details about updates, improvements, and bug fixes for the current and previous versions of SQL Assessment API. SQL Assessment API is part of the SQL Server Management Objects (SMO) and the SQL Server PowerShell module. Install one of them or both to start working with the API.
3+
This article provides details about updates, improvements, and bug fixes for the current and previous versions of SQL Assessment API. SQL Assessment API is part of the SQL Server Management Objects (SMO) and the SQL Server PowerShell module. To start working with the API, install the SQL Assessment Extention to Azure Data Studio or utilize either the SqlServer module or SMO.
4+
5+
Installing SQL Assessment Extension: [SQL Server Assessment Extension for Azure Data Studio (Public Preview)](https://techcommunity.microsoft.com/t5/sql-server/released-sql-server-assessment-extension-for-azure-data-studio/ba-p/1470603)
46

57
Download: [Download SqlServer module](https://www.powershellgallery.com/packages/SqlServer)
68

79
Download: [SMO NuGet Package](https://www.nuget.org/packages/Microsoft.SqlServer.SqlManagementObjects)
810

911
You can use GitHub issues to provide feedback to the product team.
1012

13+
## July 2020 - 21.1.18226
14+
15+
Version: SqlServer module 21.1.18226, SqlManagementObjects (SMO) package wasn't updated
16+
17+
### What's new
18+
19+
- Added new types of probes in addition to SQL and EXTERNAL: CMDSHELL, WMI, REGISTRY, POWERSHELL
20+
- Enabling/disabling database checks for particular SQL Server instances (by instance name)
21+
- Added 40 rules, including
22+
- Ad Hoc Distributed Queries are enabled
23+
- Affinity Mask and Affinity I/O Mask overlapping
24+
- Auto Soft NUMA should be enabled
25+
- Blocking chains
26+
- Blocked Process Threshold is set to recommended value
27+
- Option 'cross db ownership chaining' should be disabled
28+
- Default trace enabled
29+
- Disk Partition alignment
30+
- Full-text search option 'load_os_resources' set to default
31+
- Full-text search option 'verify_signature' set to default
32+
- HP Logical Processor issue
33+
- Option 'index create memory' value should be greater 'min memory per query'
34+
- Lightweight pooling option disabled
35+
- Option 'locks' should be set to default
36+
- Option 'min memory per query' set to default
37+
- Option 'network packet size' set to default
38+
- NTFS block size in volumes that hold database files <> 64KB
39+
- Option 'Ole Automation Procedures' set to default
40+
- Page file is not automatically managed
41+
- Insufficient page file free space
42+
- Page file configured
43+
- Memory paged out
44+
- Power plan is High Performance
45+
- Option 'priority boost' set to default
46+
- Option 'query wait' set to default
47+
- Option 'recovery interval' set to default
48+
- Remote admin connections enabled on cluster (DAC)
49+
- Option 'remote query timeout' set to default
50+
- Option 'scan for startup procs' disabled on replication servers
51+
- Worker thread exhaustion on CPU-bound system
52+
- Possible worker thread exhaustion on a not-CPU-bound system
53+
- Option 'cost threshold for parallelism' set to default
54+
- Option 'max worker threads' set to recommended value on x64 system
55+
- Option 'max worker threads' set to recommended value on x86 system
56+
- Option 'xp_cmdshell' is disabled
57+
1158
## March 2020 - 21.1.18221
1259

13-
Version: SqlServer module 21.1.18221, SqlManagementObjects (SMO) package wasn't updated
60+
Version: SqlServer module 21.1.18221, SqlManagementObjects (SMO) package 160.2004021.0
1461

1562
### What's new
1663

0 commit comments

Comments
 (0)