From 84b5cce0733f5671182bc249ca92c64700ce2e85 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Thu, 20 Aug 2020 14:47:52 -0400 Subject: [PATCH 1/4] Update SQLAssessmentAPITutorialNotebook.ipynb Removed unnecessary foreach loop after confirming with Aleksei. --- .../notebooks/SQLAssessmentAPITutorialNotebook.ipynb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb index 1fe0c8b2..0aa64bd7 100644 --- a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb +++ b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb @@ -352,12 +352,8 @@ "# This approach leverages the Registered Servers feature of SSMS to obtain a list of SQL Servers, and run checks against them.\r\n", "Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Database Engine Server Group' | \r\n", "Where-Object { $_.mode -ne 'd'} | \r\n", - "foreach \r\n", - " {\r\n", - " Get-SqlInstance -ServerInstance $_.Name |\r\n", - " Invoke-SqlAssessment -FlattenOutput |\r\n", - " Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n", - " }" + "Invoke-SqlAssessment -FlattenOutput |\r\n", + "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force" ], "metadata": { "azdata_cell_guid": "3a0c510d-07c7-464b-8b0a-2152df24e237" @@ -372,8 +368,7 @@ "Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Central Management Server Group' -Recurse | \r\n", "Where-Object { $_.mode -ne 'd'} | \r\n", "Invoke-SqlAssessment -FlattenOutput |\r\n", - "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n", - "" + "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force" ], "metadata": { "azdata_cell_guid": "c6ca3196-b661-46b4-9818-502c779742ab" From 5ec2a4b8bed2624d7880d88e90efc16269b9eaf8 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Thu, 20 Aug 2020 14:53:20 -0400 Subject: [PATCH 2/4] Update SQLAssessmentAPIQuickStartNotebook.ipynb Moved link to second notebook higher, to make it more obvious how to continue this learning path. --- .../notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb index 40724df1..0f389147 100644 --- a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb +++ b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb @@ -103,9 +103,9 @@ "source": [ "### Learn more about SQL Assessment API\r\n", "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", + "- Continue learning more about SQL Assessments with the ➡ [SQL Assessment API Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)\r\n", "- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview \r\n", - "- GitHub repo: http://aka.ms/sql-assessment-api\r\n", - "- SQL Assessment API [Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)" + "- GitHub repo: http://aka.ms/sql-assessment-api" ], "metadata": { "azdata_cell_guid": "180b3a6d-1dab-4641-acd4-dc319e81ef1f" From cc157bba00193c6c39fe5c6a74f3515470e5b1f8 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Thu, 20 Aug 2020 14:47:52 -0400 Subject: [PATCH 3/4] Update SQLAssessmentAPITutorialNotebook.ipynb Removed unnecessary foreach loop after confirming with Aleksei. --- .../notebooks/SQLAssessmentAPITutorialNotebook.ipynb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb index 1fe0c8b2..0aa64bd7 100644 --- a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb +++ b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb @@ -352,12 +352,8 @@ "# This approach leverages the Registered Servers feature of SSMS to obtain a list of SQL Servers, and run checks against them.\r\n", "Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Database Engine Server Group' | \r\n", "Where-Object { $_.mode -ne 'd'} | \r\n", - "foreach \r\n", - " {\r\n", - " Get-SqlInstance -ServerInstance $_.Name |\r\n", - " Invoke-SqlAssessment -FlattenOutput |\r\n", - " Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n", - " }" + "Invoke-SqlAssessment -FlattenOutput |\r\n", + "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force" ], "metadata": { "azdata_cell_guid": "3a0c510d-07c7-464b-8b0a-2152df24e237" @@ -372,8 +368,7 @@ "Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Central Management Server Group' -Recurse | \r\n", "Where-Object { $_.mode -ne 'd'} | \r\n", "Invoke-SqlAssessment -FlattenOutput |\r\n", - "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n", - "" + "Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force" ], "metadata": { "azdata_cell_guid": "c6ca3196-b661-46b4-9818-502c779742ab" From 9cb55bedea0e8e75677cf01c8d04ed85cd44d484 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Thu, 20 Aug 2020 14:53:20 -0400 Subject: [PATCH 4/4] Update SQLAssessmentAPIQuickStartNotebook.ipynb Moved link to second notebook higher, to make it more obvious how to continue this learning path. --- .../notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb index 40724df1..0f389147 100644 --- a/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb +++ b/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPIQuickStartNotebook.ipynb @@ -103,9 +103,9 @@ "source": [ "### Learn more about SQL Assessment API\r\n", "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", + "- Continue learning more about SQL Assessments with the ➡ [SQL Assessment API Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)\r\n", "- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview \r\n", - "- GitHub repo: http://aka.ms/sql-assessment-api\r\n", - "- SQL Assessment API [Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)" + "- GitHub repo: http://aka.ms/sql-assessment-api" ], "metadata": { "azdata_cell_guid": "180b3a6d-1dab-4641-acd4-dc319e81ef1f"