mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Adding QuickStart.md and updating readme
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# SQL Assessment API Quick Start Guide
|
||||
|
||||
Assess your SQL Server configuration for best practices in 2 simple steps.
|
||||
|
||||
### 1. Setup
|
||||
|
||||
You just need to install PowerShell SqlServer module using the following command. Get-Module will show you the version you have installed. 21.2.18179 is the latest version and CTP2 for SQL Assessment API.
|
||||
|
||||
```PowerShell
|
||||
Install-Module -Name SqlServer -AllowClobber -Force
|
||||
Get-Module
|
||||
```
|
||||
|
||||
### 2. Invoke an assessment
|
||||
|
||||
This command runs an assessment against your local SQL Server instance.
|
||||
|
||||
```PowerShell
|
||||
Get-SqlInstance -ServerInstance 'localhost' | Invoke-SqlAssessment
|
||||
```
|
||||
|
||||
Sample result:
|
||||

|
||||
|
||||
You will see in the results that each rule has some properties (not the full list):
|
||||
|
||||
- Severity (info, warning, critical)
|
||||
- Message property explains the recommendation but if you need more info, there is a HelpLink property that points at documentation on the subject.
|
||||
- Origin shows which ruleset and version the recommendation is coming from
|
||||
|
||||
See config.json for a full list of rules and properties.
|
||||
|
||||
If you want to get recommendations for all databases on the local instance, you can run this command.
|
||||
|
||||
```PowerShell
|
||||
Get-SqlDatabase -ServerInstance 'localhost' | Invoke-SqlAssessment
|
||||
```
|
||||
|
||||
## Learn more about SQL Assessment API
|
||||
|
||||
To learn more about SQL Assessment API such as customizing and extending the ruleset, saving the results in a table, etc., please visit:
|
||||
|
||||
- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview
|
||||
- GitHub repo: http://aka.ms/sql-assessment-api
|
||||
- SQL Assessment API Tutorial notebook: coming soon
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
Contains samples for customizing SQL Assessment API. 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).
|
||||
|
||||
## QuickStart.md
|
||||
|
||||
Learn how to assess your SQL Server configuration for best practices in 2 simple steps.
|
||||
|
||||
## config.json
|
||||
|
||||
This is the default set of checks shipped with SQL Assessment API. Feel free to open issues to have us fix or add checks. Also, we're happy to see your pull requests to this file.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 460 KiB |
Reference in New Issue
Block a user