Skip to content

Commit f666b30

Browse files
authored
Merge pull request #805 from SQLvariant/update-LinkToNotebook
Update SQLAssessmentAPIQuickStartNotebook.ipynb
2 parents 539ff2a + 64cd4f3 commit f666b30

2 files changed

Lines changed: 52 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"To learn more about SQL Assesment API such as customizing and extending the rule set, saving the results in a table, etc., please visit:\r\n",
106106
"- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview \r\n",
107107
"- GitHub repo: http://aka.ms/sql-assessment-api\r\n",
108-
"- SQL Assessment API Tutorial notebook: coming soon"
108+
"- SQL Assessment API [Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)"
109109
],
110110
"metadata": {
111111
"azdata_cell_guid": "180b3a6d-1dab-4641-acd4-dc319e81ef1f"

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

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,56 @@
331331
"outputs": [],
332332
"execution_count": 38
333333
},
334+
{
335+
"cell_type": "markdown",
336+
"source": [
337+
"### 7. Scaling up your Checks\r\n",
338+
"Running checks across multiple machines and writng their results back to the same table in SQL Server. You can keep you list of SQL Servers to check anywhere you want, in a text file, in an Excel spreadsheet, in a table you maintain yourself, the options are endless.\r\n",
339+
"\r\n",
340+
"Two options are shown below show features availabile that can be managed from SSMS or Azure Data Studio, and can accessed via the `SQLSERVER:\\` Provider, which is part of the `SqlServer` module.\r\n",
341+
"\r\n",
342+
"1. Registered Servers is feature of SSMS and stores a list of SQL Server instances in a local XML file.\r\n",
343+
"2. Central Management Server relise on a SQL Server to maintain the list of SQL Server instances (instead of a _local XML file_) and is available in both SSMS & Azure Data Studio."
344+
],
345+
"metadata": {
346+
"azdata_cell_guid": "0ad9518f-e770-4819-b4d1-7f5608c793b3"
347+
}
348+
},
349+
{
350+
"cell_type": "code",
351+
"source": [
352+
"# This approach leverages the Registered Servers feature of SSMS to obtain a list of SQL Servers, and run checks against them.\r\n",
353+
"Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Database Engine Server Group' | \r\n",
354+
"Where-Object { $_.mode -ne 'd'} | \r\n",
355+
"foreach \r\n",
356+
" {\r\n",
357+
" Get-SqlInstance -ServerInstance $_.Name |\r\n",
358+
" Invoke-SqlAssessment -FlattenOutput |\r\n",
359+
" Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n",
360+
" }"
361+
],
362+
"metadata": {
363+
"azdata_cell_guid": "3a0c510d-07c7-464b-8b0a-2152df24e237"
364+
},
365+
"outputs": [],
366+
"execution_count": null
367+
},
368+
{
369+
"cell_type": "code",
370+
"source": [
371+
"<# This approach leverages the Central Management Server feature to obtain a list of SQL Servers #>\r\n",
372+
"Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Central Management Server Group' -Recurse | \r\n",
373+
"Where-Object { $_.mode -ne 'd'} | \r\n",
374+
"Invoke-SqlAssessment -FlattenOutput |\r\n",
375+
"Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n",
376+
""
377+
],
378+
"metadata": {
379+
"azdata_cell_guid": "c6ca3196-b661-46b4-9818-502c779742ab"
380+
},
381+
"outputs": [],
382+
"execution_count": null
383+
},
334384
{
335385
"cell_type": "markdown",
336386
"source": [
@@ -612,4 +662,4 @@
612662
}
613663
}
614664
]
615-
}
665+
}

0 commit comments

Comments
 (0)