From d00b4c2e3f05a94984ad578b5787b39a8226bb8f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 3 Jul 2020 13:25:07 +0300 Subject: [PATCH 001/553] Add warnings about End of Life SQL Server 2014 and 2012 --- Articles/README.md | 2 +- SQL Server Version.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 6d5f2ca3..60dde5b5 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -590,7 +590,7 @@ Articles types: | [SQL Server Brute Force Attack Detection: Part 2] | Ryan G Conrad | 2018-03-26 | [DBA] | | [SQL Server Brute Force Attack Detection: Part 3] | Ryan G Conrad | 2018-03-26 | [DBA] | | [SQLCLR vs SQL Server 2017, Part 8: Is SQLCLR Deprecated in Favor of Python or R (sp_execute_external_script)?] | Solomon Rutzky | 2018-08-09 | [DBA][DEV] | -| [Sql Server Agent For Azure Sql Database, Azure Elastic Database Pools & Azure Managed Instance] | ? | 2018-07-20 | [AZ] | +| [Sql Server Agent For Azure Sql Database, Azure Elastic Database Pools & Azure Managed Instance] | ? | 2018-07-20 | [AZ] | | [Storage performance best practices and considerations for Azure SQL DB Managed Instance (General Purpose)] | Dimitri Furman | 2018-07-20 | [AZ] | | [T-SQL Tuesday #017: APPLY: It Slices! It Dices! It Does It All!] | Brad Schulz | 2011-04-12 | [DEV] | | [SQL Server Encryption, What’s The Key Hierarchy All About?] | David Fowler | 2018-08-12 | [DBA][DEV] | diff --git a/SQL Server Version.md b/SQL Server Version.md index 48938e9c..1da9e3d3 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -723,6 +723,8 @@ Microsoft SQL Server 2016 (SP2-CU11) (KB4527378) - 13.0.5598.27 (X64) ## Microsoft SQL Server 2014 Builds +⚠ End-of-Life: SQL Server 2014 reached [end of mainstream support on July 9th, 2019](https://support.microsoft.com/en-us/lifecycle/search?alpha=SQL%20Server%202014%20Service%20Pack%203). + All SQL Server 2014 CU downloads: [Catalog Update Microsoft SQL Server 2014](http://www.catalog.update.microsoft.com/Search.aspx?q=sql%20server%202014) Here is the latest output from `SELECT @@VERSION` for SQL Server 2014 Developer Edition on Windows: @@ -927,6 +929,8 @@ Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64) ## Microsoft SQL Server 2012 Builds +⚠ End-of-Life: SQL Server 2012 reached [end of mainstream support on July 11th, 2017](https://support.microsoft.com/en-us/lifecycle/search?alpha=sql%20server%202012%20Service%20Pack%204). + All SQL Server 2012 CU downloads: [Catalog Update Microsoft SQL Server 2012](http://www.catalog.update.microsoft.com/Search.aspx?q=sql%20server%202012) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Fixes | Public | From 409ea60b264babceb385ecad08092bb1d2b6608d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 4 Jul 2020 14:23:55 +0300 Subject: [PATCH 002/553] Add SQL Server 2017 CU21 info --- SQL Server Version.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 1da9e3d3..37dcfca2 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -130,7 +130,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU5 KB4552255] | 15.0.2070.41
15.0.4043.16 | 2019-11-04
2020-06-22 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | -| 2017 | [Install 2017 RTM] then [CU20 KB4541283] | 14.0.1000.169
14.0.3294.2 | 2017-10-02
2020-04-07 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | +| 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU13 KB4549825] | 13.0.5026.0
13.0.5820.21 | 2018-04-24
2020-05-28 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4532098] | 11.0.2100.60
11.0.7001.0
11.0.7493.4 | 2012-02-14
2017-10-05
2020-02-11 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | @@ -140,7 +140,7 @@ Profits: [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install [CU5 KB4552255]:https://support.microsoft.com/help/4552255 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 -[CU20 KB4541283]:https://support.microsoft.com/help/4541283 +[CU21 KB4557397]:https://support.microsoft.com/help/4557397 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [CU13 KB4549825]:https://support.microsoft.com/help/4549825 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 @@ -179,7 +179,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | | [SQL Server 2019 CU5] | SQLServer2019-KB4552255-x64.exe | 2020-06-22 | 15.0.4043.16 | 603 | c6a0778132b00ced30f06ee61875d58d7a7a70b2 | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | -| [SQL Server 2017 CU20] | SQLServer2017-KB4541283-x64.exe | 2020-04-07 | 14.0.3294.2 | 530 | b0f1a8f63ba7e9c155546a49f18fd95bc5e9aeaa | +| [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | | [SQL Server 2016 SP2 CU13] | SQLServer2016-KB4549825-x64.exe | 2020-05-28 | 13.0.5820.21 | 748 | 5e5785ee0bf5444f7a57a6c559a1d9ef6b785860 | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | @@ -199,7 +199,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 [SQL Server 2019 CU5]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4552255-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 -[SQL Server 2017 CU20]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4541283-x64.exe +[SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [SQL Server 2016 SP2 CU13]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB4549825-x64.exe @@ -460,15 +460,16 @@ All SQL Server 2017 CU downloads: [Catalog Update Microsoft SQL Server 2017](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2017 Developer Edition: ``` -Microsoft SQL Server 2017 (RTM-CU20) (KB4541283) - 14.0.3294.2 (X64) - Mar 13 2020 14:53:45 +Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) + Jun 13 2020 14:53:45 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 14.0.3294.2 | 2017.140.3294.2 | RTM | CU | **Latest CU** | 4535007 | [Microsoft SQL Server 2017 CU20] | 2020-04-07 | 2020-03-14 | 40 | 36 | 530 | +| 14.0.3335.7 | 2017.140.3335.7 | RTM | CU | **Latest CU** | 4535007 | [Microsoft SQL Server 2017 CU21] | 2020-07-01 | 2020-06-13 | 35 | 33 | 533 | +| 14.0.3294.2 | 2017.140.3294.2 | RTM | CU | | 4541283 | [Microsoft SQL Server 2017 CU20] | 2020-04-07 | 2020-03-14 | 40 | 36 | 530 | | 14.0.3281.6 | 2017.140.3281.6 | RTM | CU | | 4535007 | [Microsoft SQL Server 2017 CU19] | 2020-02-05 | 2020-01-23 | 38 | 31 | 530 | | 14.0.3257.3 | 2017.140.3257.3 | RTM | CU | | 4527377 | [Microsoft SQL Server 2017 CU18] | 2019-12-09 | 2019-11-16 | 35 | 28 | 529 | | 14.0.3238.1 | 2017.140.3238.1 | RTM | CU | | 4515579 | [Microsoft SQL Server 2017 CU17] | 2019-10-01 | 2019-09-14 | 41 | 34 | 528 | @@ -509,6 +510,7 @@ Microsoft SQL Server 2017 (RTM-CU20) (KB4541283) - 14.0.3294.2 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Microsoft SQL Server 2017 CU21]:https://support.microsoft.com/help/4557397 [Microsoft SQL Server 2017 CU20]:https://support.microsoft.com/help/4541283 [Microsoft SQL Server 2017 CU19]:https://support.microsoft.com/help/4535007 [Microsoft SQL Server 2017 CU18]:https://support.microsoft.com/help/4527377 From e29911769ad45626a00039055e49418f70f3c8d6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 5 Jul 2020 14:31:45 +0300 Subject: [PATCH 003/553] Add Bad_Query_Example_13_JOINS script --- Scripts/Bad_Query_Example_13_JOINS.sql | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Scripts/Bad_Query_Example_13_JOINS.sql diff --git a/Scripts/Bad_Query_Example_13_JOINS.sql b/Scripts/Bad_Query_Example_13_JOINS.sql new file mode 100644 index 00000000..c12aebc0 --- /dev/null +++ b/Scripts/Bad_Query_Example_13_JOINS.sql @@ -0,0 +1,26 @@ +/* + + Generate complex query plan + Reads and writes per database. + 2020-06-23 by Brent Ozar + 2020-07-05 by Konstantin Taranov + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Bad_Query_Example_13_JOINS.sql + https://www.brentozar.com/archive/2020/06/bad-idea-jeans-building-big-query-plans/ + +*/ + + +DECLARE @TheRootOfAllEvil TABLE + (Id int PRIMARY KEY CLUSTERED); +WITH CTE1 AS (SELECT * FROM @TheRootOfAllEvil r1), +CTE2 AS (SELECT cA.* FROM CTE1 cA INNER JOIN CTE1 cB ON cA.Id = cB.Id), +CTE3 AS (SELECT cA.* FROM CTE2 cA INNER JOIN CTE2 cB ON cA.Id = cB.Id), +CTE4 AS (SELECT cA.* FROM CTE3 cA INNER JOIN CTE3 cB ON cA.Id = cB.Id), +CTE5 AS (SELECT cA.* FROM CTE4 cA INNER JOIN CTE4 cB ON cA.Id = cB.Id), +CTE6 AS (SELECT cA.* FROM CTE5 cA INNER JOIN CTE5 cB ON cA.Id = cB.Id), +CTE7 AS (SELECT cA.* FROM CTE6 cA INNER JOIN CTE6 cB ON cA.Id = cB.Id), +CTE8 AS (SELECT cA.* FROM CTE7 cA INNER JOIN CTE7 cB ON cA.Id = cB.Id), +CTE9 AS (SELECT cA.* FROM CTE8 cA INNER JOIN CTE8 cB ON cA.Id = cB.Id), +CTE10 AS (SELECT cA.* FROM CTE9 cA INNER JOIN CTE9 cB ON cA.Id = cB.Id) +SELECT * FROM CTE10; From 86cd562a4eee3e4a1b21be480457b797aee8b4ec Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 6 Jul 2020 15:29:00 +0300 Subject: [PATCH 004/553] Add new articles --- Articles/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 60dde5b5..19f9f8d3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1116,6 +1116,10 @@ Articles types: | [Improve SQL Server Extended Events system_health Session] | Aaron Bertrand | 2020-06-17 | [DBA][DEV] | | [Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It.] | Brent Ozar | 2020-06-17 | [DBA][DEV] | | [Unsupported but working versions of SQL Server on Windows Server 2019] | Randolph West | 2020-06-24 | [DBA][DEV] | +| [Bad Idea Jeans: Building Big Query Plans] | Brent Ozar | 2020-06-23 | [DBA][DEV] | +| [SQL Server performance tuning – RESOURCE_SEMAPHORE waits] | Timothy Smith | 2020-06-16 | [DBA][DEV] | +| [Use session_context to create a “variable” that lasts between batches.] | Kenneth Fisher | 2020-05-26 | [DBA][DEV] | +| [Phase out CONTEXT_INFO() in SQL Server 2016 with SESSION_CONTEXT()] | Aaron Bertrand | 2015-11-19 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2207,3 +2211,7 @@ Articles types: [Improve SQL Server Extended Events system_health Session]:https://www.mssqltips.com/sqlservertip/6456/improve-sql-server-extended-events-systemhealth-session/ [Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It.]:https://www.brentozar.com/archive/2020/06/page-life-expectancy-doesnt-mean-jack-and-you-should-stop-looking-at-it/ [Unsupported but working versions of SQL Server on Windows Server 2019]:https://bornsql.ca/blog/unsupported-but-working-versions-of-sql-server-on-windows-server-2019/ +[Bad Idea Jeans: Building Big Query Plans]:https://www.brentozar.com/archive/2020/06/bad-idea-jeans-building-big-query-plans/ +[SQL Server performance tuning – RESOURCE_SEMAPHORE waits]:https://www.sqlshack.com/sql-server-performance-tuning-resource_semaphore-waits/ +[Use session_context to create a “variable” that lasts between batches.]:https://sqlstudies.com/2020/05/26/use-session_context-to-create-a-variable-that-lasts-between-batches/ +[Phase out CONTEXT_INFO() in SQL Server 2016 with SESSION_CONTEXT()]:https://www.mssqltips.com/sqlservertip/4094/phase-out-contextinfo-in-sql-server-2016-with-sessioncontext/ From bc7c4c8db6b4fae964c2695d948ff48677c1637f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 7 Jul 2020 15:59:20 +0300 Subject: [PATCH 005/553] Add 41121 error --- Errors/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Errors/README.md b/Errors/README.md index c1a4c8dc..bb7b5a79 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -18,7 +18,7 @@ ```sql SELECT message_id, severity, text FROM sys.messages - WHERE language_id = 1033; -- assuming US English + WHERE language_id = 1033; /* assuming US English */ ``` Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.com/en-us/sql/relational-databases/system-compatibility-views/sys-syslanguages-transact-sql) system view, column `msglangid`: @@ -235,6 +235,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 35337 | UPDATE STATISTICS failed because statistics cannot be updated on a columnstore index. … | [35337_link1][33] | | 35343 | The statement failed. Column '%.*ls' has a data type that cannot participate in a columnstore index. | [35343_link1][36] | | 39004 | A '%s' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x%x. | [39004_link1][14] | +| 41121 | The local availability replica of availability group '%.*ls' cannot accept signal '%s' in its current …| [41121_link1] | | 41922 | The backup operation for a database with service-managed transaprent data encryption is not supported on…| [41922_link1] | [1]:https://sqlstudies.com/2018/05/16/the-trials-and-tribulations-of-reverting-from-impersonation/ @@ -365,4 +366,5 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [33111_link1]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ [35250_link1]:https://blog.sqlauthority.com/2017/05/18/sql-server-fix-msg-35250-level-16-state-7-connection-primary-replica-not-active-command-cannot-processed/ [35217_link1] :https://www.seangallardy.com/error-35217-and-availability-groups-smh/ +[41121_link1]:https://joshthecoder.com/2020/06/22/a-bug-with-ag-health-checks.html [41922_link1]:http://timradney.com/2020/05/23/updated-default-settings-for-azure-sql-managed-instance-databases/ From 51b3cb87197b89b291ade73a8cf928276adaddb4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 8 Jul 2020 16:18:18 +0300 Subject: [PATCH 006/553] Add new nice articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 19f9f8d3..27d42f78 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1120,6 +1120,9 @@ Articles types: | [SQL Server performance tuning – RESOURCE_SEMAPHORE waits] | Timothy Smith | 2020-06-16 | [DBA][DEV] | | [Use session_context to create a “variable” that lasts between batches.] | Kenneth Fisher | 2020-05-26 | [DBA][DEV] | | [Phase out CONTEXT_INFO() in SQL Server 2016 with SESSION_CONTEXT()] | Aaron Bertrand | 2015-11-19 | [DBA][DEV] | +| [How to Balance SQL Server Core Licenses Across NUMA Nodes] | Glenn Berry | 2020-06-25 | [DBA] | +| [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?] | Glenn Berry | 2019-12-18 | [DBA] | +| [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?] | Kevin Kline | 2020-06-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2215,3 +2218,6 @@ Articles types: [SQL Server performance tuning – RESOURCE_SEMAPHORE waits]:https://www.sqlshack.com/sql-server-performance-tuning-resource_semaphore-waits/ [Use session_context to create a “variable” that lasts between batches.]:https://sqlstudies.com/2020/05/26/use-session_context-to-create-a-variable-that-lasts-between-batches/ [Phase out CONTEXT_INFO() in SQL Server 2016 with SESSION_CONTEXT()]:https://www.mssqltips.com/sqlservertip/4094/phase-out-contextinfo-in-sql-server-2016-with-sessioncontext/ +[How to Balance SQL Server Core Licenses Across NUMA Nodes]:https://glennsqlperformance.com/2020/06/25/how-to-balance-sql-server-core-licenses-across-numa-nodes/ +[What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?]:https://glennsqlperformance.com/2019/12/18/what-is-the-difference-between-physical-sockets-physical-cores-and-logical-cores/ +[Troubleshooting SQL Server Wait Stats]:https://www.sentryone.com/white-papers/troubleshooting-sql-server-wait-stats From 8d8986ba64d1696de8928fa947c31e4f06897932 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 9 Jul 2020 16:19:01 +0300 Subject: [PATCH 007/553] Add SSMS 18.5.1 release info --- SSMS/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index ff6e9658..9099b9e2 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -48,17 +48,17 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u ## Available Languages **SQL Server Management Studio 18.5 GA**: - [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x804) | - [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x404) | - [English (United States)](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x409) | - [French](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x40c) | - [German](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x407) | - [Italian](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x410) | - [Japanese](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x411) | - [Korean](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x412) | - [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x416) | - [Russian](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x419) | - [Spanish](https://go.microsoft.com/fwlink/?linkid=2125901&clcid=0x40a) + [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x804) | + [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x404) | + [English (United States)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x409) | + [French](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x40c) | + [German](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x407) | + [Italian](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x410) | + [Japanese](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x411) | + [Korean](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x412) | + [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x416) | + [Russian](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x419) | + [Spanish](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x40a) ## SQL Server Management Studio Download Links and Release Info @@ -68,7 +68,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.5 GA Release] | **Latest GA** | 15.0.18206.0 | 2020-04-07 | 535 | +| [18.5.1 GA Release] | **Latest GA** | 15.0.18333.0 | 2020-07-09 | 535 | +| [18.5 GA Release] | | 15.0.18206.0 | 2020-04-07 | 535 | | [18.4 GA Release] | | 15.0.18206.0 | 2019-11-04 | 539 | | [18.3.1 GA Release] | | 15.0.18183.0 | 2019-10-02 | 534 | | [18.3 GA Release] | | 15.0.18178.0 | 2019-09-23 | 534 | @@ -109,7 +110,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | -[18.4 GA Release]:https://go.microsoft.com/fwlink/?linkid=2125901 +[18.5.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2132606 +[18.5 GA Release]:https://go.microsoft.com/fwlink/?linkid=2125901 [18.4 GA Release]:https://go.microsoft.com/fwlink/?linkid=2108895 [18.3.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2105412 [18.3 GA Release]:https://go.microsoft.com/fwlink/?linkid=2104251 From 3201935a2b5fd1f212fae1b8014cc0c47f286ce4 Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Thu, 9 Jul 2020 17:53:47 +0300 Subject: [PATCH 008/553] Add new SQL Server Tools --- Utilities/README.md | 347 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 319 insertions(+), 28 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 15d22698..4ebbb4a3 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,12 +1,12 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **314** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **331** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - **[B]**: Backup solutions {8} - **[BI]**: Business Intelligence Solutions {4} - **[D]**: Documentation solutions {7} - - **[DA]**: Database Architecture {20} - - **[DC]**: Data compare {13} + - **[DA]**: Database Architecture {21} + - **[DC]**: Data compare {14} - **[ETL]**: Extract Download Load (ETL) Tools {8} - **[I]**: Internal SQL Server utilities (for example, bcp) {14} - **[IDX]**: Index manager {3} @@ -14,14 +14,14 @@ Utility types (main purpose), in braces `{}` current counts: - **[J]**: Job managers {4} - **[M]**: Monitoring and alerting Tools {20} - **[MG]**: Migration tool {33} - - **[MS]**: Management Studio (alternative for SSMS) {29} + - **[MS]**: Management Studio (alternative for SSMS) {30} - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {3} + - **[S]**: Search tools {5} - **[SEC]**: Security tools {7} - - **[SC]**: Structure compare {19} + - **[SC]**: Structure compare {20} - **[ST]**: Statistics utilities {3} - **[T]**: Testing tools {5} - - **[?]**: Not yet classified {109} + - **[?]**: Not yet classified {120} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-----------------------|------------|----------------|------:| @@ -42,13 +42,13 @@ Utility types (main purpose), in braces `{}` current counts: | [LINQPad](#linqpad) | No | No | [?] | [LINQPad] | 2016-01-02 | Joseph Albahari | | Non-commercial | $45 | | [SqlDynamite](#sqldynamite) | No | No | [S] | [SqlDynamite] | 2016-04-06 | Anatoly Sova | | Yes | No | | [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | -| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2016-03-20 | Steve Stedman | | Yes | No | +| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | | [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | | [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | | [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | | [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | | [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | -| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2017-03-15 | Microsoft | | Yes | No | +| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | | [SQL Server Migration Assistant for Sybase](#sybasetosql) | No | No | [MG] | [Migration Assistant for Sybase] | 2017-02-17 | Microsoft | | Yes | No | | [dta Utility](#dta-utility) | No | No | [I] | [dta Utility] | - | Microsoft | | Yes | No | | [osql Utility](#osql-utility) | No | No | [I] | [osql Utility] | - | Microsoft | | Yes | No | @@ -119,6 +119,7 @@ Utility types (main purpose), in braces `{}` current counts: | [ER/Studio Data Architect](#erstudio-data-architect) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ER/Studio Data Architect] | | Idera | | No | $1287 | | [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | | [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | +| [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | | [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | | [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | | [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | @@ -130,6 +131,7 @@ Utility types (main purpose), in braces `{}` current counts: | [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | | [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | | [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | +| [dbForge Search](#dbforge-search) | No | No | [S] | [dbForge Search] | 2019-10-10 | Devart | Freeware | Yes | No | | [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | | [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | | [Minion Enterprise](#minion-enterprise) | No | No | [?] | [Minion Enterprise] | ? | MinionWare | | No | $1500 | @@ -149,13 +151,13 @@ Utility types (main purpose), in braces `{}` current counts: | [ApexSQL Defrag](#apexsql-defrag) | No | No | [IDX] | [ApexSQL Defrag] | 2017-06-29 | ApexSQL | | No | $499 | | [ApexSQL Log](#apexsql-log) | No | No | [?] | [ApexSQL Log] | 2017-05-24 | ApexSQL | | No | $1999 | | [ApexSQL Monitor](#apexsql-monitor) | No | No | [M] | [ApexSQL Monitor] | 2017-10-05 | ApexSQL | | No | $499 | -| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2018-04-05 | ApexSQL | | Yes | No | -| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2017-09-25 | ApexSQL | | Yes | No | +| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2019-12-02 | ApexSQL | | Yes | No | +| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2020-02-19 | ApexSQL | | Yes | No | | [ApexSQL Recover](#apexsql-recover) | No | No | [REC] | [ApexSQL Recover] | 2017-10-26 | ApexSQL | | No | $1999 | | [ApexSQL Build](#apexsql-build) | No | No | [?] | [ApexSQL Build] | 2017-05-15 | ApexSQL | | No | $399 | | [ApexSQL Clean](#apexsql-clean) | No | No | [?] | [ApexSQL Clean] | 2017-09-28 | ApexSQL | | No | $399 | | [ApexSQL Data Diff](#apexsql-data-diff) | No | No | [DC] | [ApexSQL Data Diff] | 2017-10-26 | ApexSQL | | No | $399 | -| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2017-08-16 | ApexSQL | | Yes | No | +| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2020-03-12 | ApexSQL | | Yes | No | | [ApexSQL Diff](#apexsql-diff) | No | No | [SC] | [ApexSQL Diff] | 2017-10-26 | ApexSQL | | No | $399 | | [ApexSQL Doc](#apexsql-doc) | No | No | [D] | [ApexSQL Doc] | 2017-09-06 | ApexSQL | | No | $299 | | [ApexSQL Generate](#apexsql-generate) | No | No | [G] | [ApexSQL Generate] | 2017-07-13 | ApexSQL | | No | $499 | @@ -169,6 +171,11 @@ Utility types (main purpose), in braces `{}` current counts: | [ApexSQL VM Monitor](#apexsql-vm-monitor) | No | No | [M] | [ApexSQL VM Monitor] | 2018-05-09 | ApexSQL | | No | $999 | | [ApexSQL Job](#apexsql-job) | No | No | [J] | [ApexSQL Job] | 2018-03-29 | ApexSQL | | No | $499 | | [ApexSQL Enforce](#apexsqlL-enforce) | No | No | [?] | [ApexSQL Enforce] | 2018-07-19 | ApexSQL | | No | $299 | +| [ApexSQL CI/CD toolkit](#apexsql-ci-cd) | No | No | [?] | [ApexSQL CI/CD toolkit] | 2020-05-21 | ApexSQL | | Yes | No | +| [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | +| [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | +| [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | +| [ApexSQL Search](#apexsql-search) | No | No | [S] | [ApexSQL Search] | 2020-05-28 | ApexSQL | | Yes | No | | [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | | [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | | [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | @@ -217,7 +224,7 @@ Utility types (main purpose), in braces `{}` current counts: | [Database .NET](#database-net) | Oracle,MySQL,PostgreSQL,Other | No | [MS],[SC]| [Database .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $69 | | [dbMigration .NET](#dbmegration-net) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [dbMigration .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $49 | | [Is It SQL](#is-it-sql) | No | No | [M] | [Is It SQL] | 2017-04-06 | Bill Graziano | | Non-commercial | No | -| [Database Experimentation Assistant Technical Preview 2](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2017-03-24 | Microsoft | | Yes | No | +| [Database Experimentation Assistant](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2020-03-20 | Microsoft | | Yes | No | | [Data Platform Studio](#dps) | No | No | [MG] | [Data Platform Studio] | ? | Red Gate Software | | Yes | ? | | [Flyway](#flyway) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Flyway] | 2018-01-30 | boxfuse | [Apache] | Open Source | $950 | | [Liquibase](#liquibase) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Liquibase] | 2018-04-11 | Liquibase | [Apache] | Open Source | No | @@ -276,7 +283,7 @@ Utility types (main purpose), in braces `{}` current counts: | [DBGhost](#dbghost) | No | No | [?] | [DBGhost] | 2017-01-31 | Innovartis Ltd | | No | £430 | | [SQLAutomate](#sqlautomate) | Oracle,MySQL,Other | No | [?] | [SQLAutomate] | 2017-06-19 | OnLine ToolWorks     | | No | $99 | | [BimlExpress](#bimlexpress) | No | No | [?] | [BimlExpress] | ? | Varigence   | | No | No | -| [BIDS Helper](#bidshelper) | No | No | [?] | [BIDS Helper] | 2015-03-17 | Microsoft   | | Open Source | No | +| [BI Developer Extensions](#bi-developer-extensions) | No | No | [?] | [BI Developer Extensions] | 2019-04-29 | Microsoft   | | Open Source | No | | [Azure Data Warehouse Migration Utility](#azure-migration) | No | No | [MG] | [Azure Data Warehouse Migration Utility] | ? | Microsoft | | ? | ? | | [Benchmark Factory](#benchmark-factory) | Oracle,MySQL,Other | No | [T] | [Benchmark Factory] | ? | Quest Software | | No | $4413 | | [manduka](#manduka) | Oracle | Linux,Mac | [?] | [manduka] | 2017-03-08 | Virtusa Corporation | | Yes | No | @@ -339,6 +346,15 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | | [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | | [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | +| [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | +| [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | +| [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | +| [DbViewSharp](#dbviewsharp) | No | No | [MS] | [DbViewSharp] | 2014-08-08 | David Moore | [MIT] | Yes | No | +| [DTSQL](#dtsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [DTSQL] | 2017-08-18 | DigerTech Inc | Shareware | Yes | $69 | +| [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | +| [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | +| [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | +| [Pssdiag&Sqldiag Manager](pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | @@ -599,7 +615,7 @@ With SSDT, you can design and deploy any SQL Server content type with the same e ## Database Health Monitor Download page: [Database Health Monitor]
-Release date: 2016-03-20
+Release date: 2019-12-01
Support Version: 2008/2012/2014/2016
Author: Steve Stedman
Free version: Yes
@@ -679,7 +695,7 @@ ExpressProfiler (aka **SqlExpress Profiler**) is a simple and fast replacement f ## Data Migration Assistant Download page: [Data Migration Assistant]
-Release date: 2017-03-15
+Release date: 2020-04-23
Support Version: 2005/2008/2008R2/2012/2014/2016/Azure
Author: Microsoft
Free version: Yes
@@ -1865,6 +1881,18 @@ Price: $900 dbForge DevOps Automation for SQL Server is a cutting-edge solution that takes conventional database development and deployment to a whole new level. +## dbForge Search + +Download page: [dbForge Search]
+Release date: 2019-10-10
+Support Version: ?
+Author: Devart
+Free version: Yes
+Price: No + +Search for SQL Server is a add-in for Microsoft SQL Server Management Studio that allows you to quickly locate SQL objects, data, and text in your databases. + + ## Devart Excel Add-in for SQL Server Download page: [Devart Excel Add-in for SQL Server]
@@ -2150,7 +2178,7 @@ Price: $499 ## ApexSQL Plan Download page: [ApexSQL Plan]
-Release date: 2018-04-05
+Release date: 2019-12-02
Support Version: 2008-2017
Author: ApexSQL
Free version: Yes
@@ -2169,7 +2197,7 @@ Price: No ## ApexSQL Propagate Download page: [ApexSQL Propagate]
-Release date: 2017-09-25
+Release date: 2020-02-19
Support Version: 2008-2017
Author: ApexSQL
Free version: Yes
@@ -2245,7 +2273,7 @@ Price: $599 ## ApexSQL Decrypt Download page: [ApexSQL Decrypt]
-Release date: 2017-08-16
+Release date: 2020-03-12
Support Version: 2008-2017
Author: ApexSQL
Free version: Yes
@@ -2488,6 +2516,113 @@ Price: $299 - Generate SQL to fix violations +## ApexSQL CI/CD toolkit + +Download page: [ApexSQL CI/CD toolkit]
+Release date: 2020-05-21
+Support Version: 2005-2017
+Author: ApexSQL
+Free version: Yes
+Price: No + + - Build from source control + - Include static data in builds + - Generate synthetic test data + - Automatically run SQL unit tests + - Add a data change audit trail + - Document and report on changes + - Create a data sync script + - Create a schema sync script + - Plug into popular build servers + - Enforce SQL coding standards + - Work with all popular SC systems + - Trigger manually or automatically + + +## ApexSQL Compare + +Download page: [ApexSQL Compare]
+Release date: 2020-03-17
+Support Version: 2005-2017
+Author: ApexSQL
+Free version: Yes
+Price: No + + - Two-way SQL code compare + - SSMS and Visual Studio integration + - Char-by-char compare + - Windows Explorer integration + - Line-by-line compare + - File and folder compare + - Block-by-block compare + - Database object compare + - Syntax highlighting + - Ignore script options + - HTML results report + - Automation and scheduling + + +## ApexSQL Complete + +Download page: [ApexSQL Complete]
+Release date: 2020-05-28
+Support Version: 2005-2017
+Author: ApexSQL
+Free version: Yes
+Price: No + + - Automatically complete SQL statements + - Review an object's script and description + - Improve productivity with snippets + - Identify the structure of complex SQL queries + - Keep track of all your tabs + - Log every executed query + - Easily navigate to SQL objects + - Check queries in test mode + - Color query tabs by environment + - Search and export query results + - Create CRUD procedures + - Guard against queries that may damage data + + +## ApexSQL Refactor + +Download page: [ApexSQL Refactor]
+Release date: 2020-06-09
+Support Version: 2005-2019
+Author: ApexSQL
+Free version: Yes
+Price: No + + - SQL formatter with over 160 options + - Qualify objects and expand wildcards + - Encapsulate SQL into procedures + - Add surrogate keys + - Replace one-to-many relationships + - Change procedure parameters + - Safely rename SQL objects + - Locate & highlight unused variables + - Format SQL objects + - Obfuscate SQL + + + ## ApexSQL Search + +Download page: [ApexSQL Search]
+Release date: 2020-05-28
+Support Version: 2005-2019
+Author: ApexSQL
+Free version: Yes
+Price: No + + - Search for SQL objects + - Quickly find data in SQL tables + - Edit extended properties + - Easily navigate to result objects + - Rename SQL objects safely + - Export results to HTML, CSV and Excel + + ## DBBest T-SQL Analyzer Download page: [DBBest T-SQL Analyzer]
@@ -3142,10 +3277,10 @@ Price: No - Can run with no installation or it can be run as a service -## Database Experimentation Assistant Technical Preview 2 +## Database Experimentation Assistant Download page: [Database Experimentation Assistant]
-Release date: 2017-03-24
+Release date: 2020-03-20
Support Version: 2005/2008/2012/2014/2016
Author: Microsoft
Free version: Yes
@@ -3984,10 +4119,10 @@ BimlExpress Visual Studio Add-in built specifically to work with SQL Server 2016 - Updates are released more rapidly to work with the most current versions of SQL Server. -## BIDS Helper - -Download page: [BIDS Helper]
-Release date: 2015-03-17
+## BI Developer Extensions + +Download page: [BI Developer Extensions]
+Release date: 2019-04-29
Support Version: ?
Author: Microsoft
Free version: Open Source
@@ -4875,6 +5010,146 @@ Veeam Backup & Replication™ delivers Intelligent Data Management for ALL your Through a single management console, you can manage fast, flexible and reliable backup, recovery and replication of all your applications and data to eliminate legacy backup solutions forever. +## Database Modeling Excel + +Download page: [Database Modeling Excel] +Release date: ? +Support Version: ? +Author: Yang Ning (Steven) +Free version: Yes +Prise: No + +The database modeling utility is a Microsoft Office Excel workbook which can help you to design databases. +It supports DB2, MariaDB, MySQL, Oracle, PostgreSQL, SQLite and SQL Server. +In the workbook, you can define database, generate DDL scripts, and import database definition from existing databases. + + +## DBAchecks + +Download page: [DBAchecks] +Release date: ? +Support Version: ? +Author: sqlcollaborative +Free version: Yes +Prise: No + +This open source module allows us to crowd-source our checklists using Pester tests. Such checks include: + - Backups are being performed + - Identity columns are not about to max out + - Servers have access to backup paths + - Database integrity checks are being performed and corruption does not exist + - Disk space is not about to run out + - All enabled jobs have succeeded + + +## DBComparer + +Download page: [DBComparer] +Release date: ? +Support Version: 2005-2008 +Author: DBComparer +Free version: Yes +Prise: No + + - Automate compare database + - Compare all database objects or selected ones only + - Compare database by all or selected properties of objects only + - A wide variety of options for comparison + - Compare databases using all or selected object properties + - Advanced visual build tree interface for an intuitive visual representation of any differences + - Built-in text differences control with SQL syntax highlighting + + +## DbViewSharp + +Download page: [DbViewSharp] +Release date: 2014-08-08 +Support Version: 2005 – 2014 +Author: David Moore +Free version: Yes +Prise: No + +DbViewSharp is a very useful application that is designed to provide you with a means of exploring and managing SQL databases. + + +## DTSQL + +Download page: [DTSQL] +Release date: 2017-08-18 +Support Version: ? +Author: DigerTech Inc +Free version: Yes +Prise: $69 + +DtSQL is an universal database tool for developers and database administrators to Query, Edit, Browse, and Manage database objects. +It can access most databases and can be used on all major operating systems. + + +## MSKerberos Configuration Manager + +Download page: [MSKerberos Configuration Manager] +Release date: 2020-02-25 +Support Version: 2008 – 2019 +Author: Microsoft +Free version: Yes +Prise: No + +Microsoft Kerberos Configuration Manager for SQL Server is a diagnostic tool that helps troubleshoot Kerberos related connectivity issues with SQL Server, SQL Server Reporting Services, and SQL Server Analysis Services. + + +## Partition Management + +Download page: [Partition Management] +Release date: ? +Support Version: ? +Author: ? +Free version: Yes +Prise: No + + - Remove all the data from one partition by switching it out to a staging table. It creates the required staging table. + - Create a staging table for loading data into a partition. The staging table can be created with or without indexes -- if created without indexes this utility provides a separate command to create appropriate indexes on the staging table, before SWITCHing it into the partitioned table. + + +## Powershell Scripts + +Download page: [Powershell Scripts] +Release date: ? +Support Version: 2008-2017 +Author: Idera +Free version: Yes +Prise: No + + - 147 sample PowerShell scripts to manage SQL Server and Azure SQL Database + - Scripts to initialize PowerShell modules + - Scripts for Database Engine, and for Analysis, Integration and Reporting Services + - Support for SQL Server 2016 and 2017, and Windows Server 2016 + - 15 New scripts for Azure SQL Database + + +## PSDatabaseClone + +Download page: [PSDatabaseClone] +Release date: ? +Support Version: ? +Author: Sander Stad +Free version: Yes +Prise: No + +PSDatabaseClone is a PowerShell module dedicated to the provisioning of databases using virtual disk technology. + + +## Pssdiag&Sqldiag Manager + +Download page: [Pssdiag&Sqldiag Manager] +Release date: 2020-05-04 +Support Version: ? +Author: Jack Li +Free version: Yes +Prise: No + +Pssdiag/Sqldiag Manager is a graphic interface that provides customization capabilities to collect data for SQL Server using sqldiag collector engine. The data collected can be used by SQL Nexus tool which help you troubleshoot SQL Server performance problems. This is the same tool Microsoft SQL Server support engineers use to for data collection to troubleshoot customer's performance problems. + + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -4899,7 +5174,7 @@ Through a single management console, you can manage fast, flexible and reliable [SQLExecStats]:http://www.qdpma.com/ExecStats/SQLExecStats.html [ExpressProfiler]:https://expressprofiler.codeplex.com/ [Migration Assistant for Sybase]:https://msdn.microsoft.com/en-us/library/hh302795(v=sql.130).aspx -[Data Migration Assistant]:https://blogs.msdn.microsoft.com/datamigration/dma/ +[Data Migration Assistant]:https://www.microsoft.com/en-us/download/details.aspx?id=53595 [dta Utility]:https://msdn.microsoft.com/en-us/library/ms162812.aspx [osql Utility]:https://msdn.microsoft.com/en-us/library/ms162806.aspx [sqldiag Utility]:https://msdn.microsoft.com/en-us/library/ms162833.aspx @@ -4975,6 +5250,7 @@ Through a single management console, you can manage fast, flexible and reliable [dbForge Documenter]:https://www.devart.com/dbforge/sql/documenter/ [dbForge SSIS Data Flow Components]:https://www.devart.com/ssis/ [dbForge DevOps Automation for SQL Server]:https://www.devart.com/dbforge/sql/database-devops/ +[dbForge Search]: [Devart Excel Add-in for SQL Server]:https://www.devart.com/excel-addins/sql-server.html [dbMonitor]:https://www.devart.com/dbmonitor/download.html [BPA 2005]: https://www.microsoft.com/en-us/download/details.aspx?id=23864 @@ -5018,6 +5294,11 @@ Through a single management console, you can manage fast, flexible and reliable [ApexSQL VM Monitor]:https://www.apexsql.com/sql_tools_vm_monitor.aspx [ApexSQL Job]:https://www.apexsql.com/sql_tools_job.aspx [ApexSQL Enforce]:https://www.apexsql.com/sql_tools_enforce.aspx +[ApexSQL CI/CD toolkit]:https://www.apexsql.com/sql-tools-devops.aspx +[ApexSQL Compare]:https://www.apexsql.com/sql-tools-compare.aspx +[ApexSQL Complete]:https://www.apexsql.com/sql-tools-complete.aspx +[ApexSQL Refactor]:https://www.apexsql.com/sql-tools-refactor.aspx +[ApexSQL Search]:https://www.apexsql.com/sql-tools-search.aspx [DBBest T-SQL Analyzer]:https://www.dbbest.com/products/t-sql-analyzer [DBBest Database Compare Suite]:https://www.dbbest.com/products/database-compare-suite/ [Advanced Query Tool]:http://www.querytool.com/ @@ -5066,7 +5347,7 @@ Through a single management console, you can manage fast, flexible and reliable [Database .NET]:http://fishcodelib.com/Database.htm [dbMigration .NET]:http://fishcodelib.com/dbMigration.htm [Is It SQL]:http://www.scalesql.com/isitsql -[Database Experimentation Assistant]:https://blogs.msdn.microsoft.com/datamigration/2017/03/24/dea-2-0-release-overview-database-experimentation-assistant +[Database Experimentation Assistant]:https://www.microsoft.com/en-us/download/details.aspx?id=54090 [Data Platform Studio]:http://www.red-gate.com/products/azure-development/data-platform-studio [Flyway]:https://flywaydb.org [Liquibase]:http://www.liquibase.org @@ -5126,7 +5407,7 @@ Through a single management console, you can manage fast, flexible and reliable [DBGhost]:http://www.dbghost.com [SQLAutomate]:http://www.sqlautomate.com [BimlExpress]:https://www.varigence.com/BimlExpress -[BIDS Helper]:https://bidshelper.codeplex.com +[BI Developer Extensions]:https://bideveloperextensions.github.io [Azure Data Warehouse Migration Utility]:https://docs.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-migrate-migration-utility [Benchmark Factory]:https://www.quest.com/products/benchmark-factory [manduka]:http://www.manduka.tech/#/home @@ -5189,6 +5470,16 @@ Through a single management console, you can manage fast, flexible and reliable [SQL Server to Azure Database Migrator]:https://www.systoolsgroup.com/sql-server/azure/ [Commvault Complete Backup & Recovery]:https://www.commvault.com/complete-backup [Veeam Backup & Replication]:https://www.veeam.com/ru/vm-backup-recovery-replication-software.html +[Database Modeling Excel]:https://github.com/snyang/Database-Modeling-Excel +[DBAchecks]:https://github.com/sqlcollaborative/dbachecks +[DBComparer]:https://dbcomparer.com/default.aspx +[DbViewSharp]:https://www.softpedia.com/get/Internet/Servers/Database-Utils/DbViewSharp.shtml +[DTSQL]:http://www.dtsql.com/database_tools.htm +[MSKerberos Configuration Manager]:https://www.microsoft.com/en-us/download/details.aspx?id=39046 +[Partition Management]:https://archive.codeplex.com/?p=sqlpartitionmgmt +[Powershell Scripts]:https://www.idera.com/productssolutions/freetools/sqlpowershellscripts +[PSDatabaseClone]:https://psdatabaseclone.org/# +[Pssdiag&Sqldiag Manager]:https://github.com/microsoft/DiagManager/releases [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 5c4fc31b41f6dc5d3b005b48293831254b038752 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 10 Jul 2020 17:46:15 +0300 Subject: [PATCH 009/553] Add new articles and ADS extensions --- ADS/README.md | 4 ++++ Articles/README.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ADS/README.md b/ADS/README.md index a65c626b..3ad921c5 100644 --- a/ADS/README.md +++ b/ADS/README.md @@ -35,6 +35,8 @@ | [PowerShell Extension] | [Github][6] | 2020-04-15 | 2020.4.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099773) | Provides rich PowerShell language support for Azure Data Studio | | [SandDance for Azure Data Studio] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix](https://github.com/microsoft/SandDance/releases/latest) | Provides interactive visualizations that help users explore, understand, and present their data | | [SandDance for VSCode][8] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix][8] | Provides interactive visualizations that help users explore, understand, and present their data for `.csv` or `.tsv` files | +| [Server Reports][1] | [Github][1] | 2020-04-27 | 0.2.2 | [GO][https://go.microsoft.com/fwlink/?linkid=2099768] | Provides useful information about the server's performance, such as: DB Space Usage, DB Buffer Usage, CPU Utilization, Backup Growth Trend | +| [whoisactive][1] | [Github][1] | 2020-04-27 | 0.1.4 | [GO][https://go.microsoft.com/fwlink/?linkid=2099774] | Displays insights from sp_whoisactive, a useful tool for activity monitoring and troubleshooting, as graphs and tasks inside an Azure Data Studio | ## Azure Data Studio Articles @@ -42,6 +44,7 @@ | Title | Author | Modified | |------------------------------------------------------------|------------------------------------------|------------| | [Integrating Azure Data Studio with Git and GitHub] | Rajendra Gupta | 2020-07-03 | +| [Working with Git components in Azure Data Studio] | Rajendra Gupta | 2020-07-09 | [1]:https://github.com/Microsoft/azuredatastudio [2]:https://github.com/microsoft/azuredatastudio-postgresql @@ -63,6 +66,7 @@ [SandDance for Azure Data Studio]:https://docs.microsoft.com/en-us/sql/azure-data-studio/sanddance-extension [Integrating Azure Data Studio with Git and GitHub]:https://www.sqlshack.com/integrating-azure-data-studio-with-git-and-github/ +[Working with Git components in Azure Data Studio]:https://www.sqlshack.com/working-with-git-components-in-azure-data-studio/ ### TODO Links diff --git a/Articles/README.md b/Articles/README.md index 27d42f78..604e0047 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1123,6 +1123,8 @@ Articles types: | [How to Balance SQL Server Core Licenses Across NUMA Nodes] | Glenn Berry | 2020-06-25 | [DBA] | | [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?] | Glenn Berry | 2019-12-18 | [DBA] | | [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?] | Kevin Kline | 2020-06-01 | [DBA][DEV] | +| [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates] | Brent Ozar | 2020-07-07 | [DBA][DEV] | +| [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows] | Brent Ozar | 2020-07-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2221,3 +2223,5 @@ Articles types: [How to Balance SQL Server Core Licenses Across NUMA Nodes]:https://glennsqlperformance.com/2020/06/25/how-to-balance-sql-server-core-licenses-across-numa-nodes/ [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?]:https://glennsqlperformance.com/2019/12/18/what-is-the-difference-between-physical-sockets-physical-cores-and-logical-cores/ [Troubleshooting SQL Server Wait Stats]:https://www.sentryone.com/white-papers/troubleshooting-sql-server-wait-stats +[The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-1-why-you-still-dont-get-accurate-estimates/ +[The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-2-how-bad-estimates-backfire-as-your-data-grows/ From b5bcbe35a5c9a23d50b6291186dfec291d7e20d9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 11 Jul 2020 13:26:47 +0300 Subject: [PATCH 010/553] Add csv to INSERT online converter --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f106faaa..77816dfe 100644 --- a/README.md +++ b/README.md @@ -409,6 +409,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Cheat Sheet](https://websitesetup.org/sql-cheat-sheet/) (by Luke Harrison) - [Azure Database Migration Guide](https://datamigration.microsoft.com/) (by Microsoft) - [Hermitage: Testing transaction isolation levels in relation databases](https://github.com/ept/hermitage) (by Martin Kleppmann) + - [csv to INSERT online converter - translates your tab-delimited data into a T-SQL INSERT statement](https://table.strd.co/) (by Structured Concepts AB) **[⬆ back to top](#table-of-contents)** From 2ec9e105503a08331b591102931e39796ac1c8b0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 12 Jul 2020 14:26:25 +0300 Subject: [PATCH 011/553] Add new awesome articles --- Articles/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 604e0047..b142e424 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -64,7 +64,7 @@ Articles types: | [Dynamically Query a 100 Million Row Table-Efficiently] | Gary Strange | 2016-05-27 | | | [Understanding and Using Parallelism in SQL Server] | Paul White | 2011-03-03 | | | [Diagnosing and Resolving Latch Contention on SQL Server] | Microsoft | 2014-02-28 | | -| [Parallel Execution Plans – Branches and Threads] | Paul White | 2013-10-07 | | +| [Parallel Execution Plans – Branches and Threads] | Paul White | 2013-10-07 | [DBA][DEV] | | [Nasty Fast PERCENT_RANK] | Alan Burstein | 2016-06-07 | | | [Looking at VIEWs, Close Up] | Joe Celko | 2016-05-10 | | | [SQL Server 2016: It Just Runs Faster] | Thomas LaRock | 2016-06-01 | | @@ -1125,6 +1125,9 @@ Articles types: | [What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores?] | Kevin Kline | 2020-06-01 | [DBA][DEV] | | [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates] | Brent Ozar | 2020-07-07 | [DBA][DEV] | | [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows] | Brent Ozar | 2020-07-08 | [DBA][DEV] | +| [Sql Server — Widely Random Query Exec Times (cxconsumer Wait/cxpacket) & Possible Remediation] | VIKTOR | 2020-06-26 | [DBA][DEV] | +| [How MAXDOP Really Works] | Paul White | 2020-06-07 | [DBA][DEV] | +| [What is MaxDOP controlling?] | Pedro Lopes | 2020-07-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2225,3 +2228,6 @@ Articles types: [Troubleshooting SQL Server Wait Stats]:https://www.sentryone.com/white-papers/troubleshooting-sql-server-wait-stats [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-1-why-you-still-dont-get-accurate-estimates/ [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-2-how-bad-estimates-backfire-as-your-data-grows/ +[Sql Server — Widely Random Query Exec Times (cxconsumer Wait/cxpacket) & Possible Remediation]:https://viktorsrandomposts.wordpress.com/2020/06/26/sql-server-widely-random-query-exec-times-cxconsumer-wait-possible-remediation/ +[How MAXDOP Really Works]:https://www.sql.kiwi/2020/07/how-maxdop-really-works.html +[What is MaxDOP controlling?]:https://techcommunity.microsoft.com/t5/sql-server/what-is-maxdop-controlling/ba-p/1505968 From 60b7aa8d3d736bb3ced838bd1abbcbde2d6e7b19 Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Mon, 13 Jul 2020 16:15:43 +0300 Subject: [PATCH 012/553] Add new SQL Server Tools --- Utilities/README.md | 482 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 470 insertions(+), 12 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 4ebbb4a3..370ac76a 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,27 +1,27 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **331** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **360** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {8} + - **[B]**: Backup solutions {9} - **[BI]**: Business Intelligence Solutions {4} - **[D]**: Documentation solutions {7} - **[DA]**: Database Architecture {21} - **[DC]**: Data compare {14} - - **[ETL]**: Extract Download Load (ETL) Tools {8} + - **[ETL]**: Extract Download Load (ETL) Tools {9} - **[I]**: Internal SQL Server utilities (for example, bcp) {14} - - **[IDX]**: Index manager {3} + - **[IDX]**: Index manager {4} - **[G]**: Data generation {4} - **[J]**: Job managers {4} - - **[M]**: Monitoring and alerting Tools {20} - - **[MG]**: Migration tool {33} - - **[MS]**: Management Studio (alternative for SSMS) {30} + - **[M]**: Monitoring and alerting Tools {27} + - **[MG]**: Migration tool {35} + - **[MS]**: Management Studio (alternative for SSMS) {31} - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {5} + - **[S]**: Search tools {8} - **[SEC]**: Security tools {7} - **[SC]**: Structure compare {20} - - **[ST]**: Statistics utilities {3} - - **[T]**: Testing tools {5} - - **[?]**: Not yet classified {120} + - **[ST]**: Statistics utilities {4} + - **[T]**: Testing tools {6} + - **[?]**: Not yet classified {133} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-----------------------|------------|----------------|------:| @@ -83,6 +83,8 @@ Utility types (main purpose), in braces `{}` current counts: | [Red Gate Data Masker](#red-gate-data-masker) | Oracle | No | [?] | [Red Gate SQL Data Masker] | 2018-02-26 | Red Gate | | No | $2395 | | [DLM Automation](#dlm-automation) | No | No | [?] | [DLM Automation] | ? | Red Gate | | No | ? | | [ReadyRoll](#readyroll) | No | No | [?] | [ReadyRoll] | 2016-01-03 | Red Gate | | No | $345 | +| [SQL Search](#sql-search) | No | No | [S] | [SQL Search] | ? | Red Gate | | Yes | No | +| [SQL Scripts Manager](#sql-scripts-manager) | No | No | [?] | [SQL Scripts Manager] | ? | Red Gate | | Yes | No | | [Rapid Database Extractor](#rapid-database-extractor) | Oracle | No | [?] | [Rapid Database Extractor] | 2016-11-03 | Idera | | Yes | No | | [SQL XEvent Profiler](#sql-xevent-profiler) | No | No | [?] | [SQL XEvent Profiler] | 2014-03-14 | Idera | | Yes | No | | [SQL Check](#sql-check) | No | No | [?] | [SQL Check] | 2015-09-24 | Idera | | Yes | No | @@ -120,6 +122,8 @@ Utility types (main purpose), in braces `{}` current counts: | [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | | [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | | [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | +| [SQL Data Profiler](#sql-data-profiler) | No | No | [?] | [SQL Data Profiler] | ? | Idera | | No | ? | +| [SQL Instance Check](#sql-instance-check) | No | No | [M] | [SQL Instance Check] | ? | Idera | | Yes | ? | | [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | | [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | | [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | @@ -271,6 +275,7 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server Migration Assistant for DB2](#ssma-db2) | DB2 | No | [MG] | [SQL Server Migration Assistant for DB2] | 2017-02-17 | Microsoft | | Yes | No | | [SQL Server Migration Assistant for Oracle](#ssma-oracle) | Oracle | No | [MG] | [SQL Server Migration Assistant for Oracle] | 2017-02-17 | Microsoft | | Yes | No | | [SQL Server Migration Assistant for Access](#ssma-access) | Access | No | [MG] | [SQL Server Migration Assistant for Access] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for SAP ASE](#ssma-sap) | SAP ASE | No | [MG] | [SQL Server Migration Assistant for SAP ASE]| 2020-06-29 | Microsoft | | Yes | No | | [mssql for Visual Studio Code](#mssql-for-vs-code) | No | Linux,Mac | [MS] | [mssql for Visual Studio Code] | 2017-05-02 | Microsoft | | Open Source | No | | [Microsoft Assessment and Planning](#map) | No | No | [?] | [Microsoft Assessment and Planning] | 2017-02-10 | Microsoft | | Yes | No | | [mssql-scripter](#mssql-scripter) | No | Linux,Mac | [?] | [mssql-scripter] | ? | Microsoft | | Open Source | No | @@ -354,7 +359,31 @@ Utility types (main purpose), in braces `{}` current counts: | [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | | [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | | [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | -| [Pssdiag&Sqldiag Manager](pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | +| [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | +| [sp_Blitz](#sp-blitz) | No | No | [?] | [sp_Blitz] | ? | Brent Ozar | | Yes | No | +| [sp_whoisactive](#sp-whoisactive) | No | No | [M] | [sp_whoisactive] | 2017-10-10 | Adam Machanic | | Yes | No | +| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell, Gerd Wagner| | Yes | No | +| [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | +| [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | +| [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLDBSize](#sqldbsize) | No | No | [?] | [SQLDBSize] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLines Data](#sqlines-data) | Oracle,MySQL,PostgreSQL,Other | Linux |[MG],[ETL]| [SQLines Data] | 2019-05-29 | SQLines | | Open Source | No | +| [SqlDbAid](#sqldbaid) | No | No | [?] | [SqlDbAid] | 2018-02-10 | Miken | | Yes | No | +| [sqlectron](#sqlectron) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [sqlectron] | 2018-09-06 | sqlectron | | Open Source | No | +| [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | +| [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | +| [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | +| [SQL Hunting Dog](#sql-hunting-dog) | No | No | [S] | [SQL Hunting Dog] | ? | SQL Hunting Dog | | Yes | No | +| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions| | Yes | No | +| [SQL Server Backup](#sql-server-backup) | No | No | [B] | [SQL Server Backup] | ? | Ola Hallengren | | Yes | No | +| [SQL Server Integrity Check](#sql-server-integrity-check) | No | No | [?] | [SQL Server Integrity Check] | ? | Ola Hallengren | | Yes | No | +| [SQL Server Index and Statistics Maintenance](#index-stat-maint) | No | No | [I],[ST] | [SQL Server Index and Statistics Maintenance]| ? | Ola Hallengren | | Yes | No | +| [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | +| [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | +| [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | +| [TSQLT](#tsqlt) | No | No | [T] | [TSQLT] | ? | sqlity.net llc | | Yes | No | +| [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | +| [YourSqlDba](#yoursqldba) | No | No | [?] | [YourSqlDba] | 2020-05-05 | Maurice Pelchat | | Open Source | No | @@ -1168,6 +1197,36 @@ It generates numerically ordered SQL migration scripts that sit inside your proj You can add them to version control, use them to build and release, and automate database and application deployments, all in one process. +## SQL Search + +Download page: [SQL Search] +Release date: ? +Support Version: ? +Author: Red Gate +Free version: Yes +Prise: No + +Find SQL fast in SQL Server Management Studio and Visual Studio + - Find fragments of SQL in tables, views, stored procedures, functions, jobs, and more + - Quickly navigate to objects wherever they happen to be on a server + - Search across multiple object types and multiple databases + - Find all references to an object + - Search with booleans and wildcards + + +## SQL Scripts Manager + +Download page: [SQL Scripts Manager] +Release date: ? +Support Version: ? +Author: Red Gate +Free version: Yes +Prise: No + + - Expert scripts: contains 28 scripts written by expert DBAs, SQL Server MVPs, and Redgate's SQL developers. + - Accelerated scripting: streamline repeated administration and scripting tasks with quick and easy access to scripts. + - Customize and extend: easily build custom user interfaces around any T-SQL or IronPython script. + ## Rapid Database Extractor Download page: [Rapid Database Extractor]
@@ -1729,6 +1788,24 @@ Price: ? - Streamline incident management with native ServiceNow integration +## SQL Data Profiler + +Download page: [SQL Data Profiler]
+Release date: ?
+Support Version: 2008-2019
+Author: Idera
+Free version: No
+Price: ? + + - Profile data in SQL Server tables + - Analyze subsets of data types at a time + - Adjust profiling thresholds to customize the analysis + - Display summary of data in selected table and its columns + - Receive recommendations based on data per column + - View summary of value distribution per column + - Export results to plain text file format + + ## dbForge Schema Compare Download page: [dbForge Schema Compare]
@@ -3953,6 +4030,19 @@ Price: No Microsoft SQL Server Migration Assistant (SSMA) for Access is a tool to automate migration from Access database(s) to SQL Server and Azure SQL DB. +## SQL Server Migration Assistant for SAP ASE + +Download page: [SQL Server Migration Assistant for SAP ASE]
+Release date: 2020-06-29
+Support Version: 2012/2014/2016/2019/Azure
+Author: Microsoft
+Free version: Yes
+Price: No + +Microsoft SQL Server Migration Assistant (SSMA) for SAP ASE is a tool to automate migration from SAP ASE database(s) to SQL Server, Azure SQL Database and Azure SQL Database Managed Instance. +SSMA for SAP ASE is designed to support migration from SAP ASE version 11.9 and higher. + + ## mssql for Visual Studio Code Download page: [mssql for Visual Studio Code]
@@ -5150,6 +5240,345 @@ Prise: No Pssdiag/Sqldiag Manager is a graphic interface that provides customization capabilities to collect data for SQL Server using sqldiag collector engine. The data collected can be used by SQL Nexus tool which help you troubleshoot SQL Server performance problems. This is the same tool Microsoft SQL Server support engineers use to for data collection to troubleshoot customer's performance problems. +## sp_Blitz + +Download page: [sp_Blitz] +Release date: ? +Support Version: 2005-2016 +Author: Brent Ozar +Free version: Yes +Prise: No + +Fast, easy, free health check that flags common issues in seconds, and for each warning, gives you a link to a web page with more in-depth advice. + + +## sp_whoisactive + +Download page: [sp_whoisactive] +Release date: 2017-10-10 +Support Version: 2005-2017 +Author: Adam Machanic +Free version: Yes +Prise: No + +Comprehensive activity monitoring stored procedure that works for all versions of SQL Server from 2005 through 2017 + + +## SQuirreL SQL Client + +Download page: [SQuirreL SQL Client] +Release date: 2020-04-30 +Support Version: ? +Author: Colin Bell, Gerd Wagner +Free version: Yes +Prise: No + +SQuirreL SQL Client is a JAVA-based database administration tool for JDBC compliant databases. It allows you to view the database structure and issue SQL commands. It provides an editor that offers code completion and syntax highlighting for standard SQL. + + +## Data Synchronisation Studio + +Download page: [Data Synchronisation Studio] +Release date: 2020-05-26 +Support Version: SQL Server 2014 or higher +Author: Simego Ltd +Free version: No +Prise: $999 + +The complete package for data integration and automation for SQL. + - Import + Export + - Data Reconciliation + - Data Preview + - Transformation + - Lookups + - Connection Library + - Schedule + + +## SQL Converter + +Download page: [SQL Converter] +Release date: 2015-12-15 +Support Version: ? +Author: Alaa Ben Fatma +Free version: Yes +Prise: No + +SQL Converter is the utility, allowing one to extract information from source servers selectively and save it to a variety of formats. + + +## SQLDBSearch + +Download page: [SQLDBSearch] +Release date: ? +Support Version: 2000-2019 +Author: Mohamed Bouarroudj +Free version: Yes +Prise: No + +SQLDBSearch is a SQL Server tool that lets you easily and quickly search for database objects or SQL statements across your databases. + + +## SQLDBSize + +Download page: [SQLDBSize] +Release date: ? +Support Version: 2000-2019 +Author: Mohamed Bouarroudj +Free version: Yes +Prise: No + +SQLDBSize is a SQL Server tool that allows you to display graphically the size used or reserved by tables, indexes, databases, transaction logs and physical files. + + +## SQLines Data + +Download page: [SQLines Data] +Release date: 2019-05-29 +Support Version: ? +Author: SQLines +Free version: Yes +Prise: No + +SQLines Data is an open source, scalable, parallel high performance data transfer and schema conversion tool that you can use for database migrations and ETL processes. + + +## SSqlDbAid + +Download page: [SqlDbAid] +Release date: 2018-02-10 +Support Version: 2005+ +Author: Miken +Free version: Yes +Prise: No + + - Text search inside code definition with highlitghting + - DBA reports (missing indexes, missing foreign key indexes, indexes status, top queries, table MBytes) + - One file per object or single file scripts (tables, views, triggers, procedures, functions, indexes...) + - Select, Insert and Update scripts + - Table data insert script creation + - Table/View data export + - Offline database compare tool + + +## sqlectron + +Download page: [sqlectron] +Release date: 2018-09-06 +Support Version: ? +Author: sqlectron +Free version: Yes +Prise: No + +A simple and lightweight SQL client with cross database and platform support. + + +## SQL ExecStats + +Download page: [SQL ExecStats] +Release date: ? +Support Version: ? +Author: Elemental Inc +Free version: Yes +Prise: No + +ExecStats started out with a focus on execution plan analysis with cross-referencing index usage to the SQL. Formerly separate programs for performance monitoring and server system architecture discovery via WMI have now been integrated into ExecStats. + + +## SQL-FineBuild + +Download page: [SQL-FineBuild] +Release date: 2017-10-28 +Support Version: 2005-2017 +Author: Edward Vassie +Free version: Yes +Prise: No + +SQL FineBuild provides 1-click install and best-practice configuration on Windows of SQL Server 2017 down to SQL Server 2005. + + +## SQL Health Monitor + +Download page: [SQL Health Monitor] +Release date: ? +Support Version: 2000-2014 +Author: Edward Vassie +Free version: Yes +Prise: No + + - Keep a tab on the performance parameters of both default and named instances + - Get a dashboard view of system resources used & MS SQL performance parameters + - Fetch the status of Winodws services related to your MS SQL Server + - Keep an eye on buffer, memory, lock and latch details of your MS SQL Server + - Generate real time performance reports in PDF format and Email it from the tool + + +## SQL Hunting Dog + +Download page: [SQL Hunting Dog] +Release date: ? +Support Version: 2015-08-16 +Author: SQL Hunting Dog +Free version: Yes +Prise: No + +Quick Search Tool (AddIn) for Microsoft SQL Management Studio 2008/2012/2014 + - Quickly find tables, stored procedure, functions and views + - Completely removes the pain of clunky Object Explorer + - Switch between different servers and databases + - Perform common operation (select data, modify table, design table, etc.) with ease + + +## SQL Instance Check + +Download page: [SQL Instance Check] +Release date: ? +Support Version: 2008-2019 +Author: Idera +Free version: Yes +Prise: No + + + - Monitor 20 key performance metrics + - See throughput of varying types + - See "heartbeat" statistics at different intervals + - Up and running in minutes with easy installation wizard + - No agents required + - Connect to cloud and run in cloud (provisional) + + +## SQLPRep + +Download page: [SQLPRep] +Release date: ? +Support Version: ? +Author: Consequential Solutions +Free version: Yes +Prise: No + +SQLPRep 2015 aka SQL Performance Report is our newest software product that takes any TSQL and produces a concise, readable, highlighted performance report allowing you to greatly reduce your time spent in developing, debugging, optimising, testing and reviewing TSQL. + + +## SQL Server Backup + +Download page: [SQL Server Backup] +Release date: ? +Support Version: 2008-2019 +Author: Ola Hallengren +Free version: Yes +Prise: No + +DatabaseBackup is the SQL Server Maintenance Solution’s stored procedure for backing up databases. + + +## SQL Server Integrity Check + +Download page: [SQL Server Integrity Check] +Release date: ? +Support Version: 2008-2019 +Author: Ola Hallengren +Free version: Yes +Prise: No + +DatabaseIntegrityCheck is the SQL Server Maintenance Solution’s stored procedure for checking the integrity of databases. + + +## SQL Server Index and Statistics Maintenance + +Download page: [SQL Server Index and Statistics Maintenance] +Release date: ? +Support Version: 2008-2019 +Author: Ola Hallengren +Free version: Yes +Prise: No + +IndexOptimize is the SQL Server Maintenance Solution’s stored procedure for rebuilding and reorganizing indexes and updating statistics. + + +## SQL Server Monitoring + +Download page: [SQL Server Monitoring] +Release date: ? +Support Version: 2005 and higher +Author: Spiceworks +Free version: Yes +Prise: No + + - Auto collect data about the server + - Instantly access health info on the data + - Create multiple widgets to monitor what you want + - Monitor SQL Server size, connection, speed & more + + +## SQL Server Storage manager + +Download page: [SQL Server Storage manager] +Release date: ? +Support Version: ? +Author: Lepide Software +Free version: Yes +Prise: No + + - Removes the need to writing complex SQL Servers and stored procedures + - Provides real time alerts based on easy to configure criteria + - Provides a centralized platform to create consolidated reports of all SQL resources + - Provides simple graphical displays showing all elements of your SQL servers + + +## SysKit Pulse + +Download page: [SysKit Pulse] +Release date: ? +Support Version: ? +Author: SysKit Ltd +Free version: Yes +Prise: No + + - Track servers via interactive live dashboards. + - Server Auto-Discover Wizard + - Performance Counters Check + - A simplified way of looking at your servers. + + +## TSQLT + +Download page: [TSQLT] +Release date: ? +Support Version: from 2005 +Author: sqlity.net llc +Free version: Yes +Prise: No + + - Tests are automatically run within transactions + - Tests can be grouped together within a schema + - Output can be generated in plain text or XML + - The framework gives you the ability to fake tables and views, and create stored procedure spies + + +## WhatsUp SQL Server Monitor + +Download page: [WhatsUp SQL Server Monitor] +Release date: ? +Support Version: ? +Author: Ipswitch +Free version: Yes +Prise: No + +The WhatsUp SQL Server Monitor is a free tool that shows off Ipswitch monitoring technology you can use to catch problems before they begin to affect users. + + +## YourSqlDba + +Download page: [YourSqlDba] +Release date: 2020-05-05 +Support Version: ? +Author: Maurice Pelchat +Free version: Yes +Prise: No + +YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules (function, stored procedures, and views) on the server where it is run. You don't need to be concerned by all of them, albeit some of them are interesting tools for exceptional day-to-day DBA tasks, out of regular maintenance tasks. + + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -5239,6 +5668,7 @@ Pssdiag/Sqldiag Manager is a graphic interface that provides customization capab [SQL Comparison Toolset]:https://www.idera.com/productssolutions/sqlserver/sqlcomparisontoolset [ER/Studio Data Architect]:https://www.idera.com/er-studio-data-architect-software [DB Change Manager]:https://www.idera.com/database-change-management +[SQL Data Profiler]:https://www.idera.com/productssolutions/freetools/sql-data-profiler [dbForge Schema Compare]: https://www.devart.com/dbforge/sql/schemacompare/ [dbForge Data Compare]: https://www.devart.com/dbforge/sql/datacompare/ [dbForge Data Generator]: https://www.devart.com/dbforge/sql/data-generator/ @@ -5480,6 +5910,34 @@ Pssdiag/Sqldiag Manager is a graphic interface that provides customization capab [Powershell Scripts]:https://www.idera.com/productssolutions/freetools/sqlpowershellscripts [PSDatabaseClone]:https://psdatabaseclone.org/# [Pssdiag&Sqldiag Manager]:https://github.com/microsoft/DiagManager/releases +[sp_Blitz]:https://www.brentozar.com/blitz +[sp_whoisactive]:http://whoisactive.com +[SQuirreL SQL Client]:http://squirrelsql.org +[Data Synchronisation Studio]:https://www.simego.com/solutions/sql +[SQL Converter]:https://sourceforge.net/projects/sql-converter +[SQLDBSearch]:https://www.sqldbtools.com/tools/sqldbsearch +[SQLDBSize]:https://www.sqldbtools.com/tools/sqldbsize +[SQLines Data]:http://www.sqlines.com/sqldata +[SqlDbAid]:http://sqlapproach.blogspot.com/2010/06/sqldbaid.html +[sqlectron]:https://sqlectron.github.io +[SQL ExecStats]:http://www.qdpma.com/execstats/sqlexecstats.html +[SQL-FineBuild]:https://github.com/SQL-FineBuild/v3.4 +[SQL Health Monitor]:https://www.manageengine.com/sql-performance-monitor/sql-server-monitoring-index.html +[SQL Hunting Dog]:http://www.sql-hunting-dog.com +[SQL Instance Check]:https://www.idera.com/productssolutions/freetools +[SQLPRep]:https://www.csqls.com/products +[SQL Search]:https://www.red-gate.com/products/sql-development/sql-search +[SQL Server Migration Assistant for SAP ASE]:https://www.microsoft.com/en-us/download/details.aspx?id=54256 +[SQL Scripts Manager]:https://www.red-gate.com/products/dba/sql-scripts-manager +[SQL Server Backup]:https://ola.hallengren.com/sql-server-backup.html +[SQL Server Index and Statistics Maintenance]:https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html +[SQL Server Integrity Check]:https://ola.hallengren.com/sql-server-integrity-check.html +[SQL Server Monitoring]:https://www.spiceworks.com/free-sql-server-monitoring-tool +[SQL Server Storage manager]:https://www.lepide.com/sql-storage-manager +[SysKit Pulse]:https://www.syskit.com/products/insights-lite +[TSQLT]:http://tsqlt.org +[WhatsUp SQL Server Monitor]:https://www.ipswitch.com/resources/free-tools/whatsup-sql-server-monitor +[YourSqlDba]:https://github.com/pelsql/YourSqlDba [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 9d4d13bf7a01420a58eb9657a187cc813438a657 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 13 Jul 2020 16:58:18 +0300 Subject: [PATCH 013/553] Add SQL-Server-Multi-Thread link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 77816dfe..8068ea75 100644 --- a/README.md +++ b/README.md @@ -359,6 +359,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [homebrew-mssql-release - brew formulae for Microsoft ODBC Driver for SQL Server and SQL Server Command Line Utilities](https://github.com/microsoft/homebrew-mssql-release) (by Microsoft) - [ASSP - Analysis Services Stored Procedure Project](https://asstoredprocedures.github.io/ASStoredProcedures/) (by Darren Gosbell) - [Data-Blogger-Resource-Kit - Includes resources for use by bloggers, microbloggers, vloggers, and origami enthusiasts who focus on SQL Server](https://github.com/amtwo/Data-Blogger-Resource-Kit) (by Andy Andy Mallon) + - [SQL-Server-Multi-Thread - a framework to do multi-threading in T-SQL using SQL Server Agent jobs.](https://github.com/jobbish-sql/SQL-Server-Multi-Thread) (by ) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 0a43ff4eab7b67b5fb3eaa3331e1c3911a42e8f3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 14 Jul 2020 17:09:56 +0300 Subject: [PATCH 014/553] Add Oracle_Employee_Database script --- Sample_Databases/Oracle_Employee_Database.sql | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Sample_Databases/Oracle_Employee_Database.sql diff --git a/Sample_Databases/Oracle_Employee_Database.sql b/Sample_Databases/Oracle_Employee_Database.sql new file mode 100644 index 00000000..4248b67f --- /dev/null +++ b/Sample_Databases/Oracle_Employee_Database.sql @@ -0,0 +1,62 @@ +/* +Source link: https://github.com/ktaranov/sqlserver-kit/blob/master/Sample_Databases/Oracle_Employee_Database.sql +Changed data type to more unviversal: varchar2 -> varchar, number -> int +Tested on SQL Server 2019 and Postgres 12.2 +Original link: https://livesql.oracle.com/apex/livesql/file/content_O5AEB2HE08PYEPTGCFLZU9YCV.html +Code style for PostgresSQL - python like. +*/ + +DROP TABLE employee; +DROP TABLE department; + +CREATE TABLE department ( + id int NOT NULL + , name varchar(100) NOT NULL + , CONSTRAINT pk_department PRIMARY KEY (id) +); + +CREATE TABLE employee ( + id int NOT NULL + , department_id INT NOT NULL + , chief_id int NULL + , name varchar(100) NOT NULL + , salary DECIMAL(19,2) NOT NULL + , CONSTRAINT pk_employee PRIMARY KEY (id) +); + +ALTER TABLE employee ADD CONSTRAINT fk_employee__department_id FOREIGN KEY (department_id) REFERENCES department(id); +ALTER TABLE employee ADD CONSTRAINT fk_employee__cheief_id FOREIGN KEY (chief_id) REFERENCES employee(id); + +INSERT INTO department (id, name) VALUES(10, 'ACCOUNTING'); +INSERT INTO department (id, name) VALUES(20, 'RESEARCH'); +INSERT INTO department (id, name) VALUES(30, 'SALES'); +INSERT INTO department (id, name) VALUES(40, 'OPERATIONS'); + +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7839, 'KING', null, 5000, 10); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7698, 'BLAKE', 7839, 2850, 30); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7782, 'CLARK', 7839, 2450, 10); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7566, 'JONES',7839, 2975, 20); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7788, 'SCOTT', 7566, 3000, 20); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7902, 'FORD', 7566, 3000, 20); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7369, 'SMITH', 7902, 800, 20); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7499, 'ALLEN', 7698, 1600, 30); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7521, 'WARD', 7698, 1250, 30); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7654, 'MARTIN', 7698, 1250, 30); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7844, 'TURNER', 7698, 1500, 30); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7876, 'ADAMS', 7788, 1100, 20); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7900, 'JAMES', 7698, 950, 30 ); +INSERT INTO employee(id, name, chief_id, salary, department_id) +VALUES(7934, 'MILLER', 7782, 1300, 10); From 03a7fe72172fc628ca89f4c0ca5f68ce310af1fe Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 15 Jul 2020 17:30:52 +0300 Subject: [PATCH 015/553] Add oracle_employee sample database meta info --- Sample_Databases/Oracle_Employee_Database.sql | 2 ++ Sample_Databases/README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Sample_Databases/Oracle_Employee_Database.sql b/Sample_Databases/Oracle_Employee_Database.sql index 4248b67f..66723c34 100644 --- a/Sample_Databases/Oracle_Employee_Database.sql +++ b/Sample_Databases/Oracle_Employee_Database.sql @@ -6,6 +6,8 @@ Original link: https://livesql.oracle.com/apex/livesql/file/content_O5AEB2HE08PY Code style for PostgresSQL - python like. */ +CREATE DATABASE oracle_employee; + DROP TABLE employee; DROP TABLE department; diff --git a/Sample_Databases/README.md b/Sample_Databases/README.md index a9160b9d..62de6dbf 100644 --- a/Sample_Databases/README.md +++ b/Sample_Databases/README.md @@ -26,6 +26,7 @@ Some databases you can download from this repository: https://rebrand.ly/sample- | [AdventureWorks Tabular Model] | ? | AS | 21 | ? | ? | | [Northwind Database][1] | 2000 | OLTP | - | ? | ? | | [Pub Database][1] | 2000 | OLTP | - | ? | ? | +| [Oracle Employee Database] | 2000 | OLTP | 3 | 4 | 2 | [StackOverflow 2010 Database]:https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ [StackOverflow Database]:https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ @@ -46,6 +47,7 @@ Some databases you can download from this repository: https://rebrand.ly/sample- [AdventureWorks Multidimensional Model]:https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks-analysis-services/adventure-works-multidimensional-model-full-database-backup.zip [AdventureWorks Tabular Model]:https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks-analysis-services/adventure-works-tabular-model-1200-full-database-backup.zip [1]:https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs +[Oracle Employee Database]:https://github.com/ktaranov/sqlserver-kit/blob/master/Sample_Databases/Oracle_Employee_Database.sql ## Datasets - [Data.gov](https://www.data.gov/) From 47d18c29fd976688ea4de1884a9e34cd76e40644 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 16 Jul 2020 19:07:16 +0300 Subject: [PATCH 016/553] Add new sql server articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b142e424..3f157d1c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1128,6 +1128,9 @@ Articles types: | [Sql Server — Widely Random Query Exec Times (cxconsumer Wait/cxpacket) & Possible Remediation] | VIKTOR | 2020-06-26 | [DBA][DEV] | | [How MAXDOP Really Works] | Paul White | 2020-06-07 | [DBA][DEV] | | [What is MaxDOP controlling?] | Pedro Lopes | 2020-07-07 | [DBA][DEV] | +| [What If You Really DO Need to Shrink a Database?] | Brent Ozar | 2020-07-14 | [DBA] | +| [Everything I Never Wanted to Know About Collation] | Kendra Little | 2020-07-16 | [DBA][DEV] | +| [Comparing SSIS And Azure Data Factory] | Tim Mitchell | 2020-07-16 | [AZ][SSIS] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2231,3 +2234,6 @@ Articles types: [Sql Server — Widely Random Query Exec Times (cxconsumer Wait/cxpacket) & Possible Remediation]:https://viktorsrandomposts.wordpress.com/2020/06/26/sql-server-widely-random-query-exec-times-cxconsumer-wait-possible-remediation/ [How MAXDOP Really Works]:https://www.sql.kiwi/2020/07/how-maxdop-really-works.html [What is MaxDOP controlling?]:https://techcommunity.microsoft.com/t5/sql-server/what-is-maxdop-controlling/ba-p/1505968 +[What If You Really DO Need to Shrink a Database?]:https://www.brentozar.com/archive/2020/07/what-if-you-really-do-need-to-shrink-a-database/ +[Everything I Never Wanted to Know About Collation]:https://littlekendra.com/2020/07/16/everything-i-never-wanted-to-know-about-collation-14-minute-video-podcast-episode/ +[Comparing SSIS And Azure Data Factory]:https://www.timmitchell.net/post/2020/07/16/comparing-ssis-and-azure-data-factory/ From ab6a0b3c95f3689a012c50f6f268a7a08fa5d408 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 17 Jul 2020 20:11:09 +0300 Subject: [PATCH 017/553] Add free The Fundamental Guide To Sql Query Optimization ebook link --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8068ea75..9ea4ee43 100644 --- a/README.md +++ b/README.md @@ -556,7 +556,8 @@ SQL Server: - [Nutanix Best Practices for SQL Server 2016](https://www.nutanix.com/viewer.html?type=pdf&lpurl=virtualize-microsoft-sql-server-hyperconverged-infrastructure.php&fromCampaign=true) (by Nutanix, Inc.) - [Cloud Analytics with Microsoft Azure](https://azure.microsoft.com/en-us/resources/cloud-analytics-with-microsoft-azure/) (by Has Altaiar, Jack Lee, Michael Peña) - [Snowflake for SQL Server Users Part 1 – Core Concepts](https://sqldownunder.blob.core.windows.net/public/SnowflakeForSQLServerUsers_Part_1_CoreConcepts%20-%20for%20SDU%20Insiders.pdf) (by Dr Greg Low) - + - [The Fundamental Guide To Sql Query Optimization](https://www.quest.com/whitepapert/the-fundamental-guide-to-sql-query-optimization8143740/) (by Janis Griffin) + R: - [BookDown - Write HTML, PDF, ePub, and Kindle books with R Markdown](https://bookdown.org) - [FreeComputerBooks R EBooks](http://freecomputerbooks.com/langRBooks.html) From f3b19410579da07aeea8ba8cdbf6b4fa8a90570d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 18 Jul 2020 09:38:57 +0300 Subject: [PATCH 018/553] Add Reddit and update twitter social info --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ea4ee43..d99ce63e 100644 --- a/README.md +++ b/README.md @@ -264,11 +264,12 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Power BI feedback](https://ideas.powerbi.com/forums/265200-power-bi-ideas) - [SSMS feedback](https://social.msdn.microsoft.com/Forums/en-US/home?forum=sqltools) - [SQL Server Data Tools feedback](https://social.msdn.microsoft.com/Forums/en-US/home?forum=ssdt&filter=alltypes&sort=lastpostdesc) - - Social, Forum and Messenger SQL Server Groups + - Social, Forum and Messenger SQL Server Groups - [SQLServerCentral Forum](http://www.sqlservercentral.com/Forums/) (more than 10^6 People) - [Slack #sqlhelp](https://sqlcommunity.slack.com/messages/sqlhelp/) (more than 900 People) - [Slack #firstresponderkit](https://sqlcommunity.slack.com/messages/firstresponderkit/) (more then 90 People) - - [Twitter #sqlhelp](https://twitter.com/hashtag/sqlhelp) (more than 500 People) + - [Twitter #SQLServer](https://twitter.com/hashtag/SQLServer), [Twitter #SQLFamily](https://twitter.com/hashtag/SQLFamily), [Twitter #sqlhelp](https://twitter.com/hashtag/sqlhelp) (more than 500 People) + - Reddit – [`/r/sqlserver`](https://www.reddit.com/r/SQLServer/), ['/r/sql`](https://www.reddit.com/r/SQL/), and ['/r/database`](https://www.reddit.com/r/Database/) - [SQL.ru SQL Server Forum](http://www.sql.ru/forum/microsoft-sql-server) (more than 10^5 People, Russian) - [VK.com #sqlcom](https://vk.com/sqlcom) (more than 3600 People, Russian) - [SQL Server User Group Meetings](https://www.mssqltips.com/sql-server-user-groups/) @@ -277,6 +278,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [PowerBI telegram chat](https://t.me/PBI_Rus) (295 People, Russian) - [PostgesSQL telegram chat](https://t.me/pgsql) (2823 People, Russian) - [DBA telegram chat](https://t.me/dba_ru) (1389 People, Russian) + - - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From 297062ae332d43104d9a486eef2a106d40bbc8cf Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 19 Jul 2020 09:52:47 +0300 Subject: [PATCH 019/553] Add new pretty good articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3f157d1c..ebe8671f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1131,6 +1131,9 @@ Articles types: | [What If You Really DO Need to Shrink a Database?] | Brent Ozar | 2020-07-14 | [DBA] | | [Everything I Never Wanted to Know About Collation] | Kendra Little | 2020-07-16 | [DBA][DEV] | | [Comparing SSIS And Azure Data Factory] | Tim Mitchell | 2020-07-16 | [AZ][SSIS] | +| [sp_Blitz for All Servers] | Garry Bargsley | 2020-07-14 | [DBA] | +| [Where is the SQL Server Community Networking Online?] | Brent Ozar | 2020-07-13 | [DBA][DEV] | +| [Make the most out of your Azure Disks using Storage Pools] | Roberto Marras | 2020-07-01 | [AZ][DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2237,3 +2240,6 @@ Articles types: [What If You Really DO Need to Shrink a Database?]:https://www.brentozar.com/archive/2020/07/what-if-you-really-do-need-to-shrink-a-database/ [Everything I Never Wanted to Know About Collation]:https://littlekendra.com/2020/07/16/everything-i-never-wanted-to-know-about-collation-14-minute-video-podcast-episode/ [Comparing SSIS And Azure Data Factory]:https://www.timmitchell.net/post/2020/07/16/comparing-ssis-and-azure-data-factory/ +[sp_Blitz for All Servers]:https://garrybargsley.com/2020/07/14/sp_blitz-for-all-servers/ +[Where is the SQL Server Community Networking Online?]:https://www.brentozar.com/archive/2020/07/where-is-the-sql-server-community-networking-online/ +[Make the most out of your Azure Disks using Storage Pools]:https://blog.coeo.com/make-the-most-out-of-your-azure-disks-using-storage-pools From 101a90204b3b8b34eb86ee98af8d90004d28bc09 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 20 Jul 2020 10:53:46 +0300 Subject: [PATCH 020/553] Add new sql server articles --- Articles/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ebe8671f..a651747a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1134,6 +1134,14 @@ Articles types: | [sp_Blitz for All Servers] | Garry Bargsley | 2020-07-14 | [DBA] | | [Where is the SQL Server Community Networking Online?] | Brent Ozar | 2020-07-13 | [DBA][DEV] | | [Make the most out of your Azure Disks using Storage Pools] | Roberto Marras | 2020-07-01 | [AZ][DBA] | +| [SQL Server High Availability Solutions on Azure VMs] | Marco Obinu | 2020-07-12 | [AZ][DBA] | +| [How to Get Started with SQL Server Management Studio] | Brent Ozar | 2020-07-21 | [DBA][DEV] | +| [How should I store currency values in SQL Server?] | Randolph West | 2020-06-03 | [DBA][DEV] | +| [Read committed isolation level doesn’t guarantee much…] | Paul Randal | 2010-04-17 | [DBA][DEV] | +| [Prevent Unexpected Failovers When Patching AGs] | Josh Darnell | 2010-05-21 | [DBA] | +| [Updating Statistics Causes Parameter Sniffing] | Brent Ozar | 2010-06-02 | [DBA][DEV] | +| [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-01-01 | [DBA][DEV] | +| [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2243,3 +2251,10 @@ Articles types: [sp_Blitz for All Servers]:https://garrybargsley.com/2020/07/14/sp_blitz-for-all-servers/ [Where is the SQL Server Community Networking Online?]:https://www.brentozar.com/archive/2020/07/where-is-the-sql-server-community-networking-online/ [Make the most out of your Azure Disks using Storage Pools]:https://blog.coeo.com/make-the-most-out-of-your-azure-disks-using-storage-pools +[SQL Server High Availability Solutions on Azure VMs]:https://www.brentozar.com/archive/2020/07/where-is-the-sql-server-community-networking-online/ +[How to Get Started with SQL Server Management Studio]:https://www.brentozar.com/archive/2020/07/how-to-get-started-with-sql-server-management-studio/ +[How should I store currency values in SQL Server?]:https://bornsql.ca/blog/how-should-i-store-currency-values-in-sql-server/ +[Read committed isolation level doesn’t guarantee much…]:https://www.sqlskills.com/blogs/paul/read-committed-doesnt-guarantee-much/ +[Prevent Unexpected Failovers When Patching AGs]:https://joshthecoder.com/2020/05/21/prevent-unexpected-failovers-when-patching-ags.html +[Updating Statistics Causes Parameter Sniffing]:https://www.brentozar.com/archive/2020/06/updating-statistics-causes-parameter-sniffing/ +[The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ From 4cf0e2a820f5349099bb9339265897165e4bc792 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 21 Jul 2020 11:27:50 +0300 Subject: [PATCH 021/553] Add Idera bloag and SQLTeam Forum --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d99ce63e..04b6867a 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [BornSQL Blog](https://bornsql.ca/blog/) - [Kevin Chant Blog](https://www.kevinrchant.com/) - [SQLBlog.org](https://sqlblog.org) + - [Idera SQL Server Blog](https://community.idera.com/tags/SQL%2bServer) - Security (great thanks to [Troy Hunt](https://www.troyhunt.com/troys-ultimate-list-of-security-links/)) - SQL injection - [sqlmap](http://sqlmap.org/) – The tool for mounting SQL injection attacks tests against a running site @@ -278,7 +279,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [PowerBI telegram chat](https://t.me/PBI_Rus) (295 People, Russian) - [PostgesSQL telegram chat](https://t.me/pgsql) (2823 People, Russian) - [DBA telegram chat](https://t.me/dba_ru) (1389 People, Russian) - - + - [SQLTeam SQL Server Forum](https://forums.sqlteam.com/) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From 5922f8440d962b9fbad6818d23ae7aee2cb4fbc5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 22 Jul 2020 11:28:32 +0300 Subject: [PATCH 022/553] Add SSMS 18.6 version info --- SSMS/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index 9099b9e2..9b5ab10c 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -48,17 +48,17 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u ## Available Languages **SQL Server Management Studio 18.5 GA**: - [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x804) | - [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x404) | - [English (United States)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x409) | - [French](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x40c) | - [German](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x407) | - [Italian](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x410) | - [Japanese](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x411) | - [Korean](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x412) | - [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x416) | - [Russian](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x419) | - [Spanish](https://go.microsoft.com/fwlink/?linkid=2132606&clcid=0x40a) + [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x804) | + [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x404) | + [English (United States)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x409) | + [French](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x40c) | + [German](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x407) | + [Italian](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x410) | + [Japanese](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x411) | + [Korean](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x412) | + [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x416) | + [Russian](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x419) | + [Spanish](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x40a) ## SQL Server Management Studio Download Links and Release Info @@ -68,8 +68,9 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.5.1 GA Release] | **Latest GA** | 15.0.18333.0 | 2020-07-09 | 535 | -| [18.5 GA Release] | | 15.0.18206.0 | 2020-04-07 | 535 | +| [18.6 GA Release] | **Latest GA** | 15.0.18338.0 | 2020-07-22 | 534 | +| [18.5.1 GA Release] | | 15.0.18333.0 | 2020-07-09 | 535 | +| [18.5 GA Release] | | 15.0.18183.0 | 2020-04-07 | 535 | | [18.4 GA Release] | | 15.0.18206.0 | 2019-11-04 | 539 | | [18.3.1 GA Release] | | 15.0.18183.0 | 2019-10-02 | 534 | | [18.3 GA Release] | | 15.0.18178.0 | 2019-09-23 | 534 | @@ -110,6 +111,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | +[18.6 GA Release]:https://go.microsoft.com/fwlink/?linkid=2135491 [18.5.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2132606 [18.5 GA Release]:https://go.microsoft.com/fwlink/?linkid=2125901 [18.4 GA Release]:https://go.microsoft.com/fwlink/?linkid=2108895 From 4dd52c841b37e74684f24c91a4528f3d39cc512e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 23 Jul 2020 11:34:27 +0300 Subject: [PATCH 023/553] Add new articles --- Articles/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a651747a..a37f04e1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1142,6 +1142,10 @@ Articles types: | [Updating Statistics Causes Parameter Sniffing] | Brent Ozar | 2010-06-02 | [DBA][DEV] | | [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-01-01 | [DBA][DEV] | | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DBA][DEV] | +| [Are Statistics Being Used for inserted and deleted tables and table variables?] | Deborah Melkin | 2020-05-05 | [DBA][DEV] | +| [Tackling Imperial and US Customary Measurements in Databases] | Phil Factor | 2020-05-06 | [DBA][DEV] | +| [In-Memory OLTP Best Practices – Part 1] | Jon Guerin, Daniel Taylor | 2020-03-11 | [DBA][DEV] | +| [In-Memory OLTP Best Practices – Part 2] | Jon Guerin, Daniel Taylor | 2020-05-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2258,3 +2262,7 @@ Articles types: [Prevent Unexpected Failovers When Patching AGs]:https://joshthecoder.com/2020/05/21/prevent-unexpected-failovers-when-patching-ags.html [Updating Statistics Causes Parameter Sniffing]:https://www.brentozar.com/archive/2020/06/updating-statistics-causes-parameter-sniffing/ [The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ +[Are Statistics Being Used for inserted and deleted tables and table variables?]:https://community.idera.com/database-tools/blog/b/community_blog/posts/are-statistics-being-used +[Tackling Imperial and US Customary Measurements in Databases]:https://www.red-gate.com/simple-talk/blogs/tackling-imperial-and-us-customary-measurements-in-databases/ +[In-Memory OLTP Best Practices – Part 1]:https://devblogs.microsoft.com/premier-developer/in-memory-oltp-best-practices-part-1/ +[In-Memory OLTP Best Practices – Part 2]:https://devblogs.microsoft.com/premier-developer/in-memory-oltp-best-practices-part-2/ From 0c66390456e4f571793808e10cde644c2236875f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 24 Jul 2020 11:35:08 +0300 Subject: [PATCH 024/553] Add Red Gate SQL Server Forum --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 04b6867a..842aab5c 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [PostgesSQL telegram chat](https://t.me/pgsql) (2823 People, Russian) - [DBA telegram chat](https://t.me/dba_ru) (1389 People, Russian) - [SQLTeam SQL Server Forum](https://forums.sqlteam.com/) + - [Red Gate SQL Server Forum](https://forum.red-gate.com/) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From 0ff301b5fc4ef2c3a00126a933fb6ca83547b625 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 25 Jul 2020 12:48:42 +0300 Subject: [PATCH 025/553] Add new must read aticles --- Articles/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a37f04e1..f3293bc9 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1146,6 +1146,11 @@ Articles types: | [Tackling Imperial and US Customary Measurements in Databases] | Phil Factor | 2020-05-06 | [DBA][DEV] | | [In-Memory OLTP Best Practices – Part 1] | Jon Guerin, Daniel Taylor | 2020-03-11 | [DBA][DEV] | | [In-Memory OLTP Best Practices – Part 2] | Jon Guerin, Daniel Taylor | 2020-05-06 | [DBA][DEV] | +| [Things I Wished More Developers Knew About Databases] | Jaana Dogan | 2020-04-21 | [DBA][DEV] | +| [Online migrations at scale] | Jacqueline Xu | 2017-02-02 | [DBA] | +| [The Dirty (Baker’s) Dozen of SQL Server Technical Debt] | Andy Jones | 2020-06-01 | [DBA][DEV] | +| [15 SQL Server Performance Counters to Monitor In 2020] | Allen White | 2020-05-05 | [DBA][DEV] | +| [Pulling Group By Above a Join] | Paul White | 2020-05-31 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2266,3 +2271,8 @@ Articles types: [Tackling Imperial and US Customary Measurements in Databases]:https://www.red-gate.com/simple-talk/blogs/tackling-imperial-and-us-customary-measurements-in-databases/ [In-Memory OLTP Best Practices – Part 1]:https://devblogs.microsoft.com/premier-developer/in-memory-oltp-best-practices-part-1/ [In-Memory OLTP Best Practices – Part 2]:https://devblogs.microsoft.com/premier-developer/in-memory-oltp-best-practices-part-2/ +[Things I Wished More Developers Knew About Databases]:https://medium.com/@rakyll/things-i-wished-more-developers-knew-about-databases-2d0178464f78 +[Online migrations at scale]:https://stripe.com/blog/online-migrations +[The Dirty (Baker’s) Dozen of SQL Server Technical Debt]:https://blog.coeo.com/the-dirty-bakers-dozen-of-sql-server-technical-debt +[15 SQL Server Performance Counters to Monitor In 2020]:https://www.sentryone.com/blog/allenwhite/sql-server-performance-counters-to-monitor +[Pulling Group By Above a Join]:https://www.sql.kiwi/2020/05/pulling-group-by-above-join.html From 4a6bbf7df9fcf23f31a523c081839c00ee3efb66 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 26 Jul 2020 13:05:30 +0300 Subject: [PATCH 026/553] Add good sql server articles --- Articles/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f3293bc9..a8a34e23 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1151,6 +1151,12 @@ Articles types: | [The Dirty (Baker’s) Dozen of SQL Server Technical Debt] | Andy Jones | 2020-06-01 | [DBA][DEV] | | [15 SQL Server Performance Counters to Monitor In 2020] | Allen White | 2020-05-05 | [DBA][DEV] | | [Pulling Group By Above a Join] | Paul White | 2020-05-31 | [DBA][DEV] | +| [SQLskills SQL101: Running out of ints and bigints] | Paul Randal | 2017-10-03 | [DBA][DEV] | +| [Parallel Execution Plans – Branches and Threads] | Paul White | 2013-10-07 | [DBA][DEV] | +| [Understanding and Using Parallelism in SQL Server] | Paul White | 2011-03-03 | [DBA][DEV] | +| [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers] | Sean Gallardy | 2020-06-16 | [DBA] | +| [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates] | Brent Ozar | 2020-07-07 | [DBA][DEV] | +| [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows] | Brent Ozar | 2020-07-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2276,3 +2282,9 @@ Articles types: [The Dirty (Baker’s) Dozen of SQL Server Technical Debt]:https://blog.coeo.com/the-dirty-bakers-dozen-of-sql-server-technical-debt [15 SQL Server Performance Counters to Monitor In 2020]:https://www.sentryone.com/blog/allenwhite/sql-server-performance-counters-to-monitor [Pulling Group By Above a Join]:https://www.sql.kiwi/2020/05/pulling-group-by-above-join.html +[SQLskills SQL101: Running out of ints and bigints]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-running-out-of-ints-and-bigints/ +[Parallel Execution Plans – Branches and Threads]:https://sqlperformance.com/2013/10/sql-plan/parallel-plans-branches-threads +[Understanding and Using Parallelism in SQL Server]:https://www.red-gate.com/simple-talk/sql/learn-sql-server/understanding-and-using-parallelism-in-sql-server/ +[Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers]:https://www.seangallardy.com/top-asked-availability-group-questions-and-maybe-some-helpful-tidbits-as-answers/ +[The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-1-why-you-still-dont-get-accurate-estimates/ +[The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-2-how-bad-estimates-backfire-as-your-data-grows/ From f12fea7cebe9f7764d0bbe38bc57418eaba999ac Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 27 Jul 2020 14:26:39 +0300 Subject: [PATCH 027/553] Add another interesting articles --- Articles/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index a8a34e23..5494a9ca 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1157,6 +1157,10 @@ Articles types: | [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers] | Sean Gallardy | 2020-06-16 | [DBA] | | [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates] | Brent Ozar | 2020-07-07 | [DBA][DEV] | | [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows] | Brent Ozar | 2020-07-08 | [DBA][DEV] | +| [Encrypting SQL Server Database Backups] | David Fowler | 2018-04-04 | [DBA] | +| [Using Track Causality to Understand Query Execution] | Erin Stellato | 2019-01-04 | [DBA][DEV] | +| [Understanding SQL Server Backup Types] | Prashanth Jayaram | 2018-04-19 | [B][DBA] | +| [Scripting the Description of Database Tables Using Extended Properties | Phil Factor | 2020-03-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -1599,7 +1603,7 @@ Articles types: [Overview of Encryption Tools in SQL Server]:https://matthewmcgiffen.com/2017/12/05/overview-of-encryption-tools-in-sql-server/ [Clustered Index Uniquifier Existence and Size]:https://sqlquantumleap.com/2017/09/18/clustered-index-uniquifier-existence-and-size/ [Understanding Logging and Recovery in SQL Server]:https://technet.microsoft.com/en-us/library/2009.02.logging.aspx -[Understanding SQL Server Backups]:https://technet.microsoft.com/en-us/library/2009.07.sqlbackup.aspx +[Understanding SQL Server Backups]:https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd822915(v=msdn.10) [Recovering from Disasters Using Backups]:https://technet.microsoft.com/en-us/library/ee677581.aspx [Simple SQL: Handling Location Datatypes]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/simple-sql-handling-location-datatypes/ [Improve SQL Server Performance by Looking at Plan Cache (Part 1)]:https://logicalread.com/sql-server-minimize-single-use-plans-tl01/ @@ -2288,3 +2292,7 @@ Articles types: [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers]:https://www.seangallardy.com/top-asked-availability-group-questions-and-maybe-some-helpful-tidbits-as-answers/ [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-1-why-you-still-dont-get-accurate-estimates/ [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-2-how-bad-estimates-backfire-as-your-data-grows/ +[Encrypting SQL Server Database Backups]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ +[Using Track Causality to Understand Query Execution]:https://sqlperformance.com/2019/01/extended-events/using-track-causality-to-understand-query-execution +[Understanding SQL Server Backup Types]:https://www.sqlshack.com/understanding-sql-server-backup-types/ +[Scripting the Description of Database Tables Using Extended Properties]:https://www.red-gate.com/simple-talk/sql/database-delivery/scripting-description-database-tables-using-extended-properties/ From 644ab0849052011c881a070701447b180810d006 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 28 Jul 2020 04:56:37 +0300 Subject: [PATCH 028/553] Update some recommendations --- ...er Name Convention and T-SQL Programming Style.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index d4b376eb..1b2b1dd9 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -208,8 +208,10 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. CREATE TABLE MyTable (MyColumn int); ``` More details [here](https://www.red-gate.com/simple-talk/opinion/editorials/why-you-shouldnt-hardcode-the-current-database-name-in-your-views-functions-and-stored-procedures/), - [here](https://www.sqlserverscience.com/basics/on-default-schemas-and-search-paths/) and [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-procedures-lack-schema-qualification), - [here](https://sqlstudies.com/2020/06/22/i-created-a-table-and-sql-created-a-schema-and-a-user/). + [here](https://www.sqlserverscience.com/basics/on-default-schemas-and-search-paths/), + [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-procedures-lack-schema-qualification), + [here](https://sqlstudies.com/2020/06/22/i-created-a-table-and-sql-created-a-schema-and-a-user/), + [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query). - Delimiters: **spaces** (not tabs) - Avoid using asterisk in select statements `SELECT *`, use explicit column names. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-asterisk-select-list). @@ -218,7 +220,9 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - All finished expressions should have semicolon `;` at the end. This is ANSI standard and Microsoft announced with the SQL Server 2008 release that semicolon statement terminators will become mandatory in a future version so statement terminators other than semicolons (whitespace) are currently deprecated. This deprecation announcement means that you should always use semicolon terminators in new development. - More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/). + From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): + > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. + More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/) and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). - All script files should end with `GO` and line break. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. @@ -385,7 +389,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. DECLARE @myGoodCharVariable char(7); DECLARE @myGoodNCharVariable nchar(10); ``` - More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/using-a-variable-length-datatype-without-explicit-length-the-whys-and-wherefores). + More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/using-a-variable-length-datatype-without-explicit-length-the-whys-and-wherefores) and [here](https://sqlblog.org/2009/10/09/bad-habits-to-kick-declaring-varchar-without-length). - Use only [`ORIGINAL_LOGIN()`](https://docs.microsoft.com/en-us/sql/t-sql/functions/original-login-transact-sql) function because is the only function that consistently returns the actual login name that we started with regardless of impersonation. More details [here](https://sqlstudies.com/2015/06/24/which-user-function-do-i-use/). - Always use `IF` statement with `BEGIN-END` block to prevent errors with multi line statements: From 9daf0835a512869e32965e89e9608c6789ac25d9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 29 Jul 2020 06:08:18 +0300 Subject: [PATCH 029/553] Add new articles --- Articles/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 5494a9ca..40549700 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1160,7 +1160,11 @@ Articles types: | [Encrypting SQL Server Database Backups] | David Fowler | 2018-04-04 | [DBA] | | [Using Track Causality to Understand Query Execution] | Erin Stellato | 2019-01-04 | [DBA][DEV] | | [Understanding SQL Server Backup Types] | Prashanth Jayaram | 2018-04-19 | [B][DBA] | -| [Scripting the Description of Database Tables Using Extended Properties | Phil Factor | 2020-03-03 | [DBA][DEV] | +| [Scripting the Description of Database Tables Using Extended Properties] | Phil Factor | 2020-03-03 | [DBA][DEV] | +| [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | +| [Multiple Plans for an "Identical" Query] | Aaron Bertrand | 2014-11-20 | [DBA][DEV] | +| [Another argument for stored procedures versus ORM versus Add Hoc Queries] | Aaron Bertrand | 2013-05-17 | [DBA][DEV] | +| [Bad habits to kick : avoiding the schema prefix] | Aaron Bertrand | 2019-09-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2296,3 +2300,7 @@ Articles types: [Using Track Causality to Understand Query Execution]:https://sqlperformance.com/2019/01/extended-events/using-track-causality-to-understand-query-execution [Understanding SQL Server Backup Types]:https://www.sqlshack.com/understanding-sql-server-backup-types/ [Scripting the Description of Database Tables Using Extended Properties]:https://www.red-gate.com/simple-talk/sql/database-delivery/scripting-description-database-tables-using-extended-properties/ +[The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ +[Multiple Plans for an "Identical" Query]:https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query +[Another argument for stored procedures versus ORM versus Add Hoc Queries]:https://sqlperformance.com/2013/05/t-sql-queries/another-argument-for-stored-procedures +[Bad habits to kick : avoiding the schema prefix]:https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix From 5a8f6234747c7b7276a8d7f49aa868adb27492ed Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 30 Jul 2020 06:27:13 +0300 Subject: [PATCH 030/553] Add new useful links and articles --- Articles/README.md | 2 ++ README.md | 1 + SQL Server Name Convention and T-SQL Programming Style.md | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 40549700..f5a0616b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1165,6 +1165,7 @@ Articles types: | [Multiple Plans for an "Identical" Query] | Aaron Bertrand | 2014-11-20 | [DBA][DEV] | | [Another argument for stored procedures versus ORM versus Add Hoc Queries] | Aaron Bertrand | 2013-05-17 | [DBA][DEV] | | [Bad habits to kick : avoiding the schema prefix] | Aaron Bertrand | 2019-09-12 | [DBA][DEV] | +| [How not to call Hekaton natively-compiled stored procedures] | Aaron Bertrand | 2015-06-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2304,3 +2305,4 @@ Articles types: [Multiple Plans for an "Identical" Query]:https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query [Another argument for stored procedures versus ORM versus Add Hoc Queries]:https://sqlperformance.com/2013/05/t-sql-queries/another-argument-for-stored-procedures [Bad habits to kick : avoiding the schema prefix]:https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix +[How not to call Hekaton natively-compiled stored procedures]:https://sqlperformance.com/2015/06/t-sql-queries/how-not-to-call-hekaton-procedures diff --git a/README.md b/README.md index 842aab5c..b9afe723 100644 --- a/README.md +++ b/README.md @@ -526,6 +526,7 @@ SQL Server: - [The Redgate Guide to SQL Server Team-based Development](https://assets.red-gate.com/products/sql-development/sql-source-control/entrypage/assets/RG_Guide_to_SQL_Server_Dev.pdf) (by Phil Factor, Grant Fritchey, Alex Kuznetsov, and Mladen Prajdić) - [XML Stairway](https://assets.red-gate.com/simple-talk/stairway-to-xml.pdf) - [119 SQL Code Smells](https://assets.red-gate.com/community/books/sql-code-smells.pdf) + - [High Performance Techniques for SQL Server](https://www.sentryone.com/sql-server-books) (by SentryOne) - SQL DBA - [SQL Server Internals: In-Memory OLTP](https://www.red-gate.com/library/sql-server-internals-in-memory-oltp) (by Kalen Delaney) - [Fundamentals Of SQL Server 2012 Replication](https://assets.red-gate.com/community/books/fundamentals-of-sql-server-2012-replication.pdf) (by Sebastian Meine) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 1b2b1dd9..e939beb8 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -211,7 +211,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://www.sqlserverscience.com/basics/on-default-schemas-and-search-paths/), [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-procedures-lack-schema-qualification), [here](https://sqlstudies.com/2020/06/22/i-created-a-table-and-sql-created-a-schema-and-a-user/), - [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query). + [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query), + [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - Delimiters: **spaces** (not tabs) - Avoid using asterisk in select statements `SELECT *`, use explicit column names. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-asterisk-select-list). @@ -464,6 +465,8 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] - Do not use `SET NOCOUNT OFF;` because it is default behavior - Use `RAISERROR` instead `PRINT` if you want to give feedback about the state of the currently executing SQL batch without lags. More details [here](http://sqlity.net/en/984/print-vs-raiserror/) and [here](http://sqlservercode.blogspot.com/2019/01/print-disruptor-of-batch-deletes-in-sql.html). + - Call natively-compiled stored procedures without named parameters. + More details [here](https://sqlperformance.com/2015/06/t-sql-queries/how-not-to-call-hekaton-procedures). - All code should be self documenting - T-SQL code, triggers, stored procedures, functions, scripts, should have a standard comment-documentation banner: ``` From 1ad56894197fc22b227d3cc0e7e4e705fdc789bd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 31 Jul 2020 19:29:34 +0300 Subject: [PATCH 031/553] Remove abandoned Red Gate Code Guard addin --- SSMS/SSMS_Addins.md | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 480e0f18..8a60250d 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -1,11 +1,10 @@ # SQL Server Management Studio add-ins -Complete list of useful and must have add-ins for SQL Server Management Studio - **37** SSMS add-ins +Complete list of useful and must have add-ins for SQL Server Management Studio - **36** SSMS add-ins | Name | Download page | Release Date | Support SSMS Version | Developer | Free version | Price | |-------------------------------------------------------|-------------------------------|--------------|:---------------------|----------------------|--------------|------:| | [SSMSBoost](#ssmsboost) | [SSMSBoost] | 2019-08-19 | 2008-2018 | Solutions Crew GmbH | Yes | $150 | | [SqlSmash](#sqlsmash) | [SqlSmash] | 2017-06-10 | 2008-2017 | Smashing Jedis LLC | Yes | $99 | -| [SQL Code Guard](#sql-code-guard) | [Red Gate SQL Code Guard] | 2017-07-03 | 2016 | Red Gate | Yes | No | | [SQL Search](#sql-search) | [SQL Search] | 2017-02-27 | 2008-2017 | Red Gate | Yes | No | | [Red Gate SQL Test](#red-gate-sql-test) | [Red Gate SQL Test] | 2017-03-21 | 2008-2017 | Red Gate | No | $369 | | [Red Gate SQL Source Control](#red-gate-control) | [Red Gate SQL Source Control] | 2017-06-30 | 2012-2017 | Red Gate | No | $495 | @@ -96,25 +95,6 @@ Write maintainable SQL scripts, Understand code better and Navigate faster with - Go To Definition - -## SQL Code Guard -Download link: [Red Gate SQL Code Guard]
-Release date: 2017-02-17
-Support Version: 2016
-Developer: Red Gate
-Free version: Yes
-Price: No - -SQL Code Guard is a free solution for SQL Server that provides fast and comprehensive static analysis for T-Sql code, shows code complexity and objects dependencies. - - - Integration with SSMS 2016 - - Integration with Visual Studio 2012/2013 - - Checkin Policy for TFS (how to install & use) - - Support of msbuild (how to use msbuild) - - Command line utility (how to use command line utility). - - API for custom tool development (demo projects can be found in SQL Code Guard folder) - - ## SQL Search Download page: [SQL Search]
From bd88b00bd421f52e33e48b37d50bd0b5d0dd289f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 1 Aug 2020 15:11:28 +0300 Subject: [PATCH 032/553] Add new articles and info for 10794 error --- Articles/README.md | 6 ++++++ Errors/README.md | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index f5a0616b..4057bf6b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1166,6 +1166,9 @@ Articles types: | [Another argument for stored procedures versus ORM versus Add Hoc Queries] | Aaron Bertrand | 2013-05-17 | [DBA][DEV] | | [Bad habits to kick : avoiding the schema prefix] | Aaron Bertrand | 2019-09-12 | [DBA][DEV] | | [How not to call Hekaton natively-compiled stored procedures] | Aaron Bertrand | 2015-06-05 | [DBA][DEV] | +| [A One-Slide Summary of the Differences Between TDE and Always Encrypted] | Brent Ozar | 2020-07-31 | [SEC] | +| [Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.] | Brent Ozar | 2020-07-29 | [DBA][DEV] | +| [Finding & Downloading Required SQL Server Updates] | Andy Levy | 2020-07-21 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2306,3 +2309,6 @@ Articles types: [Another argument for stored procedures versus ORM versus Add Hoc Queries]:https://sqlperformance.com/2013/05/t-sql-queries/another-argument-for-stored-procedures [Bad habits to kick : avoiding the schema prefix]:https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix [How not to call Hekaton natively-compiled stored procedures]:https://sqlperformance.com/2015/06/t-sql-queries/how-not-to-call-hekaton-procedures +[A One-Slide Summary of the Differences Between TDE and Always Encrypted]:https://www.brentozar.com/archive/2020/07/a-one-slide-summary-of-the-differences-between-tde-and-always-encrypted/ +[Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.]:https://www.brentozar.com/archive/2020/07/remember-nothing-stops-a-hekaton-transaction-yeah-about-that/ +[Finding & Downloading Required SQL Server Updates]:https://flxsql.com/downloading-latest-sql-server-updates/ diff --git a/Errors/README.md b/Errors/README.md index bb7b5a79..a6760e79 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -190,7 +190,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 9642 | An error occurred in a Service Broker/Database Mirroring transport connection endpoint, Error: %i, … | [9105_link1][45] | | 10314 | An error occurred in the Microsoft .NET Framework while trying to load assembly id %d. The server may … | [10314_link1],[10314_link2] | | 10637 | Cannot perform this operation on '%.*ls' with ID %I64d as one or more indexes are currently in … | [10637_link1][32] | -| 10794 | The %S_MSG '%ls' is not supported with %S_MSG. | [10794_link1][39] | +| 10794 | The %S_MSG '%ls' is not supported with %S_MSG. | [10794_link1][39],[10794_link2] | | 11535 | EXECUTE statement failed because its WITH RESULT SETS clause specified %d result set(s), and the … | [11535_link1][38] | | 12349 | Operation not supported for memory optimized tables having columnstore index. | [12349_link1][41] | | 13609 | JSON text is not properly formatted. Unexpected character '%lc' is found at position %d. | [13609_link1] | @@ -343,6 +343,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [9002_link3]:https://www.sqlserverscience.com/internals/adding-new-transaction-log-file-when-existing-log-full/ [10314_link1]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-clr-assembly-failure-after-an-ag-failover/ [10314_link2]:https://www.sqlservercentral.com/articles/do-not-set-trustwority-on-for-the-ssisdb-catalog +[10794_link2]:https://www.brentozar.com/archive/2020/07/remember-nothing-stops-a-hekaton-transaction-yeah-about-that/ [13609_link1]:https://itsalljustelectrons.blogspot.com/2019/05/Splitting-Strings-With-OPENJSON.html [13570_link1]:https://www.mssqltips.com/sqlservertip/5281/sql-server-replication-for-temporal-tables/ [15002_link1]:https://blogs.msdn.microsoft.com/luti/2017/05/17/sql-server-offline-after-applying-service-pack/ From ec288487528ce071e1b2d4f59b89875b4b70e6b5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 2 Aug 2020 16:13:00 +0300 Subject: [PATCH 033/553] Update Wait_Statistics script --- Articles/README.md | 2 ++ Scripts/Wait_Statistics.sql | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 4057bf6b..3b45a5df 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1169,6 +1169,7 @@ Articles types: | [A One-Slide Summary of the Differences Between TDE and Always Encrypted] | Brent Ozar | 2020-07-31 | [SEC] | | [Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.] | Brent Ozar | 2020-07-29 | [DBA][DEV] | | [Finding & Downloading Required SQL Server Updates] | Andy Levy | 2020-07-21 | [DBA] | +| [SQLskills SQL101: Why do some wait types need to be ignored?] | Paul Randal | 2018-05-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2312,3 +2313,4 @@ Articles types: [A One-Slide Summary of the Differences Between TDE and Always Encrypted]:https://www.brentozar.com/archive/2020/07/a-one-slide-summary-of-the-differences-between-tde-and-always-encrypted/ [Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.]:https://www.brentozar.com/archive/2020/07/remember-nothing-stops-a-hekaton-transaction-yeah-about-that/ [Finding & Downloading Required SQL Server Updates]:https://flxsql.com/downloading-latest-sql-server-updates/ +[SQLskills SQL101: Why do some wait types need to be ignored?]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-why-do-some-wait-types-need-to-be-ignored/ diff --git a/Scripts/Wait_Statistics.sql b/Scripts/Wait_Statistics.sql index 671aff84..bd24871c 100644 --- a/Scripts/Wait_Statistics.sql +++ b/Scripts/Wait_Statistics.sql @@ -1,8 +1,13 @@ /* -Author: Paul Randal -Original link: https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/ -Created Date: 2010-12-09 -Modified Date: 2018-06-13 + + Generate complex query plan + Reads and writes per database. + 2010-12-09 by Paul Randal + 2019-02-26 by Paul Randal + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Wait_Statistics.sql + https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/ + */ WITH [Waits] AS @@ -62,6 +67,7 @@ WITH [Waits] AS N'PARALLEL_REDO_TRAN_LIST', -- https://www.sqlskills.com/help/waits/PARALLEL_REDO_TRAN_LIST N'PARALLEL_REDO_WORKER_SYNC', -- https://www.sqlskills.com/help/waits/PARALLEL_REDO_WORKER_SYNC N'PARALLEL_REDO_WORKER_WAIT_WORK', -- https://www.sqlskills.com/help/waits/PARALLEL_REDO_WORKER_WAIT_WORK + N'PREEMPTIVE_OS_FLUSHFILEBUFFERS', -- https://www.sqlskills.com/help/waits/PREEMPTIVE_OS_FLUSHFILEBUFFERS N'PREEMPTIVE_XE_GETTARGETSTATE', -- https://www.sqlskills.com/help/waits/PREEMPTIVE_XE_GETTARGETSTATE N'PWAIT_ALL_COMPONENTS_INITIALIZED', -- https://www.sqlskills.com/help/waits/PWAIT_ALL_COMPONENTS_INITIALIZED N'PWAIT_DIRECTLOGCONSUMER_GETNEXT', -- https://www.sqlskills.com/help/waits/PWAIT_DIRECTLOGCONSUMER_GETNEXT @@ -85,10 +91,12 @@ WITH [Waits] AS N'SLEEP_TASK', -- https://www.sqlskills.com/help/waits/SLEEP_TASK N'SLEEP_TEMPDBSTARTUP', -- https://www.sqlskills.com/help/waits/SLEEP_TEMPDBSTARTUP N'SNI_HTTP_ACCEPT', -- https://www.sqlskills.com/help/waits/SNI_HTTP_ACCEPT + N'SOS_WORK_DISPATCHER', -- https://www.sqlskills.com/help/waits/SOS_WORK_DISPATCHER N'SP_SERVER_DIAGNOSTICS_SLEEP', -- https://www.sqlskills.com/help/waits/SP_SERVER_DIAGNOSTICS_SLEEP N'SQLTRACE_BUFFER_FLUSH', -- https://www.sqlskills.com/help/waits/SQLTRACE_BUFFER_FLUSH N'SQLTRACE_INCREMENTAL_FLUSH_SLEEP', -- https://www.sqlskills.com/help/waits/SQLTRACE_INCREMENTAL_FLUSH_SLEEP N'SQLTRACE_WAIT_ENTRIES', -- https://www.sqlskills.com/help/waits/SQLTRACE_WAIT_ENTRIES + N'VDI_CLIENT_OTHER', -- https://www.sqlskills.com/help/waits/VDI_CLIENT_OTHER N'WAIT_FOR_RESULTS', -- https://www.sqlskills.com/help/waits/WAIT_FOR_RESULTS N'WAITFOR', -- https://www.sqlskills.com/help/waits/WAITFOR N'WAITFOR_TASKSHUTDOWN', -- https://www.sqlskills.com/help/waits/WAITFOR_TASKSHUTDOWN @@ -117,4 +125,4 @@ FROM [Waits] AS [W1] INNER JOIN [Waits] AS [W2] ON [W2].[RowNum] <= [W1].[RowNum] GROUP BY [W1].[RowNum] HAVING SUM ([W2].[Percentage]) - MAX( [W1].[Percentage] ) < 95; -- percentage threshold -GO \ No newline at end of file +GO From 99919b7172cca2ab00d6b94df52f431ec2688a67 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 3 Aug 2020 16:59:32 +0300 Subject: [PATCH 034/553] Add Debugging SQL Server info --- Errors/PDB/README.md | 22 + Errors/PDB/SQL-Server-2008-R2.md | 100 ++ Errors/PDB/SQL-Server-2008.md | 120 +++ Errors/PDB/SQL-Server-2012.md | 1020 ++++++++++++++++++ Errors/PDB/SQL-Server-2014.md | 1650 ++++++++++++++++++++++++++++++ Errors/PDB/SQL-Server-2016.md | 699 +++++++++++++ Errors/PDB/SQL-Server-2017.md | 522 ++++++++++ Errors/PDB/SQL-Server-2019.md | 306 ++++++ 8 files changed, 4439 insertions(+) create mode 100644 Errors/PDB/README.md create mode 100644 Errors/PDB/SQL-Server-2008-R2.md create mode 100644 Errors/PDB/SQL-Server-2008.md create mode 100644 Errors/PDB/SQL-Server-2012.md create mode 100644 Errors/PDB/SQL-Server-2014.md create mode 100644 Errors/PDB/SQL-Server-2016.md create mode 100644 Errors/PDB/SQL-Server-2017.md create mode 100644 Errors/PDB/SQL-Server-2019.md diff --git a/Errors/PDB/README.md b/Errors/PDB/README.md new file mode 100644 index 00000000..4b806ec5 --- /dev/null +++ b/Errors/PDB/README.md @@ -0,0 +1,22 @@ +# SQL Server Debugging + +- [Obtaining symbol files (.PDB) for SQL Server Releases](https://github.com/arvindshmicrosoft/SQLCallStackResolver/wiki/Scripts-to-download-symbols-for-SQL-Server-2019) +- [What is the SOS_WORK_DISPATCHER Wait Type?](https://orderbyselectnull.com/2018/09/27/what-is-the-sos_work_dispatcher-wait-type/) +- [An XEvent a Day (24 of 31) – What is the callstack?](https://www.sqlskills.com/blogs/jonathan/an-xevent-a-day-24-of-31-what-is-the-callstack/) + +This section contains PowerShell scripts which automate the download and extraction of `.PDB` files corresponding to major releases of SQL Server. + +For running any of these scripts, please note the following: +- You must run them within PowerShell, preferably within Windows +- You must have Internet access from the machine running the PowerShell script +- You might want to replace the $outputFolder placeholder with a different folder path (for example, `N:\sqlsymbols\SQL2016SP1`) +- The script will automatically create the folder where the downloaded PDB files are stored. + +Please click on one of the links below depending on the major version of SQL Server that you are looking at: +- [SQL Server 2019](SQL-Server-2019) +- [SQL Server 2017](SQL-Server-2017) +- [SQL Server 2016](SQL-Server-2016) +- [SQL Server 2014](SQL-Server-2014) +- [SQL Server 2012](SQL-Server-2012) +- [SQL Server 2008 R2](SQL-Server-2008-R2) +- [SQL Server 2008](SQL-Server-2008) diff --git a/Errors/PDB/SQL-Server-2008-R2.md b/Errors/PDB/SQL-Server-2008-R2.md new file mode 100644 index 00000000..c3fce980 --- /dev/null +++ b/Errors/PDB/SQL-Server-2008-R2.md @@ -0,0 +1,100 @@ +# SQL Server 2008 R2 SP3 Security update January 6, 2018 - 10.50.6560.0 - x64 (4057113) +``` powershell +# SQL Server 2008 R2 SP3 Security update January 6, 2018 - 10.50.6560.0 - x64 (4057113) +$outputFolder = 'c:\sqlsyms\10.50.6560.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/b981ac9f18d144989cdc934947f492811/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1456 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9e7a839d91dd474a8631dfef6abca4501/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1456 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/cc4bfc0743fc46b392fa0fdb7c7826452/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1456 ) +``` + +# SQL Server 2008 R2 SP3 Security update January 6, 2018 - 10.50.6560.0 - x86 (4057113) +``` powershell +# SQL Server 2008 R2 SP3 Security update January 6, 2018 - 10.50.6560.0 - x86 (4057113) +$outputFolder = 'c:\sqlsyms\10.50.6560.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/ef09e694a6c54677a0e350aa61328a851/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1537 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a0dd581a069a4f46892922b421e679d41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1537 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/31933e3ce06745e1a57659e51088a0082/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6560.00 ((KJ_SP3_QFE-OD).171228-1537 ) +``` + +# SQL Server 2008 R2 SP3 Hotfix KB 3146034 - 10.50.6542.0 - x64 (3146034) +``` powershell +# SQL Server 2008 R2 SP3 Hotfix KB 3146034 - 10.50.6542.0 - x64 (3146034) +$outputFolder = 'c:\sqlsyms\10.50.6542.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/4f088282518843b79e0478994de908221/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1803 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ded28d8ceae641748aec32fb45cb2b451/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1803 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1efb80e5273747c397f6185ab6670c9d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1803 ) +``` + +# SQL Server 2008 R2 SP3 Hotfix KB 3146034 - 10.50.6542.0 - x86 (3146034) +``` powershell +# SQL Server 2008 R2 SP3 Hotfix KB 3146034 - 10.50.6542.0 - x86 (3146034) +$outputFolder = 'c:\sqlsyms\10.50.6542.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/989ad268055f459aa1fd4d1eea34c6ae1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1804 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/569d9d76538b4106a8c414bf7dcdbe511/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1804 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/33f28fb385a04fd5afdc44264428efcb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6542.00 ((KJ_SP3_QFE-OD).160222-1804 ) +``` + +# SQL Server 2008 R2 SP3 MS15-058: Security update QFE: July 14, 2015 - 10.50.6529.0 - x64 (3045314) +``` powershell +# SQL Server 2008 R2 SP3 MS15-058: Security update QFE: July 14, 2015 - 10.50.6529.0 - x64 (3045314) +$outputFolder = 'c:\sqlsyms\10.50.6529.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/6fd8bc7e6da241f9acfef95aa7529e671/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1313 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/afa19b0c44e54bef8028f5aae687c1751/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1313 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/282885315f3e4925a0753fdd1e2eae612/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1313 ) +``` + +# SQL Server 2008 R2 SP3 MS15-058: Security update QFE: July 14, 2015 - 10.50.6529.0 - x86 (3045314) +``` powershell +# SQL Server 2008 R2 SP3 MS15-058: Security update QFE: July 14, 2015 - 10.50.6529.0 - x86 (3045314) +$outputFolder = 'c:\sqlsyms\10.50.6529.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/57832ff449b14214bfbb5b3976147d2c1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1314 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/bb45c06675b04636aeaa71423c08c0bd1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1314 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/37b52eaf08284c23bdfda05c7b5bd0f52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6529.00 ((KJ_SP3_QFE-OD).150319-1314 ) +``` + +# SQL Server 2008 R2 SP3 Hotfix KB3033860 - 10.50.6525.0 - x64 (3033860) +``` powershell +# SQL Server 2008 R2 SP3 Hotfix KB3033860 - 10.50.6525.0 - x64 (3033860) +$outputFolder = 'c:\sqlsyms\10.50.6525.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/fd1e350610034849822cdb74a90e3f4a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1315 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8e5d923c1e744b2395d0faebb7b27aed1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1315 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a80a08b5910a4b7c81bca4f7ea5737cb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1315 ) +``` + +# SQL Server 2008 R2 SP3 Hotfix KB3033860 - 10.50.6525.0 - x86 (3033860) +``` powershell +# SQL Server 2008 R2 SP3 Hotfix KB3033860 - 10.50.6525.0 - x86 (3033860) +$outputFolder = 'c:\sqlsyms\10.50.6525.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/5705adbab9074c1a8aa3f8086b0b9e351/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1339 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/24b6b9fb3e3248459032337981a515701/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1339 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/41239188b6494cedb627d7bb0a7bd2a12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6525.00 ((KJ_SP3_QFE-OD).150123-1339 ) +``` + +# SQL Server 2008 R2 SP3 SP3 - 10.50.6000.34 - x64 (2979597) +``` powershell +# SQL Server 2008 R2 SP3 SP3 - 10.50.6000.34 - x64 (2979597) +$outputFolder = 'c:\sqlsyms\10.50.6000.34\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/bf37a41b8a974a9a90ac6aaef464011a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1214 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/21cf8932b0184570858de406b79475031/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1214 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/293c90c8918b4aaaa39ea16237b39eff2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1214 ) +``` + +# SQL Server 2008 R2 SP3 SP3 - 10.50.6000.34 - x86 (2979597) +``` powershell +# SQL Server 2008 R2 SP3 SP3 - 10.50.6000.34 - x86 (2979597) +$outputFolder = 'c:\sqlsyms\10.50.6000.34\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/2a05437dc1204cff970a2275d6335ada1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1213 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/682d729f9e6e43f3a47a9c158e905e171/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1213 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5b7a3d00503e4924bd365f20b6ea87642/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2009.0100.6000.034 ((KJ_SP3).140819-1213 ) +``` + diff --git a/Errors/PDB/SQL-Server-2008.md b/Errors/PDB/SQL-Server-2008.md new file mode 100644 index 00000000..2a10815a --- /dev/null +++ b/Errors/PDB/SQL-Server-2008.md @@ -0,0 +1,120 @@ +# SQL Server 2008 SP4 Security update January 6, 2018 - 10.0.6556.0 - x64 (4057114) +``` powershell +# SQL Server 2008 SP4 Security update January 6, 2018 - 10.0.6556.0 - x64 (4057114) +$outputFolder = 'c:\sqlsyms\10.0.6556.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/eaa1a756484a4f95bc6896b8529c11701/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2155ad0fe0a045e38b33e3f36bdb6a211/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/48e9083d8d21441fb77939286bcc001d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +``` + +# SQL Server 2008 SP4 Security update January 6, 2018 - 10.0.6556.0 - x86 (4057114) +``` powershell +# SQL Server 2008 SP4 Security update January 6, 2018 - 10.0.6556.0 - x86 (4057114) +$outputFolder = 'c:\sqlsyms\10.0.6556.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/1401bf04646b4e409d7b7a4fc0644fa81/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/dacb0afbc1334010a573e48736ba72ad1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bd167760b8344d3f90608a2c18cf40092/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6556.00 ((Katmai_SP4_QFE-OD).171228-1515 ) +``` + +# SQL Server 2008 SP4 Hotfix KB3146034 - 10.0.6547.0 - x64 (3146034) +``` powershell +# SQL Server 2008 SP4 Hotfix KB3146034 - 10.0.6547.0 - x64 (3146034) +$outputFolder = 'c:\sqlsyms\10.0.6547.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/e5191b6b180941edb5a20276f9a0384e1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1900 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8fc01c8d34354aa088a13f9c071ebb611/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1900 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3b1145daf61646efbfb3d93ef8948e612/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1900 ) +``` + +# SQL Server 2008 SP4 Hotfix KB3146034 - 10.0.6547.0 - x86 (3146034) +``` powershell +# SQL Server 2008 SP4 Hotfix KB3146034 - 10.0.6547.0 - x86 (3146034) +$outputFolder = 'c:\sqlsyms\10.0.6547.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/b37439c8c52c4952845b150ffd7732af1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1901 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d1c5577343cb4ed8bbc36832eb826afc1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1901 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5bd7009e0fcf4b74b69a23467963dfb42/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6547.00 ((Katmai_SP4_QFE-OD).160222-1901 ) +``` + +# SQL Server 2008 SP4 QFE for MS15-058 - 10.0.6535.0 - x64 (3045308) +``` powershell +# SQL Server 2008 SP4 QFE for MS15-058 - 10.0.6535.0 - x64 (3045308) +$outputFolder = 'c:\sqlsyms\10.0.6535.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/2e97b3df36eb4e7fb0ec16f0ba82bd031/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-1943 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9bea90cfba544af19a1cf11d034abc001/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-1943 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/b579d44345e44607a12a9d0d448b7ab42/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-1943 ) +``` + +# SQL Server 2008 SP4 QFE for MS15-058 - 10.0.6535.0 - x86 (3045308) +``` powershell +# SQL Server 2008 SP4 QFE for MS15-058 - 10.0.6535.0 - x86 (3045308) +$outputFolder = 'c:\sqlsyms\10.0.6535.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/33fe9f06c7b944668d174d77d64fd2051/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-2008 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/688c68ac33c5460894783989531e65431/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-2008 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/7b8f66e87c4c4afd995254a5b2e5083a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6535.00 ((Katmai_SP4_QFE-OD).150417-2008 ) +``` + +# SQL Server 2008 SP4 Hotfix KB3034373 - 10.0.6526.0 - x64 (3034373) +``` powershell +# SQL Server 2008 SP4 Hotfix KB3034373 - 10.0.6526.0 - x64 (3034373) +$outputFolder = 'c:\sqlsyms\10.0.6526.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/85dd188f10df47c0a6b57c70ead0b5c01/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1208 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7c4f51489d884394b902225c7f2b80891/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1208 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/422c51381bc04a7fa2b9bd7fe9b04ca32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1208 ) +``` + +# SQL Server 2008 SP4 Hotfix KB3034373 - 10.0.6526.0 - x86 (3034373) +``` powershell +# SQL Server 2008 SP4 Hotfix KB3034373 - 10.0.6526.0 - x86 (3034373) +$outputFolder = 'c:\sqlsyms\10.0.6526.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/913da3830d16455eadff72481f3179401/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1211 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/901456d096344ca5bd6a117025a412461/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1211 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3b31c12ff4134cc3afb773e8a830896b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6526.00 ((Katmai_SP4_QFE-OD).150123-1211 ) +``` + +# SQL Server 2008 SP4 Security Update MS15-058 July 14, 2015 - 10.0.6241.0 - x64 (3045311) +``` powershell +# SQL Server 2008 SP4 Security Update MS15-058 July 14, 2015 - 10.0.6241.0 - x64 (3045311) +$outputFolder = 'c:\sqlsyms\10.0.6241.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/f667598776444a32942ee049bcb442241/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1051 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/de19a5bdf857430d9c4a6650dd7667401/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1051 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8d79f55153d444be9a35cc7969cd4c702/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1051 ) +``` + +# SQL Server 2008 SP4 Security Update MS15-058 July 14, 2015 - 10.0.6241.0 - x86 (3045311) +``` powershell +# SQL Server 2008 SP4 Security Update MS15-058 July 14, 2015 - 10.0.6241.0 - x86 (3045311) +$outputFolder = 'c:\sqlsyms\10.0.6241.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7ad87780f3a54788a6fd32f946f1e4751/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1052 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/257c88a2ab974c1abcb621bd9f7854ad1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1052 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/20ee497f35de471ab067178d8fcfb3572/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6241.00 ((Katmai_SP4_GDR).150417-1052 ) +``` + +# SQL Server 2008 SP4 SP4 - 10.0.6000.29 - x64 (2979597) +``` powershell +# SQL Server 2008 SP4 SP4 - 10.0.6000.29 - x64 (2979597) +$outputFolder = 'c:\sqlsyms\10.0.6000.29\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/fc69079383a34f3b9338254f34b07e531/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140903-0405) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/116e643b4d7d48dd9c987a2570bf124b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140902-2248 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d7f4aeaf89544a098f18dbaa4405a1802/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140903-0405) +``` + +# SQL Server 2008 SP4 SP4 - 10.0.6000.29 - x86 (2979597) +``` powershell +# SQL Server 2008 SP4 SP4 - 10.0.6000.29 - x86 (2979597) +$outputFolder = 'c:\sqlsyms\10.0.6000.29\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/220547919ebf4ea4a9dc6ad770f2a97b1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140902-2247 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8967aa50a6e147858de6bdf0ca51712b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140902-2247 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1c4ac2e980b444129c6512bc9c9377802/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2007.0100.6000.029 ((Katmai_SP4).140902-2247 ) +``` + diff --git a/Errors/PDB/SQL-Server-2012.md b/Errors/PDB/SQL-Server-2012.md new file mode 100644 index 00000000..15af7196 --- /dev/null +++ b/Errors/PDB/SQL-Server-2012.md @@ -0,0 +1,1020 @@ +# SQL Server 2012 SP4 Security update - 11.0.7493.4 - x64 (4532098) +``` powershell +# SQL Server 2012 SP4 Security update - 11.0.7493.4 - x64 (4532098) +$outputFolder = 'c:\sqlsyms\11.0.7493.4\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/480435d60ca54ce381ec0e8a0a0d76a02/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e6c9aa0810194fa6b574b7215b217af72/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7a4a97665c58401780368d29ee631ccd2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/43b4e82b3c66419e8b35da8d9257b3ff2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/295ba2e5d3194ca5b61b7b31d7c079c11/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ae89899ab121405083d262de6e8846961/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d20221dff4c941c087921649121052281/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b08ffbd94e4b4e17bb1e39045f524abb1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/da346c631b6e46e7b56825f235d89c561/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/50c405e5402b43e7a5ef91788f6ef43f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-1917 ) +``` + +# SQL Server 2012 SP4 Security update - 11.0.7493.4 - x86 (4532098) +``` powershell +# SQL Server 2012 SP4 Security update - 11.0.7493.4 - x86 (4532098) +$outputFolder = 'c:\sqlsyms\11.0.7493.4\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ba8f818630714eb7b381ec0649b061302/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/7e0415dd919840948ef712d61810daec2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/68d681fcf4c64f9b883f8512ccdfd05e2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/30dd863e703c4fa8b9cafd898a9495cf2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/de5513fd8b1c4fb6b91efe477704b14a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/96552da4ca10465c9c33b981bde24ccb1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1b99718314a84b3fa7f5d532b463f1701/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e5470f778c574450bcdfff21a91b739f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ade3c305ff2c46cd845c19b14deb5aff1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/339831825ec24abcb2fc18813066d2e82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7493.04 ((SQL11_SP4_QFE-OD).191224-2006 ) +``` + +# SQL Server 2012 SP4 Hotfix 4091266 - 11.0.7469.6 - x64 (4091266) +``` powershell +# SQL Server 2012 SP4 Hotfix 4091266 - 11.0.7469.6 - x64 (4091266) +$outputFolder = 'c:\sqlsyms\11.0.7469.6\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0f91402cd2414afc9a2e81c7af9af9f32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/514d1b21c758466fa5812d26da1b58de2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/398932bbfb424772b785fed83bae34442/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c7875e26c11e47b2809ce5aa66cbb7662/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/9b08807bc3514172b8d1a18707f257ca1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/57a1333981da48e5be28cd275e871d811/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2b1e43f05e0547cfb3217e369e0ed18d1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d244e857cc9e4109b38ae22f6fb04fe71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/94e0b5323ed6420ba2baef29da5dba1e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/64a2e4d6a3b64ea28cca819f9e247d7c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +``` + +# SQL Server 2012 SP4 Hotfix 4091266 - 11.0.7469.6 - x86 (4091266) +``` powershell +# SQL Server 2012 SP4 Hotfix 4091266 - 11.0.7469.6 - x86 (4091266) +$outputFolder = 'c:\sqlsyms\11.0.7469.6\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a95e440af92540b7a0216cca28c2e8b62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/db6f725509df4ae384ffdca7d0b9eae32/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ef46921b8c7b447a8c115beb669e311c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/f0fe075e9ebd4c29af2de0a8e1b1158e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/d888cccc0fc440eeab4c46a2501cd7521/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/0715c52891824ecb88d15cb3786666211/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2f26128d326c4a6cbb38596802231c491/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/398336b2642b40a4bf1c2b5cc2a7b6bf1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/10d83224d37e4629908ef64a9724085b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/b423cb4eaac6424a9c4006d044788cc82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7469.06 ((SQL11_PCU_Main).180228-1732 ) +``` + +# SQL Server 2012 SP4 Security update - 11.0.7462.6 - x64 (4057116) +``` powershell +# SQL Server 2012 SP4 Security update - 11.0.7462.6 - x64 (4057116) +$outputFolder = 'c:\sqlsyms\11.0.7462.6\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/97bc282def8043728f8e03d389c56c852/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/91c7c41bb798485595f5be3f1b3125e92/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c31145b788cb4a25b9afbc0907f55d722/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/93e6f4ad739547b786cfddf1ead5f54f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/d33e11ce15dc404d815419cc6dcae2ec1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9bccf357c8564d61bebfd5cdaeddf9231/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a2f77318440043c2a75db65201a507911/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/169fdc950daa4b918c5f998625fe01861/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/73dab384b2554d8792c8540ff7a066cb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9f5d751b247a4d8884a6c9a5e582dffa2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2156 ) +``` + +# SQL Server 2012 SP4 Security update - 11.0.7462.6 - x86 (4057116) +``` powershell +# SQL Server 2012 SP4 Security update - 11.0.7462.6 - x86 (4057116) +$outputFolder = 'c:\sqlsyms\11.0.7462.6\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/31d8d73fc89d494481d3ea3bc23d664c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dc4b8738e9c040dca6bda5c19fa15d782/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9148265be6de4d2f9cbc17085dfd2d252/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3e0a1ca4d3c343bfbb273258041819952/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/cdf3c5fdc15b43f98eb1a8da3c73c7e31/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1ebe506aeb6b47b38cc5e514fff18f821/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/47e45abe752b453b833d5bed81c4ce231/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/837fc489e2924037a2c108fd7bf90ffa1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f6e02bcf4295487995a04701333076431/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ede3587ca5ea4080a4bf758895d0fdb82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7462.06 ((SQL11_PCU_Main).180105-2153 ) +``` + +# SQL Server 2012 SP4 SP4 - 11.0.7001.0 - x64 (4018073) +``` powershell +# SQL Server 2012 SP4 SP4 - 11.0.7001.0 - x64 (4018073) +$outputFolder = 'c:\sqlsyms\11.0.7001.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d037a5a441e9428386cb7b6ccda51df82/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/61a529bd489946bf98c89d9f471a16032/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0a1268b6e5ad41e6948f59c193c952d52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/ab769d65e88c454f9cf7bfb804bc3be12/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/cc41b4cad8244f08ab3662e2572863e61/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b55075b250fe4c2190f26dd98b740c091/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f360c904a13349cab685811cc7eb5f1b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/90455f51040c4fccb89a9664c3cba4191/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c87b18fbc7da4990a51487628770c54e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2d2b68a253924aeea6931cd5801d56b52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1011 ) +``` + +# SQL Server 2012 SP4 SP4 - 11.0.7001.0 - x86 (4018073) +``` powershell +# SQL Server 2012 SP4 SP4 - 11.0.7001.0 - x86 (4018073) +$outputFolder = 'c:\sqlsyms\11.0.7001.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/1f36dddd3d7d43eb9626cc5adbaa603c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f82f4ae4a2e74ae59338143499fdfd7a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/11692631f68842a3b597ba39bef3c2432/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/ab9f6918064040508165482354a196de2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/52059b5d64564a1b935825899d6a09511/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7fbd676ecf644930ab812a23884186861/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/79bd0035ebe24240b8b71405d0e9fc3f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/82c1e0b607b547f4a81d2dfe719c4cba1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/039700e384e2462d9a74eeae3864859d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/fbc3c51cbd1149ecbd8fcfb23aeee3b62/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.7001.00 ((SQL11_PCU_Main).170815-1005 ) +``` + +# SQL Server 2012 SP3 CU9 - 11.0.6598.0 - x64 (4016762) +``` powershell +# SQL Server 2012 SP3 CU9 - 11.0.6598.0 - x64 (4016762) +$outputFolder = 'c:\sqlsyms\11.0.6598.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/109c9b322c6c41aaad2d6361ed344ad02/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e734e7142f47477eac0a02a531dffe772/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5c5a450a77764195a5f87d2aeffd8bd12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7e4bfbdc22c1487cb147642e9d46f8c02/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/bb02986cda794e5ca7cb081fc9bad8c21/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d3eeb1dd8e65453a91ac3ca57199fa231/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fd9f36440ccb405aa49a1d713b1f46431/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1e76ae5f488f4e249247bcc0a7c951c01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c11a2afc0ae9480db528fc501f88f73a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d82c7ee189224510a7b11cbab2acc87a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1648 ) +``` + +# SQL Server 2012 SP3 CU9 - 11.0.6598.0 - x86 (4016762) +``` powershell +# SQL Server 2012 SP3 CU9 - 11.0.6598.0 - x86 (4016762) +$outputFolder = 'c:\sqlsyms\11.0.6598.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/708b17ec74154260be962ee64c2c9f7e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/45fca01235c64d0f91cf52c1b2c7b6682/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6e4b601d5f804d759f96a435d76a062b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b3795d33240a4a27a70c2221f1f5b91f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/f4140814836d4d5284231a6d242860381/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b3254f3a7f6f4d548b7a2587b420fb681/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d3ec35abc942485580a9d1673071e1b31/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/85152ea7467b4c35971b9799e7f030831/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/347f6b20b1a5478781c229edc12b2cf41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4b8824881bc7405588c795aa867da2472/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6598.00 ((SQL11_SP3_QFE-CU).170418-1707 ) +``` + +# SQL Server 2012 SP3 CU7 - 11.0.6579.0 - x64 (3205051) +``` powershell +# SQL Server 2012 SP3 CU7 - 11.0.6579.0 - x64 (3205051) +$outputFolder = 'c:\sqlsyms\11.0.6579.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/28783150f1ee4dbf92e0499225b7590c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b35286f6930c49498baee55c30e567e12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a4af12434c9a45f4af825680e48e5bc22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/2202396e27904e5db4fcd4d60aebdd772/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/32a77bfd1d1b4845883d79c8419052921/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/100c11aaf13440b680b44057155c2ef21/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/cb2b6dce02bd40c996cd811ce13ea91a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5c5db77e2d364209a0f61fda02088cf21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/fa9e7bd3ef9343f5b5fcca1334992d431/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c5b83c833f6a4c7281841b945028f8782/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1109 ) +``` + +# SQL Server 2012 SP3 CU7 - 11.0.6579.0 - x86 (3205051) +``` powershell +# SQL Server 2012 SP3 CU7 - 11.0.6579.0 - x86 (3205051) +$outputFolder = 'c:\sqlsyms\11.0.6579.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8a904b0b2b754631a46c28eb44dd2efe2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/661d636bc116485dbf546433cff31f072/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a2bbab93772a4b8b8a4000861e06f5b12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c8e36c6acc1d4447a68859546378d0dd2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/33976bc0acee45e6a5e6d085068c93f31/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/18c8de6253374d52aad36a38b127f8661/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ae64e50371214599be4a3415deb52fbf1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ff1efd45c7b64eed9b641ac980799e6b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5d6dcb597aec4881b9ee9a7a6bf96ba71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/b2a6eff3ff774b2e82486d092883df462/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6579.00 ((SQL11_SP3_QFE-CU).161222-1119 ) +``` + +# SQL Server 2012 SP3 CU6 - 11.0.6567.0 - x64 (3194992) +``` powershell +# SQL Server 2012 SP3 CU6 - 11.0.6567.0 - x64 (3194992) +$outputFolder = 'c:\sqlsyms\11.0.6567.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/bb6184470be14d70a6171a0abf7ff4142/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/59c4ce23af154338a104308ac0cce6232/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/add423f0ae3d49d195ce1edd7942d3ed2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e618e626a6594d009564091cabd9bc262/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/ac3e5d1c334f413080dd816bf9d1467e1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/8b09e558e267408eaeaf87a3a2ee37e71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4f2f41869ac54e899e7ff39319663a651/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5c78860cf3644c0d89d0699bf3773bf11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/db583d5603bc474b8651922e71e401dc1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/307d6d9eed7c4d5a953f485db595d2de2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1832 ) +``` + +# SQL Server 2012 SP3 CU6 - 11.0.6567.0 - x86 (3194992) +``` powershell +# SQL Server 2012 SP3 CU6 - 11.0.6567.0 - x86 (3194992) +$outputFolder = 'c:\sqlsyms\11.0.6567.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/6830ed55a6d6494b80e8f5b71fd30d8d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/913bea3e2f604ac6b5f2fb46bca63fd22/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6bedeb07e9c449cdb0018a92727ced2e2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/faf3de3ef8714e8a89b7e385a57510412/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/c266fee436644990b265e7e9151c488f1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/55260b1f426c40c997183184a77c768e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/69f53ff9d9e14a0fbb07e0e80678e3181/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/4223e10e9d3546a795480e990cc148f31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a813fa0504b6441e81a3be6f20c0bc541/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6bef5361c8b84cdfa2cdb9731708a2cb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6567.00 ((SQL11_SP3_QFE-CU).161010-1959 ) +``` + +# SQL Server 2012 SP3 CU5 - 11.0.6544.0 - x64 (3180915) +``` powershell +# SQL Server 2012 SP3 CU5 - 11.0.6544.0 - x64 (3180915) +$outputFolder = 'c:\sqlsyms\11.0.6544.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/b3a2c45b9cd04194ad768faff2dd480e1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e8b5df585c394779a2ff88a39458ebfa1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/54542e47b335481cbedba3ad6aca9e9c1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/02526e38efd34a22892561485c3e93331/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/25eee25e365c452fafba7d762dcb5e211/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/75c6111e1cc1449bad2112e15cd3302c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d50d043ce4fe402e90a622a378ec8add1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7009006d3e944eaa82f52532647ce2651/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8e119547cbb34fddafba8c65733b36131/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3d8457edc2c348ee870e2df8e0ffb5591/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1346 ) +``` + +# SQL Server 2012 SP3 CU5 - 11.0.6544.0 - x86 (3180915) +``` powershell +# SQL Server 2012 SP3 CU5 - 11.0.6544.0 - x86 (3180915) +$outputFolder = 'c:\sqlsyms\11.0.6544.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/58621a8e7f424ceaaf82b6a8621ad5ae2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b5cfcf4e10fc47c9b1c57156d868ea882/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7bacebdbc3ef47338dcba37b2d5d42012/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c5bf5f4f707a4b86bf1d9ce281f7bc142/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/f662a0c9bba14a7aa62df4a06b8657271/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/73b2ad756d314c55814d8d03fc8b7b6c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c06729d83eb1457084c51e25542252781/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ee5eff6976704286b8be419395371aac1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3f5943d18bf84c9189322c1d5aca2a9a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/78d4fff0f00047728cb50cb4211c493d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6544.00 ((SQL11_SP3_QFE-CU).160829-1356 ) +``` + +# SQL Server 2012 SP3 CU4 - 11.0.6540.0 - x64 (3165264) +``` powershell +# SQL Server 2012 SP3 CU4 - 11.0.6540.0 - x64 (3165264) +$outputFolder = 'c:\sqlsyms\11.0.6540.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/05130a8e03694effbf4ee0a5d93d6f022/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d91b0bd2f080497d8898ca7dc13564e12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ee95fd17ecc14e49a85fcf6d693011042/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/6b39164c29804cc6b7609f81e04c8bb62/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/e81c72c3de764c97b5615f32b3d10b5f1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c363526150464be9a52a234e681f31ed1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b5b55e52e8e04520a7c81e3fd8c1aeeb1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/971700e9f5c24edb979e7aa0820b71981/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/13788a023dd542da9822e3eea228db7b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/031265bbe1a14ada8f4078c6705f7c4c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1731 ) +``` + +# SQL Server 2012 SP3 CU4 - 11.0.6540.0 - x86 (3165264) +``` powershell +# SQL Server 2012 SP3 CU4 - 11.0.6540.0 - x86 (3165264) +$outputFolder = 'c:\sqlsyms\11.0.6540.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/7abb3b2c641e462d99e832cfaa77b5022/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a3440669ec5541c8a7aafd6b6a7e5c152/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b031eefe7864472ab762aa98e16b11142/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/765547fd40cc4aef80ec1b3dd8f0a9292/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7651776a76644a30b6a8d7ecdd1d24d11/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1de5f51195b54e5eb12f2f56f6237a041/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2cc47be0bc3e4cf7b0c0aebac03b08a11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2f3cb78d00b54698824e73ac44b2f9bc1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/18bb1bb91f9a4ba78e00ea92bc40fe121/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/b14e40ff51364430b7bed58f8b44cef72/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6540.00 ((SQL11_SP3_QFE-CU).160623-1729 ) +``` + +# SQL Server 2012 SP3 CU3 - 11.0.6537.0 - x64 (3152635) +``` powershell +# SQL Server 2012 SP3 CU3 - 11.0.6537.0 - x64 (3152635) +$outputFolder = 'c:\sqlsyms\11.0.6537.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/784b2d2a11f4459784a98a777a61e39e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/41074d77469a4e0e9217c8e29cb4ed772/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a01672c248514057a59d13e89ce93b0f2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d5d1a87d5e764f29b202493cbcba3d082/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/cf422a9dbb8340a5b5000ab5dbd4f4e91/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a803eeca499b45fbb53081e01c86e0571/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/7335b11661aa48f298d976a2448c6f6a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b027f13eb4994ee99ecc152c282fbb581/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c99210c7d2ff447c98494bb5c241af8c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/dcdc7cc5bfba4aa38c320285a6cdcbaa2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +``` + +# SQL Server 2012 SP3 CU3 - 11.0.6537.0 - x86 (3152635) +``` powershell +# SQL Server 2012 SP3 CU3 - 11.0.6537.0 - x86 (3152635) +$outputFolder = 'c:\sqlsyms\11.0.6537.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/87293ca873904ed2b56237e34e3e1f1a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e43071f0910a4ea7bf86b1d5ccc3fd3a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c8f9372146b044febc8ccce8b3c2b1c12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/0270b86f2c75487194f651d075a34e5c2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/4341ceb14e534bb5924ea613956c20361/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/85fe76a3ab4547f1b1cfad36f43712371/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b62e092daed64119808aa2f71fdf41051/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/91e900c8fc1b4d7f81cbc2e79afbfadc1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d39bca94636a4cf0bbeffedf2073f5551/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6065f2fd7ce6477bb93ff9dd4b74897a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6537.00 ((SQL11_SP3_QFE-CU).160428-1744 ) +``` + +# SQL Server 2012 SP3 CU2 - 11.0.6523.0 - x64 (3137746) +``` powershell +# SQL Server 2012 SP3 CU2 - 11.0.6523.0 - x64 (3137746) +$outputFolder = 'c:\sqlsyms\11.0.6523.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/fcafe44179a349b4b1a42e17631445382/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/04ab05307b834b1e93aaa5957b68ce492/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/10d09d86092f400aac076647eeca36492/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/af7848b84c93447291909dd6fed24bfa2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/79347e6e63ee4aa7a267ddb157777b3c1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7a3302ffc3a643eab7a0eb0a777222d01/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d12619783d1247e29e210143f65ebd4f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/74204f690ddd470aa8ba6d534f4b07441/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0045a36c9f7e4dca997063b212dc62291/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/86c28146977b477e8bc99340ad0107ff2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2113 ) +``` + +# SQL Server 2012 SP3 CU2 - 11.0.6523.0 - x86 (3137746) +``` powershell +# SQL Server 2012 SP3 CU2 - 11.0.6523.0 - x86 (3137746) +$outputFolder = 'c:\sqlsyms\11.0.6523.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/68a1704d4c60484abdab611a4011ebd22/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2b713f51cb3a475c8a0ade5063d183c52/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a9139393e7d148949351243a6f2e60372/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/84966d1d5e904eeda26c06b58e1d8dbb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/de7fcca82fa446358962e3106fa609be1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/39a1b26dcdea427fb467b9aefff863f51/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c5f85db1be474d0dbf027a0374de6e9a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/49835c6b775c4d9db7d3415b2b59ca741/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d74fca8456884c6a9b58acd70da167251/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e1d2fd01359645a69447f78c6a39beda2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6523.00 ((SQL11_SP3_QFE-CU).160302-2116 ) +``` + +# SQL Server 2012 SP3 CU1 - 11.0.6518.0 - x64 (3123299) +``` powershell +# SQL Server 2012 SP3 CU1 - 11.0.6518.0 - x64 (3123299) +$outputFolder = 'c:\sqlsyms\11.0.6518.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a311f07702a44e019573de6bc28d9a802/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/122248fa6f9643ffaa1d4b98a8b852892/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9d9fff96ee2d47fb8d4a1694bf0bc01a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/007a1b4b3ac941cab55a979ce199b3cd2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/8419c4bbf0b844879129f25d50eda11d1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ab53bf1c7c5b415489b8dad9527aaef71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f6d8f219eb804aeeb61e15c17855fa351/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d6e72bc2815a411e803c12d5a757e6c21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5f78f36cf3c64d4d8bbf5ae5b8506a5d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/466c40a06fe8457a88ac5b2ac31bb8012/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +``` + +# SQL Server 2012 SP3 CU1 - 11.0.6518.0 - x86 (3123299) +``` powershell +# SQL Server 2012 SP3 CU1 - 11.0.6518.0 - x86 (3123299) +$outputFolder = 'c:\sqlsyms\11.0.6518.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/85e2f9abea704a94a052cfe9a6dee0572/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1522388b2b31493585a6e2b4f2624aa12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2ada5d3381bf4c93aeb02541e200f17b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/70b02e6179e54640b5dcc09743e445ee2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/92fe1e276d4f424988cce512111d09151/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a704e7ede8b04298b150daaa93ba4d8f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/9040b150117a4e44a073e50d38297c051/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2599461ed95c4636bf1b1b4467a5d1e21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9b6afd69a5674b42b6876b28a79d8c161/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/799ab84cc9fe4b8a9cff76c808c5669c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6518.00 ((SQL11_SP3_QFE-CU).160107-1429 ) +``` + +# SQL Server 2012 SP3 SP3 - 11.0.6020.0 - x64 (3072779) +``` powershell +# SQL Server 2012 SP3 SP3 - 11.0.6020.0 - x64 (3072779) +$outputFolder = 'c:\sqlsyms\11.0.6020.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8c2548391c41414994a23eb9e1ffbc5d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8bcf882af198453eae955b7af05df27a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3811dbbc84c44f0d979c674cd571926a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/eb85f8ee377f43f9afed8cd2e9c932192/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/a017c07601cf4596a671f7b35a4119bd1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b287171e30de46d48bc5e4f50d321d511/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/50aca007a677401f99a7ad15b4631f101/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/cebe10126c694f9089577dc49f71d20e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ae66568baac84d068167d6a4a1cd7b001/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d7c6e98402ea495fa3da17f1aecb29ba2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1526 ) +``` + +# SQL Server 2012 SP3 SP3 - 11.0.6020.0 - x86 (3072779) +``` powershell +# SQL Server 2012 SP3 SP3 - 11.0.6020.0 - x86 (3072779) +$outputFolder = 'c:\sqlsyms\11.0.6020.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9c88c47ad634432f947247b93a4c437a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/70e38bc1d979482ab3577c81191a07892/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a71c6013ff7e4b4188afe07b47e9d5112/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/fe998ea9010c43c090935a171585c9152/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/1066d39f48fb4eefbd1096712687a1811/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b4529742a01b4ee88d17228b861439c21/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/49a2aab10cb04420b666377d96ec5b731/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5894cb69e99141c1b730209ff772dcb81/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/21ae50d9944c4af2b2868123b95b46591/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/12ddb13831544b28b5f8a4c017d0efa92/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.6020.00 ((SQL11_PCU_Main).151020-1525 ) +``` + +# SQL Server 2012 SP2 CU16 - 11.0.5678.0 - x64 (3205054) +``` powershell +# SQL Server 2012 SP2 CU16 - 11.0.5678.0 - x64 (3205054) +$outputFolder = 'c:\sqlsyms\11.0.5678.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/db25800662db4aa5abc2fe3b1dfa40892/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c2962322b56545e18fdd1947d7a3f5552/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/26e55d51a2524f8f9c3eb14a9c0a5e7f2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3f7c15db3e80428d842dc6577dbe957b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/102484c88a7a454e94a5b6fd7baf00a11/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6ccba8f0e4194a70a33c5969a18ee7a41/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/5006d5458a6049588ec4c1e0043b13a61/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c30cda3d5e9f47378676888347f958991/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8979dfe9d46a474a9c4ceba886d148071/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a62693b04bed4018829db79c6e9014242/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1503 ) +``` + +# SQL Server 2012 SP2 CU16 - 11.0.5678.0 - x86 (3205054) +``` powershell +# SQL Server 2012 SP2 CU16 - 11.0.5678.0 - x86 (3205054) +$outputFolder = 'c:\sqlsyms\11.0.5678.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/c7c7b2fbe65140d48fbfb488363088822/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b4a31b7568c54b6db1e29cfd4a8c62a12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/05099346226d439f95d2dc50d23f84042/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b1228bc7d3284c2bb2716e659b542b5f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/e3c2403ccac246f7945b28cf1636d68b1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f9706bb17f8b42128c9a74895ba068091/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6aad5ebf336a4352be93b0cd1283f3901/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7ce1f1a9129c489e9358e13dbd8dd6d51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/08ec37d9396e469a97fa1884e4f3126b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/cf639729d8724367a1e99d7dce200cc82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5678.00 ((SQL11_SP2_QFE-CU).161216-1502 ) +``` + +# SQL Server 2012 SP2 CU15 - 11.0.5676.0 - x64 (3205416) +``` powershell +# SQL Server 2012 SP2 CU15 - 11.0.5676.0 - x64 (3205416) +$outputFolder = 'c:\sqlsyms\11.0.5676.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/dd1ba68516834e3eac8754e0c3f763a62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d4489a41a7864f41a583d818941820bb2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/96ba3b4dada540baae72f7ac5d372c562/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/58ff259b5717420199bdca05ad6475fa2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/243641435747432bb7cb32747fbb096e1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d972cc8d2f0c47ec8f219ea7d4152cca1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/5b9529c4d43b4f79ae09b990a453ef2e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1e8ddd5ae37c49c98e758b3fd246d4971/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/06783190c3eb47438d51e209b2b15b4a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/acab102088fb4de3aea8154c3d3073c22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +``` + +# SQL Server 2012 SP2 CU15 - 11.0.5676.0 - x86 (3205416) +``` powershell +# SQL Server 2012 SP2 CU15 - 11.0.5676.0 - x86 (3205416) +$outputFolder = 'c:\sqlsyms\11.0.5676.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/c5dce76c002d40228af8b7f4334c43382/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f9ca6e1c1c5a48509ef17541f440110d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a65a7dbefb534977862075b5592cbea22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/2d77fbddcd3c461788cbbc876813d8672/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/3350d6c06cda4237b5522c0ce229d61e1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/08912861adab4657b566a71ce625b5df1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/591d683835904ed6936cc8c15d53bb271/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/beb991341db6464ba3e901e618e4141c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/01e137606c424aaea4b7ad65fda59f4a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/afaeeb6537af486eba72087380814b682/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5676.00 ((SQL11_SP2_QFE-CU).161010-1819 ) +``` + +# SQL Server 2012 SP2 CU14 - 11.0.5657.0 - x64 (3180914) +``` powershell +# SQL Server 2012 SP2 CU14 - 11.0.5657.0 - x64 (3180914) +$outputFolder = 'c:\sqlsyms\11.0.5657.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/25d44c4a218a45e69440f64a6c2f39022/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4ef82375cf4e42a8be639daea082a4c52/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ca2d467f8210454ea0b0f9e80185f22a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d89b853ec00c4ef4a2ff7439eebe952c2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/87f21dcc1cd04ac3b90b4a6ae1e428201/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e5104d3be08248348393b672b2a9bb0a1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ac3edf92e6ec4a12bb6533025087bf2f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/821c2909862a40bdb68783eb23929cc31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d1c8cae724694f6bb2962cdc83f4329e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a4a3c0bd71ad4f85bb1e8b97eb7b18862/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1743 ) +``` + +# SQL Server 2012 SP2 CU14 - 11.0.5657.0 - x86 (3180914) +``` powershell +# SQL Server 2012 SP2 CU14 - 11.0.5657.0 - x86 (3180914) +$outputFolder = 'c:\sqlsyms\11.0.5657.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ce78955c784c48afa622c25baf31d45b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/213855c2ec884f97896f2de644073c0e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6aba2304025c482694789dfa59caa53d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/140309b667144067ab36b0dbd619c6592/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/c3de962144364bee8d4f28ef8a9244911/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1ceb4d2de2a44439a8704ea70320c65e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/73272f461ea94ba19eab4f80bad006f01/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/4326574b01f6436a833579f838b757e21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8b38568a4a9f49c8b3aec36e8b5a71f41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bf3d3e6661b04901834ca05fc19a44352/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5657.00 ((SQL11_SP2_QFE-CU).160825-1749 ) +``` + +# SQL Server 2012 SP2 CU13 - 11.0.5655.0 - x64 (3165266) +``` powershell +# SQL Server 2012 SP2 CU13 - 11.0.5655.0 - x64 (3165266) +$outputFolder = 'c:\sqlsyms\11.0.5655.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a433571fbd0c41f5ac4d33283de127002/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/960013cc86c5408f9808f8378e2da08a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/171ddb83c0474edf824711de922e0a172/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4747e8ca27484a8199bb39b14f211c302/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/69db5fdaa93f408890a49893da554dbb1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/2e74440521ea4986a0b4eb23a776f3d01/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8b3231d270724bdc997c398a178833891/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a730d9127fc74a9b9ab5c74334bebfe71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9c5081d580624480aab3f8894169a9581/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/519331463ede472796ee00b4dbd637042/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1418 ) +``` + +# SQL Server 2012 SP2 CU13 - 11.0.5655.0 - x86 (3165266) +``` powershell +# SQL Server 2012 SP2 CU13 - 11.0.5655.0 - x86 (3165266) +$outputFolder = 'c:\sqlsyms\11.0.5655.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a40567d01f594052a94636f0cd569c541/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6f33217e9aa04118a60392866667a4dd1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a082374fd27f42d8aeb194286aa2f6051/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/8877e5f396644ace9da54a50dd1d9e621/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/28f1fa69afaf411b9febdf147cd1175a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3d0122e1b8b845c3a2e8aba23fe95f521/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4ba3538fcd764fc18b0042deb7c698781/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d06fc9adef414529902a650201013aa21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0f5b5abc62a743e3bbd0782075ef62371/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/67f36d2c92b743e5aff3dc36ae129fc41/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5655.00 ((SQL11_SP2_QFE-CU).160705-1417 ) +``` + +# SQL Server 2012 SP2 CU12 - 11.0.5649.0 - x64 (3152637) +``` powershell +# SQL Server 2012 SP2 CU12 - 11.0.5649.0 - x64 (3152637) +$outputFolder = 'c:\sqlsyms\11.0.5649.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/3b91a33f51794e3caa45dae0a72e3c9e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8981f04bfc6b49b1bc366fdbba7ac9bc2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ff6907a9682d4b2c8211be8b09ca3cb42/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b7f62a1ca0024f608c64c70ab25f49e32/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/20533819d052436b9f11657e00a25c3e1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/4aad9e292bf548faae06ff8ae1d430b31/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0fa56d3b36df453db62d14d6baf90bb41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/454c0beb41f946d99f097261b0177c841/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c8f5be043d814c118f23709c4a1ad1181/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/44f0c5b99ab343e28ab8711fa9bb2a272/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-0952 ) +``` + +# SQL Server 2012 SP2 CU12 - 11.0.5649.0 - x86 (3152637) +``` powershell +# SQL Server 2012 SP2 CU12 - 11.0.5649.0 - x86 (3152637) +$outputFolder = 'c:\sqlsyms\11.0.5649.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0a81fe91a80c4005abc46c2263f09c4c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e3044265c315485f8812fef56a7e73b72/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/334ddc7a968042d58e7f62f9a365c1852/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/76854cf991784573858a7b60962f93232/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/d1dde76542a9427ebecb65f2468b91ce1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/29d1f01b3bb84da780dddb33213dbcf31/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/9de157e8d6f54db7b98a7502b94577641/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e8541edbbfc0410d9b82e6ab78fc2ef01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f31f3117b463455688edb8b0f8163a401/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e3318525756c429c81667cb043abadba2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5649.00 ((SQL11_SP2_QFE-CU).160424-1132 ) +``` + +# SQL Server 2012 SP2 CU11 - 11.0.5646.0 - x64 (3137745) +``` powershell +# SQL Server 2012 SP2 CU11 - 11.0.5646.0 - x64 (3137745) +$outputFolder = 'c:\sqlsyms\11.0.5646.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/cd7a679d23ce4318ae4f9bd42021a1712/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/90d74a8ca29a4f30944f5fdfaba0c83c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/14a616d4d2fe48f293fdb04ccae512bd2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/a91a9c36928443ab880573c213736a0b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/40dd4867eec84f79bc2e0b16c8a88f121/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3a605746326140df8f9996070fe654b11/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c9718e636e7c4b4e8c0353b5a5a9deae1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/eb2f543f9569417e9664bdae69d903ac1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f16396e855d64f2b9db73963a1f31e591/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/856db9275d4b49bea827cbdd41a9afe42/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1734 ) +``` + +# SQL Server 2012 SP2 CU11 - 11.0.5646.0 - x86 (3137745) +``` powershell +# SQL Server 2012 SP2 CU11 - 11.0.5646.0 - x86 (3137745) +$outputFolder = 'c:\sqlsyms\11.0.5646.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/1747440228a742e590232cb45d5be3b72/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/95cfc60f73d24ed7b89a90a7ebbbaeef2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0c6c10d175a6457d8d7c6ffad717539d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/05b4ccc988ff4e5ebcc0702b5833f2db2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/5452aac59a3148ee8502ba3f365c7f501/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/018af0e7122742feb5a7332e671946771/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8b0d9d31c92147c2a83d337704ddd4641/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/56d0425cc87a4fcbb066efb003b8f9fc1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ee1d6435917a4f9885af79e50b4d37321/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6fa82e53cc59482a9fa430a99730f6222/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5646.00 ((SQL11_SP2_QFE-CU).160226-1735 ) +``` + +# SQL Server 2012 SP2 CU10 - 11.0.5644.2 - x64 (3120313) +``` powershell +# SQL Server 2012 SP2 CU10 - 11.0.5644.2 - x64 (3120313) +$outputFolder = 'c:\sqlsyms\11.0.5644.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d8768549cb5345399f4fe1cea88794752/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2cfeaeeffde843899bf0085a1fe229fc2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9255e9211d0f41edb184f4c128e449062/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/1f9672b7fd7e4c04a13e4623c116288c2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/65527fa7b46a4ba48843ac5ca4f6c91a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/aec37a7322154ab0a71d747d9318ad461/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3c1d262015bf4d089e3dd11a7735ce971/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/998be39e1a234448be37b1e13fe86d7e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9ce5afd549134784a502ca2c56a422ea1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e3a30191df804683ace74857f09b14582/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2337 ) +``` + +# SQL Server 2012 SP2 CU10 - 11.0.5644.2 - x86 (3120313) +``` powershell +# SQL Server 2012 SP2 CU10 - 11.0.5644.2 - x86 (3120313) +$outputFolder = 'c:\sqlsyms\11.0.5644.2\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/7826cfcc93bd484fabcb123fb93136b72/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/030e8e2257cc4ca6a2e48a05ce239b412/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/94778bf7d845444cb650904ec51e75442/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7b2d129b95e040ebbb027cef893c7f332/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/d7c79fd24b5e456dad7ec1547ddc46821/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ba92ea50bd6a44f28a8fd9559f5394d81/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c0db7d5acd534245b1bd9c10c425335f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d7942859fe6849968b3b484e5c17a03b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7f570e9d52e1447ab60d9b9fa8354e761/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/dbd7a81924634685b9cffd5c3cb533a62/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5644.02 ((SQL11_SP2_QFE-CU).160107-2309 ) +``` + +# SQL Server 2012 SP2 CU9 - 11.0.5641.0 - x64 (3098512) +``` powershell +# SQL Server 2012 SP2 CU9 - 11.0.5641.0 - x64 (3098512) +$outputFolder = 'c:\sqlsyms\11.0.5641.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a521723dc40a41ae90e5d3f588fa0ccf2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8321e31318604a69993a346d0006baa02/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9d8402c7dd2a49b0b16ed33e0a4beb322/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/00ebaef66b3e4232a2e59b4cb1b0f0de2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/b1d05b1c84dd431a8f41ffb65bb657021/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/22bc0604c1d54b8c8d826ee74708cc431/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6aa02f4cf90e431e96f5ed3610a5c8561/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/19b09216c02f4f79954d0bc4dd86deb31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/63f7a395d7c345f182d3cb93ce1065f61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/33a6114f99434ff0b67b421c6ba8bf872/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1624 ) +``` + +# SQL Server 2012 SP2 CU9 - 11.0.5641.0 - x86 (3098512) +``` powershell +# SQL Server 2012 SP2 CU9 - 11.0.5641.0 - x86 (3098512) +$outputFolder = 'c:\sqlsyms\11.0.5641.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/90707b52346e4f2081ee4b57991465f02/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dadbef50fe024e9fa2ab29facd23364e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/848be43da62b4654962c76ac0817f4d52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d3ead1ac747046bf95ce1fb24d26414b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/6d4960a06b9e449189135a1f8cfe486d1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/fc7864bea8ae4450af4c100b03106cbc1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ab2ca7efbd604bc2a98d334a6e8e85051/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1aaa39cfe07242669c6f1fd909a40e141/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8987ad9ed15145209fc028ceae4267041/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9166856bbe0d4752b138d4aef51afa7f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5641.00 ((SQL11_SP2_QFE-CU).151020-1623 ) +``` + +# SQL Server 2012 SP2 CU8 - 11.0.5634.1 - x64 (3082561) +``` powershell +# SQL Server 2012 SP2 CU8 - 11.0.5634.1 - x64 (3082561) +$outputFolder = 'c:\sqlsyms\11.0.5634.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/61ef98bf0c944d27bdcdcbe956a71f532/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e32a770828b441ea83876963f8915c642/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/82d71733ddda4f63b0c0c587bea3e5b52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3d8d115280c343e79ffda9d5e13914ca2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/df6d6664b8b343b5822f404ca1c71e961/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/afdf9896ee5f454da131c41d186ed2381/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d24c170faa1d4b66a72dee2f6905bda41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6be320158f64485fb39edc54657cc9691/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/4a7653322ccd491db5e3319fe11fd1e11/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ff7b48cc7d4845009f4219b2ea8ed7af2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1845 ) +``` + +# SQL Server 2012 SP2 CU8 - 11.0.5634.1 - x86 (3082561) +``` powershell +# SQL Server 2012 SP2 CU8 - 11.0.5634.1 - x86 (3082561) +$outputFolder = 'c:\sqlsyms\11.0.5634.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/eaf68945f2a744b49102874620c553442/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/62d91f546d724970a297824753b247a62/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0cee6b19c69a45a79cc9ba2576d203802/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3595e13882f2488dad33b5b42b6de7022/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/5d1ce58362004146a03b9a203f716bcc1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7ec8ca29f61b41c99ebc77df6f3641dc1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/32f2862ef89d49b29bfa4935a8cb5da81/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/64249ed7e3394edfa60825e07327feab1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/41763cddfdd84bdeae6a9d2f7f93a23a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/839d3b40fcbb4c94b8bc3b9e91581f962/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5634.01 ((SQL11_SP2_QFE-CU).150903-1831 ) +``` + +# SQL Server 2012 SP2 CU7 - 11.0.5623.0 - x64 (3072100) +``` powershell +# SQL Server 2012 SP2 CU7 - 11.0.5623.0 - x64 (3072100) +$outputFolder = 'c:\sqlsyms\11.0.5623.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ae8dca071dd14b8588f8c1e8355750c42/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e7c57dfa80174541b048819804823b642/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ff4277e6a21e48fb9e04cc4e2c80ba0f2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/88abae217a834ae18b5754feecda13012/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7d92e63eb71a45809ce78c14ffaf09d81/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b5fb3509642c4690a5c45749035333051/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8072e1fb97424fdc98269196785f7fbe1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/fca6c8e72e5e42ecb99207f194bef9191/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/31bac03868374db896288d1c1a856bf91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/48708388ca2f4e6c9c9a286887fc6bda2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1152 ) +``` + +# SQL Server 2012 SP2 CU7 - 11.0.5623.0 - x86 (3072100) +``` powershell +# SQL Server 2012 SP2 CU7 - 11.0.5623.0 - x86 (3072100) +$outputFolder = 'c:\sqlsyms\11.0.5623.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/473e800d9eeb4e4097e87652ab5aaa052/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/19adc0aa5e1249238e244b5ba9e0f2492/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/58fc60e3bbd5448bb466dc8f753683b62/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/49c28e17e982469bb1092e77901d168b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/cc65b11dda20409a8879339d384bd9491/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1a58faf830674e18a3aeb22c4f0818211/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/49fd8984505e468590ca91dda1dc99d41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3ba93675da7c476c979fd0b7cecbbdab1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3d6472408ed74f41bb58f30027ba9e421/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ee5bb2170a2347978420200f22fb85592/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5623.00 ((SQL11_SP2_QFE-CU).150709-1156 ) +``` + +# SQL Server 2012 SP2 CU6 - 11.0.5592.0 - x64 (3052468) +``` powershell +# SQL Server 2012 SP2 CU6 - 11.0.5592.0 - x64 (3052468) +$outputFolder = 'c:\sqlsyms\11.0.5592.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a9e46f8055ae4cb5aa344fb96e73ca7e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/cf97aed844944105b2d8ed9a933dc1522/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d3bcd6c8911b48a491bcf8e18841ba3b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/92ea2d549256436c83154e05e769d26f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/0ddbf5e6c62c483eab519b300e41aa131/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/253e36a0d02942189ed1205210163d8a1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ae5a1adb5bf94b38b3ebb35270da6bb71/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/11acb1f2f7cf4498a3a8594014e4a5491/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7ff78655e62d42d3862242c04816400d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c68000bb1ce7439ca573a54d17c73ab52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1509 ) +``` + +# SQL Server 2012 SP2 CU6 - 11.0.5592.0 - x86 (3052468) +``` powershell +# SQL Server 2012 SP2 CU6 - 11.0.5592.0 - x86 (3052468) +$outputFolder = 'c:\sqlsyms\11.0.5592.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/90b88bf18b2b483bbb76862b88cce4032/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ade94be306d74bdea416c6d4efd8d8482/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/fc93e429e1454118b9be2831ac8539602/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/27a72ca6e4604cc8bdd4b0362751e82e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7aa7de50535a41d4b28f1437981bb3401/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/73f81b7d9c4240de8339ad241becf98f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4b749317568942e383ee42a9eb2cf1f41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3c59c6073f7d48df91b7abd1828db0c51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7f22862851fc4bdca72990a66edb51991/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e36a38ed3a6146fbaf6216025b206d802/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5592.00 ((SQL11_SP2_QFE-CU).150417-1510 ) +``` + +# SQL Server 2012 SP2 CU5 - 11.0.5582.0 - x64 (3037255) +``` powershell +# SQL Server 2012 SP2 CU5 - 11.0.5582.0 - x64 (3037255) +$outputFolder = 'c:\sqlsyms\11.0.5582.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8badafbcc6334b139d67b83c61e1ad632/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c736d839f6f54501a94ccd22ec14d3552/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d4ed0467cc1944e19589685f554793482/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4534514aec274addb9f4bacefda3799e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/556a0a2b1d5d4757aac0242c56f798551/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3cceaa5cf5684811a0386e715a6aecca1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b1bc02bf82844ba886d35e2f3dadd38d1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f4538786cdca4eb789acedeb918639401/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8358c5a13ecf438890f62b23d94a30f51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ae3adbf271aa479fb5256880e575fed22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1800 ) +``` + +# SQL Server 2012 SP2 CU5 - 11.0.5582.0 - x86 (3037255) +``` powershell +# SQL Server 2012 SP2 CU5 - 11.0.5582.0 - x86 (3037255) +$outputFolder = 'c:\sqlsyms\11.0.5582.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/3a47214af54f43b494f0ea53b36d1a3a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8b32b6454ee742eb98916880e92325292/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9bd5f790568b408fa093d1ac93ad5dd92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9920c94073c94b9b9334cfac3233e2e92/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7bd272d1179e4fbd92b9c5863a0133791/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/0ddb45c56e3b41d99a71af72332e241f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c3ba2ddbe9f143788b703f9d2d8c7a2c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ecce36e5bb034047998a2bd085889c841/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/cb343262158a462f92b23f68d2ae7ac21/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5a1bf2e1647e44f0815b022eb13ff9232/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5582.00 ((SQL11_SP2_QFE-CU).150227-1813 ) +``` + +# SQL Server 2012 SP2 CU4 - 11.0.5569.0 - x64 (3007556) +``` powershell +# SQL Server 2012 SP2 CU4 - 11.0.5569.0 - x64 (3007556) +$outputFolder = 'c:\sqlsyms\11.0.5569.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/362c792ee0e84038a70ca60e9d73670d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a0ca918076554d4c933045287d5096ed2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/77c344284abe4a1886d727f7552e9c952/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/a30fa17e3c414464afa91913f0833c122/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/7fc8dd4807bb420fbc055771e64b95321/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/183074ed7e6a4bb9a13c48ad2a00c3411/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3984af0d59e8459d83be5e3215e151b91/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/79ebc6f96e85467090f16ccd6efa5f6a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/384a0f1d64a749e9bac4a0b0d8d203d91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/99ebd3f774364d7cbd4679ed474886ae2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1123 ) +``` + +# SQL Server 2012 SP2 CU4 - 11.0.5569.0 - x86 (3007556) +``` powershell +# SQL Server 2012 SP2 CU4 - 11.0.5569.0 - x86 (3007556) +$outputFolder = 'c:\sqlsyms\11.0.5569.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0f05bf5e3ab14d13a90d394d10fb3ee32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0467323f452c4c889bb8c03eb9245e482/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/8d05289fe8d740979420b0fd5a7676e92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/29ae6e87132b46b4b78e7965ea7ada3c2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/9fa2ee33584d4ed78ec81f31b1b600481/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/405d1f73f6c94e88a32c71a53ecd1e8e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0db139cf45c246d3913b3c3605ec2f651/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/50b739fdeaea477589c02536e8cab5cf1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ccb38bba52fa4568bc85256b6039d9531/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3f9b337dac5a40559d2c1d53f33b4dd62/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5569.00 ((SQL11_SP2_QFE-CU).150109-1126 ) +``` + +# SQL Server 2012 SP2 CU3 - 11.0.5556.0 - x64 (3002049) +``` powershell +# SQL Server 2012 SP2 CU3 - 11.0.5556.0 - x64 (3002049) +$outputFolder = 'c:\sqlsyms\11.0.5556.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d1a00b8b404a457b9d366e7db692612c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/caa84e0b43e5423dabd502cf51fcef3a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/692932d983ac4d0cb8b4c5280484f7ee2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/eb5aa259e39446cd8eaf7e75c20ccad22/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/0d5bd32496a14c1db5d2bf51ac4c1e0a1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c25697387b484c97b22b5f447bb3ac1f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ad1f8b1a883a4339a75f54c8dc57fdb31/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/22376adfcdfb44f5af969adecba164911/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/931ba4aa04ce4f42a0fc4d464091f18a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ce308e7fe1024a62ac491cf474cec82c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1640 ) +``` + +# SQL Server 2012 SP2 CU3 - 11.0.5556.0 - x86 (3002049) +``` powershell +# SQL Server 2012 SP2 CU3 - 11.0.5556.0 - x86 (3002049) +$outputFolder = 'c:\sqlsyms\11.0.5556.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/5918d9b7678849c49bbb3f5da4e3a0282/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/00b4161353c44d8e8a3f856e666b09162/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/dd70fb9e4d4e45d2b05ab68c33586bdf2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8a3d1406ad4b4d81a996bc92df9ebcfe2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/de2557533cb84d6c8fb44bd721bc09ca1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/99a6e3ff0cb84daa83b2c919ac45bf3f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d8c9218704ce483ea64cb50ae2bc08f11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5ffe4b28d77f4236b72eba2f4c36c4901/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/87cd133d6de14b83a0fc51fd0c6731731/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/750a2c62762c42a5bd832b7334954b822/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5556.00 ((SQL11_SP2_QFE-CU).141031-1639 ) +``` + +# SQL Server 2012 SP2 CU2 - 11.0.5548.0 - x64 (2983175) +``` powershell +# SQL Server 2012 SP2 CU2 - 11.0.5548.0 - x64 (2983175) +$outputFolder = 'c:\sqlsyms\11.0.5548.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/99205f110e104780bcd50b13b8b2ef602/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/cae73ab941a5449bb04d577b8ac0ee2e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5b7ccbfa58b54a8d80d9fe76d86eead32/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/35f5dd06512c4dae8339badc7b32f1a02/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/07c56b468964456996e7fffcc033ba561/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f8b575102d5e4845bb73a4713fbd27281/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f48d51269e1a44bf917c04e47fd3497f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/380cdbf633f94b8e9f7a15c4a0f05e9c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a10eeceb16684e2f97e7bf5b048556ae1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c7371ee128084547b8cc44cf23daf6322/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1703 ) +``` + +# SQL Server 2012 SP2 CU2 - 11.0.5548.0 - x86 (2983175) +``` powershell +# SQL Server 2012 SP2 CU2 - 11.0.5548.0 - x86 (2983175) +$outputFolder = 'c:\sqlsyms\11.0.5548.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/3e037ba29b3e4225ae410c337d79bd8c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b45cf018f0f54771a95e71eaaa28a88e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a76a804ec0ba4b76ba58f380668012da2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/54c5a385aba743edb15be3e62a137c832/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/3165959521524b8eaed9ece7ff68571d1/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1a52c14e68fa418188349ed428ed814a1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c4534dd553ae4e1da2fdbb4df151981c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a6e6cca281ff419291ad2ce6e8c536881/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/01e271d3affe4c5197beedb3189b46541/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9d08d936dc3f4b259d73b86191fcd0d32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5548.00 ((SQL11_SP2_QFE-CU).140906-1802 ) +``` + +# SQL Server 2012 SP2 CU1 - 11.0.5532.0 - x64 (2976982) +``` powershell +# SQL Server 2012 SP2 CU1 - 11.0.5532.0 - x64 (2976982) +$outputFolder = 'c:\sqlsyms\11.0.5532.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/cbf110ac14d94a8cb27f29d7def6e2832/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/5ef74be1c5314aa38320fa24e34e51c72/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ffb5d83cafba46faa6816b8e6491c4b12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/5078a04f329147b7978220b06bb870192/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/d7952e1acc294862bda55dd7e4d3e8211/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/5a95d568bac94867b8e0840fd91e50c51/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6639b1da0ba34639811d5bec9aff80371/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a8c29cbda99e41fe8e103298736b6a4b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/da3edb6b439f4e028581352ace87953f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/427d00997e8b428bbb7a3e5258acb0f72/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1446 ) +``` + +# SQL Server 2012 SP2 CU1 - 11.0.5532.0 - x86 (2976982) +``` powershell +# SQL Server 2012 SP2 CU1 - 11.0.5532.0 - x86 (2976982) +$outputFolder = 'c:\sqlsyms\11.0.5532.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/35685e9861dd48aaae7cc5b16bd328122/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/894411a3cde84440964e7d15e54a42f22/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b8e311cfe83844efbfa836d7edd0a4c92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4dde9c04fa9e48aa8dd99f6253ddde802/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/bc9c1b0188ad4c4694e3fc2b2cc003f51/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f4e0f97f61954596a55a9127841a84ad1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/27494563474d41a9b38acc20ae538cae1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3c69ca79dab742ffa5fd044f1300bbe11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/4081f3e32c334fb8b9164529b87ccf601/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4b32834628184e4fa4f9848fa401a19c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5532.00 ((SQL11_SP2_QFE-CU).140714-1449 ) +``` + +# SQL Server 2012 SP2 SP2 - 11.0.5058.0 - x64 (2958429) +``` powershell +# SQL Server 2012 SP2 SP2 - 11.0.5058.0 - x64 (2958429) +$outputFolder = 'c:\sqlsyms\11.0.5058.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ee0459385983426284e7a607384e4bf62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/fbafcdb326434a41a09d549fbf6e8f062/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/587ed8597e30437a8028d1ee025c75d12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d7a22e5762bd4c94bc2c0af2fc63a1372/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/017fa06efaf641d4bba760a5258be5741/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/32a91c0b60204fffa1374cf3492a88a01/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0452878b0b30401f814aab0fa4ac74661/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/389e963e00f040079eff7b8e2ccc3c911/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0ef93093d4ea4f9d90a21e79f602919d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/12ec0b5836ca41429c5bce95a1653eaf2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1820 ) +``` + +# SQL Server 2012 SP2 SP2 - 11.0.5058.0 - x86 (2958429) +``` powershell +# SQL Server 2012 SP2 SP2 - 11.0.5058.0 - x86 (2958429) +$outputFolder = 'c:\sqlsyms\11.0.5058.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9a6c2fb9f9ad46b7b240b1cd3f7782312/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1c6fd82d91f84e9b9ebca1a6a1bfb80d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c7c06ee472184be7a264d1450b683ef52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/004a42376b6e41af95b7280c65021add2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\SqlAccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlAccess.pdb/15004f64c18c48e1b5b1573836f2a7931/SqlAccess.pdb' -OutFile "$outputFolder\SqlAccess.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d5064f709c6f4124a7423ab6fa0ed7f71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/74570a2c5655462e859fe5f6358603ef1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/895b174b37d9498496b464b2600219a31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/366970ac611340e4bd1e6c244d2b30e71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a4ca976e0f84491eafe73b3195b39c6a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2011.0110.5058.00 ((SQL11_PCU_Main).140514-1623 ) +``` + diff --git a/Errors/PDB/SQL-Server-2014.md b/Errors/PDB/SQL-Server-2014.md new file mode 100644 index 00000000..38963da2 --- /dev/null +++ b/Errors/PDB/SQL-Server-2014.md @@ -0,0 +1,1650 @@ +# SQL Server 2014 SP3 Security update - 12.0.6372.1 - x64 (KB4535288) +``` powershell +# SQL Server 2014 SP3 Security update - 12.0.6372.1 - x64 (KB4535288) +$outputFolder = 'c:\sqlsyms\12.0.6372.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/58e64a3a589647efb0962ea0b54a4f802/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4c0bcc7afda04998a4cb7e0bfdb736792/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7c6006d90ec04c61ba245a22fba604112/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/34148353e4e245728f03ab52442361702/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/fdbeff4d6d474008a694cd69c38acff72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/e82e0bf323c44a328f1dff97e18643ea2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ee0aebf1bb054cf7bf1a02b9967cb1941/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/37659ab76c0746f59df1383528780d091/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d5b8297e63ee412bacb678e15142c6e61/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e541cd3097054c21bae4d0f56206a5d81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9d8cfaa7d57c414eb326f3d248345f4a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +``` + +# SQL Server 2014 SP3 Security update - 12.0.6372.1 - x86 (KB4535288) +``` powershell +# SQL Server 2014 SP3 Security update - 12.0.6372.1 - x86 (KB4535288) +$outputFolder = 'c:\sqlsyms\12.0.6372.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/293ea0a0c7424b899d5bcd915253d8671/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/bcf38756effd4ebc810aa6e146c6a1bf1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a59d30393cae4117a8fb17f54e1b6fff1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/19fe1f9fe3c84751a09fb1916c1d1ab31/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ed1d0cdedb2247d9b67ba5b7df4247ad2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f3647da71cd84c81a409357f4e3823b01/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1e54810c09ff4222889ac0220924754a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/eb15a63849fd464484aadb058f6cceee1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6372.01 ((SQL14_SP3_QFE-OD).191212-1438) +``` + +# SQL Server 2014 SP3 CU4 - 12.0.6329.1 - x64 (KB4500181) +``` powershell +# SQL Server 2014 SP3 CU4 - 12.0.6329.1 - x64 (KB4500181) +$outputFolder = 'c:\sqlsyms\12.0.6329.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d8fb694123ba4677bee6145b83b62cff2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1b6e19734d074c9890f13ff5ea5d4c912/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f95e3773af054cc7a3bf4b6085f6c1d12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/84e90c67c25b46419a58c11eea0a9a4a2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1e7f7c728a8f41049e73e89d313fcf852/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/4f2b4eda1143444bb7963507c9f9ea232/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/530c0de276fb40ceab73fb117b038d601/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d6708b4bf5854985b6fa2ef0d44508a11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6c202059075a4fab90806f205caa070a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/63a4742459624df0938bf06b948771ad1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0f334a75cf294a6aa2be0b46f824b4902/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +``` + +# SQL Server 2014 SP3 CU4 - 12.0.6329.1 - x86 (KB4500181) +``` powershell +# SQL Server 2014 SP3 CU4 - 12.0.6329.1 - x86 (KB4500181) +$outputFolder = 'c:\sqlsyms\12.0.6329.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/890448d8cb7045b393f8d1e2414899681/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/54428dd07fed4d92a44af191b64b93931/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1b72f20b65754e08a1b1afa6a1afa4111/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/648fb8d142124a79ba2427d7afa6e0b11/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/494b3def7c474707a36f396d3376c4862/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1fffeae543a04025affdb7835ea77d271/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f5d000569d74429ea2403fa65f7e782d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/37ed1fbf4c114534bc53be649d38a4931/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6329.01 ((SQL14_SP3_QFE-CU).190720-2034) +``` + +# SQL Server 2014 SP3 CU3 - 12.0.6259.0 - x64 (KB4491539) +``` powershell +# SQL Server 2014 SP3 CU3 - 12.0.6259.0 - x64 (KB4491539) +$outputFolder = 'c:\sqlsyms\12.0.6259.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/509f1673a650493eaf6e0609be36b3492/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9d0ed648ab3943148311d78972c4dcdf2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/93f36eaccaf74bb49b33f830aa6225302/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/59a4d543c0184372b51935541c2900152/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1836c6d5c554455c8b477142ba1c27552/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/aefccb0a87ff43b6aa36c438baf6d1c42/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/aa90299262cb4b118067c2df8703c9b91/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/806e98d642074181978524533a9ef6531/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/afbaa234358740998f706fd39e87a54e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/dd07d2aa7b2d4a528ffb3446711c9f321/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9a8dc77df3fc40f0a74375aa505eccfa2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +``` + +# SQL Server 2014 SP3 CU3 - 12.0.6259.0 - x86 (KB4491539) +``` powershell +# SQL Server 2014 SP3 CU3 - 12.0.6259.0 - x86 (KB4491539) +$outputFolder = 'c:\sqlsyms\12.0.6259.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/eb6a68e1d0a24f9a9334f21aa15921651/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e70ca276fe4043b19187d6d11dc8b8191/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6961ef7185e6403b8f45a2f02afaf21d1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/43b2f5430e244bfdbebf88fe85f6c9dc1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/549544362bc8490f9d315b111ae5b6952/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ce9855d8b6af4d45a14edb618dae86be1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1c741bb277204482be593a294bc80dc71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/48abe955b32c43c2a8d38d8a0b706de51/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6259.00 ((SQL14_SP3_QFE-CU).190401-2139) +``` + +# SQL Server 2014 SP3 CU2 - 12.0.6214.1 - x64 (KB4482960) +``` powershell +# SQL Server 2014 SP3 CU2 - 12.0.6214.1 - x64 (KB4482960) +$outputFolder = 'c:\sqlsyms\12.0.6214.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/10e693af20a345548cab5cc0d5bb9e5f2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/277e791468d84fd3ac5134bfcb8b00292/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/8c63860792c440eb997bbc9c3da54eb72/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/860593c8a27d4f609d1f139775b445862/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/0170e47e2ba046e0b2726300345d4dfc2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/cf29ef995a5545ed8f8af7ddd180b7802/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/4d1d0ae8debb488496086b48820cae8c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a3671b7f7c5a457186f91951c24bae1c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d7cc5f9c29834c34ac417d1237cc631c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/187d57d685f644f79c937544e990dbb81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5c5e9a47919c4d6884d480d8f1c2d0762/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +``` + +# SQL Server 2014 SP3 CU2 - 12.0.6214.1 - x86 (KB4482960) +``` powershell +# SQL Server 2014 SP3 CU2 - 12.0.6214.1 - x86 (KB4482960) +$outputFolder = 'c:\sqlsyms\12.0.6214.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/754b0cc922a745aa8602712ee9aa1db11/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/3841b412fc874fb99ca1f27156227aba1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ed56dba006f74b929b23cac11986d8d51/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/ec53723220f14149a92352787915d8cf1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a13d5a4be3234606bcfdbdfbf99ca8352/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f3338a3416cc4c9faa6f0f2dd08873761/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b113633a9a3f4819b125a6fd84cc4b2f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/40e7e956e6b64b3390093d7fed7996711/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6214.01 ((SQL14_SP3_QFE-CU).190202-0024) +``` + +# SQL Server 2014 SP3 CU1 - 12.0.6205.1 - x64 (KB4470220) +``` powershell +# SQL Server 2014 SP3 CU1 - 12.0.6205.1 - x64 (KB4470220) +$outputFolder = 'c:\sqlsyms\12.0.6205.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d81e66c5bbd8441aa42d3120f29de3942/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/531883113186498cba06afb246bd12172/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/093905727fd6498fac8991daed83fcde2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/810559511add437f9da77ec6c227c3fb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/fff69d6bafab400fbafb9bfdd6fb52ff2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5cac176280bf4ab2af8033571dac19112/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b6bdfa6c96e74ef5ae6996e1733a432f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8be7ae0b97464e56889d44760e5991771/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/452b00505e9c4459877311b2a5296de01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/aa1470bb4a5c4687aef9d015e876685d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2fe2b89405d644e8859b099da8827acb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +``` + +# SQL Server 2014 SP3 CU1 - 12.0.6205.1 - x86 (KB4470220) +``` powershell +# SQL Server 2014 SP3 CU1 - 12.0.6205.1 - x86 (KB4470220) +$outputFolder = 'c:\sqlsyms\12.0.6205.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/cbcf0fbe53e54dacab354777d0dd5c2f1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4f2576c7baa640d894aa0bf5d12fcf5f1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ac9f63e413d74fc5b1685806550265ae1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/fd21a26df72c47e29b96652c800806001/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/75e51827bfcf435bae782ec8b7a4e3d82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1a1dabe18df94874ba8bf28b429a8e6e1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6cc29ac330c64c0a97461b778a1ba63d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/64addefbdce84bdd97198a54d80939e71/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6205.01 ((SQL14_SP3_QFE-CU).181130-0218) +``` + +# SQL Server 2014 SP3 SP3 - 12.0.6024.0 - x64 (KB4022619) +``` powershell +# SQL Server 2014 SP3 SP3 - 12.0.6024.0 - x64 (KB4022619) +$outputFolder = 'c:\sqlsyms\12.0.6024.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/41b862dddc464a7e8fb435d80ef36d452/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8bc7a14bc8374bd0a9bcba71d608c2ef2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d1b5af4c4bcb41aebdae55654c0abc172/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/a84fba616c964fdb849bb61878d368312/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cd96b0931624429a8b38b968078fad6c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5e9cea18178c471b98c01da45892cc142/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c9163d437f9e473a91690d6a7fae07531/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f97a0a9518ea47d3ad13d09e1c6cbc8e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1915e0ba4f764b49806e8bcefe9bdd351/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9b9535d5b46442d7a75246220c243ad91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/15291da2ad56424ab3f1a7e97809ec602/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +``` + +# SQL Server 2014 SP3 SP3 - 12.0.6024.0 - x86 (KB4022619) +``` powershell +# SQL Server 2014 SP3 SP3 - 12.0.6024.0 - x86 (KB4022619) +$outputFolder = 'c:\sqlsyms\12.0.6024.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/63c453d94e884e719f71611dd86e41f71/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6b94239f60d04638ac56d2d915054ae11/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d2bd8b4899db4627a49dcf39f275681a1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/e42c910a8207417ebfe95904c7aca3c01/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/65c5722bca2e4384b8abdd8e7f57d00b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f0ce2870ba1c4a759c01ee8c9366fa5d1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b1c25cca32ca4d6391442eb096c2e71b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/370cc1865d654a908a912aca9de0156d1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.6024.00 ((SQL14_PCU_Main).180907-0056) +``` + +# SQL Server 2014 SP2 CU18 - 12.0.5687.1 - x64 (KB4500180) +``` powershell +# SQL Server 2014 SP2 CU18 - 12.0.5687.1 - x64 (KB4500180) +$outputFolder = 'c:\sqlsyms\12.0.5687.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/bc12ecf9b0b543b196f0b7ed938283452/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1b75aed94f92493dbba724cdc1f7c36d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ff83ee2c46a7487686e8e1130887ced12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b1044002158745fa8df8cce82b12f6ae2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e8b1bf15c88342efbc82d32362ea64702/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/e6d23fe6f42648418edc7c96c8619fd12/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/abbcda6f1fb844bab401cd2ec5ec95471/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f1f51c0ee2bb40dea8c9cc16917f52981/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1d23807267c543f9a3fe48d69ef3d13e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/801dddbf3b0849d9b0b1d15219dadad81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e53cbbfca1d94580b8d4a7d511bb56e22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +``` + +# SQL Server 2014 SP2 CU18 - 12.0.5687.1 - x86 (KB4500180) +``` powershell +# SQL Server 2014 SP2 CU18 - 12.0.5687.1 - x86 (KB4500180) +$outputFolder = 'c:\sqlsyms\12.0.5687.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1f1ebd01257f4aa5861d1ba6bd5eef381/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b7fdb65668ae43cbac516c04d7fcddfb1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f4b5dc917b9a4b578e83a63c98914bdb1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/dd4f41c29b454453b9dadd60a3cf988e1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a8c3b381308647ab9a765b681f92e08f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/77dc64a2c02c41c3921c183c76ca39d51/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/afe089cbd86947c6b1fe8796ded5a75e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/897c55ca4ff84510ae2c1ac75f918e771/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5687.01 ((SQL14_SP2_QFE-CU).190720-2034) +``` + +# SQL Server 2014 SP2 CU17 - 12.0.5632.1 - x64 (KB4491540) +``` powershell +# SQL Server 2014 SP2 CU17 - 12.0.5632.1 - x64 (KB4491540) +$outputFolder = 'c:\sqlsyms\12.0.5632.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/7cec2abd211d44449ec0f3e94e1a78202/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/093aba20ce644768bb722dfc74216a672/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/429635c72df34811b063bfbdc4fd30d72/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3e544ec2f85b4e27b3d23c8316125f262/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f5e5a5a404464f80b46f6449a2dfa6a02/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b5f8b9ae3a364402ac1b8bab1c3732512/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/cf46f2edea064dae95f6a457ba1ae1ef1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8a0ea19b90b84d7799d99bb3b751399d1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/fa60812c91384eaf82bd97d59a2ff4e61/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/310541c655dc434c9d834d1a6a196cfd1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2de8f5bc87ff4a8390a0f454faf810282/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +``` + +# SQL Server 2014 SP2 CU17 - 12.0.5632.1 - x86 (KB4491540) +``` powershell +# SQL Server 2014 SP2 CU17 - 12.0.5632.1 - x86 (KB4491540) +$outputFolder = 'c:\sqlsyms\12.0.5632.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/748fe7f884084be6bd64e1e9448d0ffe1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/545779f8eb8547d4abdd811f28c7f3f61/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/36d26ada3cf949229fda088acadabd831/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/478b047f2f8044b7b33aeded194ebfee1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/0466eb809cbe4386b49402ad9004229d2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/066f353a8df34b8c8bc789d6e27c5a321/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6ac1205c109b49ae850f9ded968ffecb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/eed60d89729949198006ca2352abf51f1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5632.01 ((SQL14_SP2_QFE-CU).190401-2109) +``` + +# SQL Server 2014 SP2 CU16 - 12.0.5626.1 - x64 (KB4482967) +``` powershell +# SQL Server 2014 SP2 CU16 - 12.0.5626.1 - x64 (KB4482967) +$outputFolder = 'c:\sqlsyms\12.0.5626.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/7090b9b360f644bda3ac44b853a206d82/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6c9e5d6da1dd488d89eb0ae333b1c5eb2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ea9b053430534dfc8f0dce4807a484682/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/98a4a92f370d402188b910a7435ba3f72/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d535d53ebf624bb29f5557ffbf0a5efc2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/54f79487ed6d40ea86bbcc67ff82b6e82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ea86d5e8467f4f289207290bec941f7a1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1d2496b66ea54f22851739b58fcd1d371/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/70eb1fd8363e42419e5e5ee4a23d7af31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0ceb3b389ce54506b0198b62af03a7a81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/44cde1fe0341418cabb84df6877e072f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +``` + +# SQL Server 2014 SP2 CU16 - 12.0.5626.1 - x86 (KB4482967) +``` powershell +# SQL Server 2014 SP2 CU16 - 12.0.5626.1 - x86 (KB4482967) +$outputFolder = 'c:\sqlsyms\12.0.5626.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/b78052c424754a1e9f08450f02cf15261/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/273a5267830d42a7aa3f38a52bc210cb1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5256c66a20844f00876972b91c7606d01/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/f755234510654e88b5a922721ea8f8071/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/dcbe2aea271c41d08af7f2ee653651c72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/2c2f8b012a19446b80ca5f21ca91700c1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e59649446ebc4f07a5aa23edc78b5af11/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d0b73290904841ca94d10ec14ad456ab1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5626.01 ((SQL14_SP2_QFE-CU).190208-0024) +``` + +# SQL Server 2014 SP2 CU15 - 12.0.5605.1 - x64 (KB4469137) +``` powershell +# SQL Server 2014 SP2 CU15 - 12.0.5605.1 - x64 (KB4469137) +$outputFolder = 'c:\sqlsyms\12.0.5605.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/117240f0c59848f8afe7069fadb2be382/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/876f1d479cf34b3cbcef15246fff9b2b2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3204a130bbab4542902c7a8a2d83fa512/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9d04ea3232d645d88d2918112a86965b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/271f77960efa4e848183c41e045ed28b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/05287b373d6848818fed57489cb723882/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/37871400f6ba41cb87953ea6dee1679b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a150b67635d9449e9cb1e54dc04057091/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/729bc522263b44bf9d76c05c86d60aa71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0efb398f50ac46a095e3db1d063494b71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8c1f27f1610d4083b6cfc03d8464e9702/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +``` + +# SQL Server 2014 SP2 CU15 - 12.0.5605.1 - x86 (KB4469137) +``` powershell +# SQL Server 2014 SP2 CU15 - 12.0.5605.1 - x86 (KB4469137) +$outputFolder = 'c:\sqlsyms\12.0.5605.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/b80aa4d26d824d51a1b2821b3bd3c9df1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a167e470217c45f8990402872693763c1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/8624d05eb3114058bb16484bb5b270f41/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/fbacb139597e46f5b710e865a66de6401/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/5de0309257254890b30958eddac74d692/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/7c97495f85d545ec97e160ec95e08a051/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8a2c37cc83db491095f9452840c70a5e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0ed0bd2de748480cae7a6fb8c9c720eb1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5605.01 ((SQL14_SP2_QFE-CU).181130-0132) +``` + +# SQL Server 2014 SP2 CU14 - 12.0.5600.1 - x64 (KB4459860) +``` powershell +# SQL Server 2014 SP2 CU14 - 12.0.5600.1 - x64 (KB4459860) +$outputFolder = 'c:\sqlsyms\12.0.5600.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/2438e40ce685447eac9e01d2173b146d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/93a50030edc54ab2805e7324b5c5867e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b0b41b9743964fe2874cf90433ef7c9a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/5e129aa1bde341ef9cd43882060582eb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/250c631ea1f249fdabc901273e8f7c452/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/e6f37c85e8004bfc8c74ccba69e5ce642/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/73600a8dc74945059ccf2d99ca8a377b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c357ccbf716b47e29b48073179a6a2a81/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f925b1c9695d4dd28360ceb7e2976a581/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8ae4a300b56c475095d8ec409dbc31221/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1b685a50036e4af388ff9f1fab8a795f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +``` + +# SQL Server 2014 SP2 CU14 - 12.0.5600.1 - x86 (KB4459860) +``` powershell +# SQL Server 2014 SP2 CU14 - 12.0.5600.1 - x86 (KB4459860) +$outputFolder = 'c:\sqlsyms\12.0.5600.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/c6575e4e12d94e4ba30764806d0577061/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/61c9b48dd8af443780ba4556f948816d1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/88e4973a9b8548909a0ab9b691936ed31/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/62a1d5b32fc9473daeb6a9e21b76bf101/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ceebbde0de164cf985ce91e4e28d96862/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5963ceed5f9b435d853a2c11315f11521/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5cc038bc384c45578d1485fb3370f81c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/441a2d9da7a2414f999efcac59e8da3d1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5600.01 ((SQL14_SP2_QFE-CU).180927-2111) +``` + +# SQL Server 2014 SP2 CU13 - 12.0.5590.1 - x64 (KB4456287) +``` powershell +# SQL Server 2014 SP2 CU13 - 12.0.5590.1 - x64 (KB4456287) +$outputFolder = 'c:\sqlsyms\12.0.5590.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/f22828ad8cd143b98690f3d5308405a72/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/38f99ac2329e4ee1a630dd928660bf8c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/26704fbb534d46b49653205984de35ca2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b9bbf018d2d24d3088f300f40de6569f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7760942524a04b989b969dc6db24bba12/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/4d0c5e89bcee412c9100b8d694214c402/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/17b16aabe9944c3a83febffb78cbd6811/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c9216aed6e7645d39c0825a977c5a6f31/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/9d9eadc9e8f8484eb83eb557687c059f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3d021aaa04a8473abb5965725950c4ab1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/407d631b6e454fd0b0c041c33c345fd22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +``` + +# SQL Server 2014 SP2 CU13 - 12.0.5590.1 - x86 (KB4456287) +``` powershell +# SQL Server 2014 SP2 CU13 - 12.0.5590.1 - x86 (KB4456287) +$outputFolder = 'c:\sqlsyms\12.0.5590.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/33e588094276460b8038432fad3db2661/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/629dce7389c24992a825468bd5191eae1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5b493a35686047f1ba71f7ce7b3a90751/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/f7a83574ae43421b8468a07d493246ef1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f158728bc8404e1aa43fe38433e4e6f82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1f241b8adf9748bca47525e287ae42451/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/bc679557623041a48db99e6ab3c27f691/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f6f9e9d0148d47d7ad3abfc75f8bb31b1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5590.01 ((SQL14_SP2_QFE-CU).180801-0048) +``` + +# SQL Server 2014 SP2 CU12 - 12.0.5589.7 - x64 (KB4130489) +``` powershell +# SQL Server 2014 SP2 CU12 - 12.0.5589.7 - x64 (KB4130489) +$outputFolder = 'c:\sqlsyms\12.0.5589.7\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9cf25aee69fe4936b6d5dbc0a2864e562/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/56bc64bb80724cbe9e73e3baf373ac5e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bfd1994080f84d2b832dc738a74466d62/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c4b5a5ca9822464386d76070dc0b16c52/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/69363948fbbe4b37a1942a397c28ac9a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/7d1172991d104f70985859b8f5c1ca122/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/2ba38b2b5dc84ea29ba150f79b52c9b31/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f7947a9995b34b38bffe3a086f9ed3341/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d97a5e01a698460d9641e2017990f2ba1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/bf808d6229bd4fe69562c672359a61b81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5abf57238fc44199bc9b494c7391a94a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +``` + +# SQL Server 2014 SP2 CU12 - 12.0.5589.7 - x86 (KB4130489) +``` powershell +# SQL Server 2014 SP2 CU12 - 12.0.5589.7 - x86 (KB4130489) +$outputFolder = 'c:\sqlsyms\12.0.5589.7\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a17e4ed617604e1f93cb7043a7b061af1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f1d22c428ec941b3ab6cf84b970013d21/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3df9de6f254540598dd9da4852d8797d1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/8a70299c32844f529bf7af758400e1a61/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c8053d2959e24d70bc2820ef3d183c4a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a2e7016632da4d79a7ffc36ec94956c21/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0dd5355ca33a4d49a27401e7bed2e4241/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bb53084f1e9c448db50e72d30284890d1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5589.07 ((SQL14_SP2_QFE-CU).180609-1032) +``` + +# SQL Server 2014 SP2 CU11 - 12.0.5579.0 - x64 (KB4077063) +``` powershell +# SQL Server 2014 SP2 CU11 - 12.0.5579.0 - x64 (KB4077063) +$outputFolder = 'c:\sqlsyms\12.0.5579.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0aea57c255f340f6b268422d36c9b5462/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8f7a73cfc7ae40b69cedfb56c478c8a42/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6f3a59d764d34c1c9506c1cbb799ce282/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/5e23ac5ca0a441cea1043b92cc7db19d2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/90418b6bc2dd41469db8c20a64cd6b082/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/4355cf52f7e54f1abd0d6545276e31242/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6eacc2b3b2b54beba5e1e47ccf312c691/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/43312b84f24d461582340aa0d3706e0f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f88d3bc891cf4a66a06ab20db6a2f4111/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1a52dc5348f24ec98371fc0191786fa31/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f9963e6eb1a34e019caf757ff0bdf2762/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +``` + +# SQL Server 2014 SP2 CU11 - 12.0.5579.0 - x86 (KB4077063) +``` powershell +# SQL Server 2014 SP2 CU11 - 12.0.5579.0 - x86 (KB4077063) +$outputFolder = 'c:\sqlsyms\12.0.5579.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/2a38a3f0f77b410b8ab96959ec07f43f1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ad85bbc382b94bc4b6d28c94bea7b09f1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2c9ba43db9924d71be6599ef2ddfb6fa1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/8b5208e65b4d420884a73dca82dfb5c61/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/fd4511ab526d47b7ae5f18fa15dcb2ee2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ace3687338a64ee99b1ddad95e5b5a611/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ae50d44983714260bc12cb539b3ae6481/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6524dc9692f44f0a954ebc34fba6566e1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5579.00 ((SQL14_SP2_QFE-CU).180221-1111) +``` + +# SQL Server 2014 SP2 CU10 - 12.0.5571.0 - x64 (KB4052725) +``` powershell +# SQL Server 2014 SP2 CU10 - 12.0.5571.0 - x64 (KB4052725) +$outputFolder = 'c:\sqlsyms\12.0.5571.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/1f838ce4d2314a679d95f581ba5cfca72/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/eb5287194386470bb6ed9be5cfa913032/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/187bfc99dd6142ed912b9b0a16971ba92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4a0d1ac8b530440581e5ee96278215352/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/2a491b79a3534daaba1fdaee3ef28d412/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/88fe4b4b23a64afd804553959161691a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1dd40e165b074b0784aa0fa5c7225ce11/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/42629264c38e41829734aca5e2c32b851/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/9ff125ff36e841719e28e54c59d81e8a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/195069bf1697410789e1c320dcff547e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4ea18a049c454b7fab49fa3af4d747652/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +``` + +# SQL Server 2014 SP2 CU10 - 12.0.5571.0 - x86 (KB4052725) +``` powershell +# SQL Server 2014 SP2 CU10 - 12.0.5571.0 - x86 (KB4052725) +$outputFolder = 'c:\sqlsyms\12.0.5571.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/7388785bb378492eae7399ead30a62bd1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9ae111fc7f1b45789253f4d3910106c81/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/655a1096c0074f94b7ffbbf9b233ea5a1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/cf11f8ed6ff04de7b823930a8451701b1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/273a0ff6e91b4a8da2bee5298a5dd61f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/fa6377a396864fb2918b6a596d4beb711/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/464ae4327e2f4dc3b17e8f3a771ff18c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/7cb655624af24ccc85f4389fb0c901241/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5571.00 ((SQL14_SP2_QFE-CU).180110-1458) +``` + +# SQL Server 2014 SP2 CU9 - 12.0.5563.0 - x64 (KB4055557) +``` powershell +# SQL Server 2014 SP2 CU9 - 12.0.5563.0 - x64 (KB4055557) +$outputFolder = 'c:\sqlsyms\12.0.5563.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/b9c9830b1bcc4092bd2bb4f51bf81cf52/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/7032c53e91934abdbf6bad9fac99066c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bbfb8d689ab34f56b443d662c7b9336e2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/1143c59b5fee4cb9a86a2fa2978285562/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a5dfb5b4a0c041539cd6312fd52d8b2c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/d0d7ae41d21e404694ddef3b58b555102/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/03fd2ef25c1540819c499476aa797f5a1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ffa799b2d4d2478186b883fe71edf34e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a56ee479b9024d47bde320de941d1ad81/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0917fd5803fe42e9b8fcdbac6b428edb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d194fc1a9c914898b99235221a474a522/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +``` + +# SQL Server 2014 SP2 CU9 - 12.0.5563.0 - x86 (KB4055557) +``` powershell +# SQL Server 2014 SP2 CU9 - 12.0.5563.0 - x86 (KB4055557) +$outputFolder = 'c:\sqlsyms\12.0.5563.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/06301e600c9448b49312e41cc75d51401/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/3d79c403b6534fa3a1850e0f8e5cb71b1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/13d944a09a6b4075bec01634bb3c5ba61/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/57fbfa47c5064fdfbaa81ce84725cfd91/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/fe70fe593a974da09e5170edc376b0622/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/cbecde3234164a3c871dd3a45649152b1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/06186cc6b2eb40dab968c484987b96c41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3fa4e4db8ea34b0a86118d3b83e1a1721/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5563.00 ((SQL14_SP2_QFE-CU).171207-0002) +``` + +# SQL Server 2014 SP2 CU8 - 12.0.5557.0 - x64 (KB4037356) +``` powershell +# SQL Server 2014 SP2 CU8 - 12.0.5557.0 - x64 (KB4037356) +$outputFolder = 'c:\sqlsyms\12.0.5557.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/e7152ca5bb5641cabadc516f5de4448e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/976df45212de41739cfb5401b5395f032/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d5029367d82748b08723648d64ea340c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/1095950d7a964eca94e27667eec14dd22/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/0b310c825aca4a7abef7b902667467e62/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/96dbb1b774234407bbfaa17da1e2538a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6aa802a2e06f497b86358cfbef459f031/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2d7ae65a5e784e3e9c8e06a697a64b6b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f23892f30b094ded9d4b88ca2aab338b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e7dfaaf012694a6db4eae23dc3b319e31/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0d6e87edec3d4a5bb55a6f86db91f3112/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +``` + +# SQL Server 2014 SP2 CU8 - 12.0.5557.0 - x86 (KB4037356) +``` powershell +# SQL Server 2014 SP2 CU8 - 12.0.5557.0 - x86 (KB4037356) +$outputFolder = 'c:\sqlsyms\12.0.5557.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1c82caaaa09e48eba283def9ee6a77041/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/981f442e7b8a4ff4b016c222f897ec1e1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bd794c7b740e447cbff73748980a6f1b1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/383f44422d364daab6360a0dbd8961481/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7e546ae16c48449396f2a6c30dc8d35b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/4daecbd75bfd4b6f9af8fce5ec09aa9d1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9fa6bf9d3fb54bb98a5f0124bfb3e14e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d04a9e96c37045e98b5c7b3b8b81096d1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5557.00 ((SQL14_SP2_QFE-CU).171003-1352) +``` + +# SQL Server 2014 SP2 CU5 - 12.0.5546.0 - x64 (KB4013098) +``` powershell +# SQL Server 2014 SP2 CU5 - 12.0.5546.0 - x64 (KB4013098) +$outputFolder = 'c:\sqlsyms\12.0.5546.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/50741efef953472e93c9c4449641b7b12/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/eba63b27a035483d8aa8328a1ae4e5032/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5cf0fb086a51465eae2224c47d6929a12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e261efec946a49d8bd60ad2d2d0d4f412/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4e1c24324a24404db55cab70549295842/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b4f8f667b3d14a67b4d6603088e655742/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/236b638fded8473898894137c7838d5c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/7ac0b64a624249d9b29869bc24c71bb91/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/dab7c2d4a1d74357a7e35e4823c201241/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6ba2f0c99aac4edfb5f1154130a28aff1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d4afa77c6b874237bef59d288e3502712/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +``` + +# SQL Server 2014 SP2 CU5 - 12.0.5546.0 - x86 (KB4013098) +``` powershell +# SQL Server 2014 SP2 CU5 - 12.0.5546.0 - x86 (KB4013098) +$outputFolder = 'c:\sqlsyms\12.0.5546.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/7cc57429e0ec49fbbb5a7e0bde3ed2f51/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0b763c98cd3540cc87fbae90dd4d293e1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/faebc6f4ea6f4aa9b51dd320a99cdf6a1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/df2f1f29a7ee42209c3d1083a539cdab1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4e548597f1554021a96df9a125e321c12/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1c1ab29dd2684425be41d15d14f82eda1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/52aa8ba5e2dc47a3b05441a95feaaad41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/41250386e94f4b749067a8bdf653fad31/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5546.00 ((SQL14_SP2_QFE-CU).170403-1355) +``` + +# SQL Server 2014 SP2 CU4 - 12.0.5540.0 - x64 (KB4010394) +``` powershell +# SQL Server 2014 SP2 CU4 - 12.0.5540.0 - x64 (KB4010394) +$outputFolder = 'c:\sqlsyms\12.0.5540.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/327f327fa575417cafb328a77700579b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b33973d4b2b84e898cf5fdbcc0cbfdda2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7c3b4d37cd874b8b9046197faa764b8a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/5c620c62165d4d6c929c48fbf285ecee2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/573e711ad5ff4306afcf4ead17f3ccd32/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/134dec74500e4623ac8395fd0f7b39002/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/efafa5fc3ed741138011d67be2e0956e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/322ab5e1bdb44d00b01fadf709cedb591/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2e34b42cd60244c18d4d932740df1fba1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5fa1d5a4f5184d8a96340d50ca49b8f91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/15a01dcd6514423dabf05a79ddbc260c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +``` + +# SQL Server 2014 SP2 CU4 - 12.0.5540.0 - x86 (KB4010394) +``` powershell +# SQL Server 2014 SP2 CU4 - 12.0.5540.0 - x86 (KB4010394) +$outputFolder = 'c:\sqlsyms\12.0.5540.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3b24410a96fc4557937d8680025104781/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/de2cbe9a066b4ca683edb111b07e98fe1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/65d8e8258a7d425b919ff886fef2a46e1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a55b0dba79c145579d868184299943121/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a45a2e2de940478cb4da26c83ed480c02/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/91505e4ffbab42b0bb9fce392119d2a31/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/51b204af39e4418e8e436b505def119d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c8cdb62c1d024e1ebcd1167ea4e408fd1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5540.00 ((SQL14_SP2_QFE-CU).170126-2112) +``` + +# SQL Server 2014 SP2 CU3 - 12.0.5538.0 - x64 (KB3204388) +``` powershell +# SQL Server 2014 SP2 CU3 - 12.0.5538.0 - x64 (KB3204388) +$outputFolder = 'c:\sqlsyms\12.0.5538.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/3b2ec8a276c44fdc906942cd4a1f69182/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a2983d6c8beb482197eea282afd09f502/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f15dfc2d86f545358f47d7963137b3772/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/51c7e960bc594a57948755163fc43a492/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d11bb61c53bf4b68a2c3ba2527bd73bc2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/bd27195567bb4bf8a03bb27ceec1b7432/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e48b584befcc4a70adb8046bcf451a2e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b580840b77684d8a8f6eda6fc85965451/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/94c127c2d37e4e489484c51a03884ac11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7ccaba5c7002409fa220d36307fc2b8b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8e5ff8ec981943338edc6cd886bd8fb82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +``` + +# SQL Server 2014 SP2 CU3 - 12.0.5538.0 - x86 (KB3204388) +``` powershell +# SQL Server 2014 SP2 CU3 - 12.0.5538.0 - x86 (KB3204388) +$outputFolder = 'c:\sqlsyms\12.0.5538.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/baa30c554cb44fa09d0bdfbed39e5a791/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/3dd488b8d441453dbd8745f0a544e7a61/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/47108c8b37424ae8851820cfe82c9e121/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b8d1890d88e746a998e86b2f3c74364c1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/848570152cb8402aa9d6fada8beb0c202/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/dde9b5fc95434bcdaf74b851a180a39a1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f57e00c99b1542da9050e3c79e4fc0751/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ad0a17bd74a343c68885438c5a1667261/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5538.00 ((SQL14_SP2_QFE-CU).161215-1705) +``` + +# SQL Server 2014 SP2 CU2 - 12.0.5522.0 - x64 (KB3188778) +``` powershell +# SQL Server 2014 SP2 CU2 - 12.0.5522.0 - x64 (KB3188778) +$outputFolder = 'c:\sqlsyms\12.0.5522.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/85619806cd0c4d7f80b7d9c39ec0c55d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b7c764dde62d4501ad899b44155266f42/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/42c45987637146d9b0b6a18b3c16b4ed2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/a0718d2fb2484e6a9690d00a513a7ec22/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/925f17833290448e8a4a1981956919f72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f8b1d43023e94a69ad0ebdbdef8184262/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/cec32d3f65ae45e8a01456021c1965331/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/e5b418e31d1e4c7288dce466806e4a651/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e0a453b334904529a2b117ea1654e0071/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/46ca775ce2b347cf9a0497239589b9891/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/944350d206c94698a2d2836213aa3cd42/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +``` + +# SQL Server 2014 SP2 CU2 - 12.0.5522.0 - x86 (KB3188778) +``` powershell +# SQL Server 2014 SP2 CU2 - 12.0.5522.0 - x86 (KB3188778) +$outputFolder = 'c:\sqlsyms\12.0.5522.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/84f5af3698d149afa148b2a0cd3f4f581/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/213e8207dbe444d0909729961a287bd11/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/4bc737f7ee4c42ddabdc2dbd286531231/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b288a2b59dc74ac7b41ab91de6c4fc761/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ffa4bbede27e459680aa2c3492dc76de2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/cff1f891748b4e46975bff972020c88d1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/68063a6d27944efc9b396708c391443a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/50ee2c4f4dba45cbabed0418e30529771/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5522.00 ((SQL14_PCU_main).160921-2323) +``` + +# SQL Server 2014 SP2 CU1 - 12.0.5511.0 - x64 (KB3178925) +``` powershell +# SQL Server 2014 SP2 CU1 - 12.0.5511.0 - x64 (KB3178925) +$outputFolder = 'c:\sqlsyms\12.0.5511.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/955297012f084a879c084982baeb90802/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6c97245a05ce4bb99d73b38531d5c1fd2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/115b0bf758864697975c5a790169856e2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/512c482f3fb045bda66e04e34964fb3a2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f769c28a891e437a9c794fc1ec7472752/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f143a40c5a8440bf8478537feeee5d642/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b17b7a8868cb42579bae8551a8c7e0591/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/e2182fd204d84ab99011cccd1949e9c11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/27105a4614ac45c2ae4efbf8702e3afc1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/40b6d2eebb0d495ca7712c349427f5de1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5f5f15692fa448e79427eb55f742b9512/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +``` + +# SQL Server 2014 SP2 CU1 - 12.0.5511.0 - x86 (KB3178925) +``` powershell +# SQL Server 2014 SP2 CU1 - 12.0.5511.0 - x86 (KB3178925) +$outputFolder = 'c:\sqlsyms\12.0.5511.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/7cfba95f3823488aac2461a3e97e896f1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/da9e2bc4951043bd81090ae40dede7a11/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/aeff84391a5b452fbfcde0f4a892c5a11/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/5939ac9c2ded4145bcf7770744fd2bce1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/29a54a98b892439391394e42b0b5db512/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ed2df1c1d06e4545bdf23aaaaf209acc1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e1cccd08ad4847b7b40a5d54d95e458e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8ca704ad75a147c083468e8128a8d1c71/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5511.00 ((SQL14_PCU_main).160819-1335) +``` + +# SQL Server 2014 SP2 SP2 - 12.0.5000.0 - x64 (KB3171021) +``` powershell +# SQL Server 2014 SP2 SP2 - 12.0.5000.0 - x64 (KB3171021) +$outputFolder = 'c:\sqlsyms\12.0.5000.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9b03bed67fb8409cb0790cc7b223dad92/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d06bb22769e2403894634bf47dced50d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/4505a8d6fda14645ba80e4c411ed63512/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/421f256c2b694c9f997cc27b691db8e82/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/581e38dca5b2499ea574ffc0173d6bb12/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ca529b22f161423c9266aa03928136612/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/16d952f37ecc4c839f06fc3f0a8e858b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/49e9ae321a004d859a4844a1881682fd1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e2bbf32382d24e16a4567c49dffedc1a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/bdcaa196c0824ba38ddec076b5fd89521/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/cc3cd23e34174332ae8778d4e4b7991f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +``` + +# SQL Server 2014 SP2 SP2 - 12.0.5000.0 - x86 (KB3171021) +``` powershell +# SQL Server 2014 SP2 SP2 - 12.0.5000.0 - x86 (KB3171021) +$outputFolder = 'c:\sqlsyms\12.0.5000.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3520a09c560647b0be4af33b838bb70f1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d0a102b60e2d4138a7435f98d7305ed21/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/739a59d06bce47de8b1bf3d77899ba601/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/34d38d0ff9ad490cb7c02c96ee741a651/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/16e45d5242524db7a022a600e0a58bd12/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/3105a463134247deb442c42904dd6af61/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f54482c3160047a0bffd5ee829fc930c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4ef9cb8fd3c141bcb4f1af7c26cbf7571/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.5000.00 ((SQL14_PCU_main).160617-1804) +``` + +# SQL Server 2014 SP1 CU12 - 12.0.4511.0 - x64 (KB4017793) +``` powershell +# SQL Server 2014 SP1 CU12 - 12.0.4511.0 - x64 (KB4017793) +$outputFolder = 'c:\sqlsyms\12.0.4511.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/5194020c2bb54e35b975fb4b822687822/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c3e92c0187324b64902b44eb0d2e42ed2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/828309d8e65a4661bef26612e6c66da12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d17b6b1b84b74212b072a8b5bdd573b92/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/15ed0973c9214f76b84dce1924c47f2c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5347b58cfec447408dea4ef359a7fee82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/63966ccc66c6484197a1c5472f9ffba61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/15bee1647bc8463e9222aae1c310334a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b8e0b1f00b4c47c3817d8d3211bd97eb1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7f74ffbfb5634301908b7c0a815e1e811/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c0bb53c9d4624637846157dcba6945322/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +``` + +# SQL Server 2014 SP1 CU12 - 12.0.4511.0 - x86 (KB4017793) +``` powershell +# SQL Server 2014 SP1 CU12 - 12.0.4511.0 - x86 (KB4017793) +$outputFolder = 'c:\sqlsyms\12.0.4511.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1716ba550f704b47be04801c46ddd2271/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b07fe01e0c1d4fafadf3b3ae1198b23c1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5b2e3ff1f9ea426bb60c065573ba35851/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/06525a5e3eb34b839bfc1af702354c0f1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/5b0356ce9df44d3ebc3aaf4752c4dbc42/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/cfe4d232673d4feca1536f22af5d7da01/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1638c8bafaa4484f8115dc810f65688c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0cb40d6a5aee4627a803997293d2bc9f1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4511.00 ((SQL14_SP1_QFE-CU).170330-2026) +``` + +# SQL Server 2014 SP1 CU11 - 12.0.4502.0 - x64 (KB4010392) +``` powershell +# SQL Server 2014 SP1 CU11 - 12.0.4502.0 - x64 (KB4010392) +$outputFolder = 'c:\sqlsyms\12.0.4502.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/6511e1af7762429a824f8d9413f8185b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0855528f0c094a8d9ddaa082dc6273892/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2d502c894cf145449e35bb27b9e723632/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4e718d4e6aaa4267a812e7a96d96e4192/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e3bc90eb56494cef8d0bb1c27630e7e82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/79e86271788b4ad8a73585aca0712a572/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/74b685c445be4b0abc1e40a39b1ce15e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fdad2621c0fd4be18f295ef7666f71541/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/fead2b11478e4f16957015b1c716dbf51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2fef4d7e355741078263ba0359236cb51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/baa3f42ceb4441f0a0362400473a45a32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +``` + +# SQL Server 2014 SP1 CU11 - 12.0.4502.0 - x86 (KB4010392) +``` powershell +# SQL Server 2014 SP1 CU11 - 12.0.4502.0 - x86 (KB4010392) +$outputFolder = 'c:\sqlsyms\12.0.4502.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/05c3adbed7b94c678abd5818fb1df1981/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4e38ef962bd44249a4374f46e4918e491/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1f790bbb27d94e7d8f76905be4ea8a8a1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/118dcefd951242c2b376ce23b8ca149d1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/16bba5c457c24f71816590513599284d2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1c2171f6e4c942a78d884a965ca2c2311/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b2e5cdea0e254b88aec4f52ff7d81bce1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/22ff6b3197a54e6d8e424fb153ee85291/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4502.00 ((SQL14_SP1_QFE-CU).170126-2035) +``` + +# SQL Server 2014 SP1 CU10 - 12.0.4491.0 - x64 (KB3204399) +``` powershell +# SQL Server 2014 SP1 CU10 - 12.0.4491.0 - x64 (KB3204399) +$outputFolder = 'c:\sqlsyms\12.0.4491.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9d45c0ca9ff84210bd26d27a1db957b32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/fed498da893e422cac5e804b2b7a4c242/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2ad37367352148f6979dfdc99264bead2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9d0d6af6a3844491ba66db3b3a0e41992/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cdb4ecf4e5554b98963cfc8713f18def2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f524bcc24a0a4a09aeac95cdd7ff44cc2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/018fb92048554db0b8ce8d938f36c1af1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6f4088e11c2141038659ad6f5d75d67e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ef95d5619182441cba33ee5fcc0db2a11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e6bbf5f834c248888873d9a1a9644be91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ed041be3c310451d8c409219c552e7f32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +``` + +# SQL Server 2014 SP1 CU10 - 12.0.4491.0 - x86 (KB3204399) +``` powershell +# SQL Server 2014 SP1 CU10 - 12.0.4491.0 - x86 (KB3204399) +$outputFolder = 'c:\sqlsyms\12.0.4491.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/d2366262dd7941978da45d5e683f7c101/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d800a487ae16476aad1a1d3a6000b3d81/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/47e138b038f94533b40e4cda75009dd11/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/ea65c57da53241919f6b2c099baddf6b1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/300035b8a93d4361bb955f88c14a9ec02/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5d479ce08c8f4a3189fc00cb7d96396f1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8b12d29053264fc798fb8b7312f457a61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/40548e898f644819908b614970e763f51/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4491.00 ((SQL14_SP1_QFE-CU).161209-1421) +``` + +# SQL Server 2014 SP1 CU9 - 12.0.4474.0 - x64 (KB3186964) +``` powershell +# SQL Server 2014 SP1 CU9 - 12.0.4474.0 - x64 (KB3186964) +$outputFolder = 'c:\sqlsyms\12.0.4474.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ed3eb06f842543d287a3f4b7976a290e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f68fd847991e45efb467567f043365c92/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f39da543554a46fa9f66356d10ae25ba2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4e632d1dba694b07b1420d42203131fb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e6b6452458da4bfb90b095db670835ba2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/459d7854b8b442f7a7d16164e13d223e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/dbbebce79710422da003b9b362db90471/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/039cb07174774ae984a6c127254d699b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/cd5d4f223a81432b9a94c70f090bdbfa1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/587aafcade5c4befb8a21f74a0472f991/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/40263aec90934578b565fd5738ab0fe82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +``` + +# SQL Server 2014 SP1 CU9 - 12.0.4474.0 - x86 (KB3186964) +``` powershell +# SQL Server 2014 SP1 CU9 - 12.0.4474.0 - x86 (KB3186964) +$outputFolder = 'c:\sqlsyms\12.0.4474.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a2983e7c5b434d9fbc6828950649cd531/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/814705e58f2a452282645ab653b330771/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d29ed6114bab459499a99eb2aa5c9d901/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/5577ca7998974f91a2830c9130544b4b1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f5a4f8db221443c88c6c01c2097d5f012/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8addcf093cf549e5b363e7bc4c1ff3d21/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7ab2c10294bc42ba84947f929ef553501/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9256f9eed09947189e79d8d088a780771/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4474.00 ((SQL14_SP1_QFE-CU).160921-2215) +``` + +# SQL Server 2014 SP1 CU8 - 12.0.4468.0 - x64 (KB3174038) +``` powershell +# SQL Server 2014 SP1 CU8 - 12.0.4468.0 - x64 (KB3174038) +$outputFolder = 'c:\sqlsyms\12.0.4468.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/3d92fd2a73794d07b455ae4e5889a5132/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b3729fa94bef405fb2cb87260238c9f42/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5ce178c1c5d64b0c87dfe545697274d42/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3cad76e8bd284c3d843ddf72eebdeb6f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/690748ff94a84fe2a84415950be20d8b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c96238046bc24361b06e16837730d61a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/2a89258be7de4ce9b48dbb73a55d324d1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/95e6fa8b9aee433684c70867ff60a4e61/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/0c553a702c974f208644a405b541f85c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/db5a292a8769461583541a15ebe202611/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/13c47c3e18bb421fa3249689a54a71102/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +``` + +# SQL Server 2014 SP1 CU8 - 12.0.4468.0 - x86 (KB3174038) +``` powershell +# SQL Server 2014 SP1 CU8 - 12.0.4468.0 - x86 (KB3174038) +$outputFolder = 'c:\sqlsyms\12.0.4468.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/65f204610ef64b91a0fd8794150b94291/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1a01ea9849824b6c9d89022a9165081d1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/acfc80b3b2b14e0e8c44bb5638a59e011/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a1112b3c01de49d3bf7df61d9421bb671/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d3657353614f4ee8adb22730dcb9dd0f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/633bdb5f043c4d5eb8ab475398f1d6b31/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8142bc3f8c344dd2a3f6a5f9b8accbc91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d5882b2e79e648a880c48dbf9aa04b751/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4468.00 ((SQL14_SP1_QFE-CU).160807-1306) +``` + +# SQL Server 2014 SP1 CU7 - 12.0.4459.0 - x64 (KB3162659) +``` powershell +# SQL Server 2014 SP1 CU7 - 12.0.4459.0 - x64 (KB3162659) +$outputFolder = 'c:\sqlsyms\12.0.4459.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/9e6af119e0f34e8284af02aeb6c2aed32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2be68cda7aca40769bedc7911c47199e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/51a3a33ea06c4b6fa7ba5f3a872f475b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e90c807a4c35455a820c37c0d50b4b232/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/b61b9c7dcab24b45922994aca824ef672/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/619dd10c6677476c9b9d849815196fa32/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/433c6e1e9a8945498db235a0b52cde5e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fa3d2944dc8846d3bcc61c2e7ee065281/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/58c10d6cf94142c985df4771e46cb2371/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a27d505e013f4048877030aa5e518ea51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f27d6b48d60d41b685ab306cdd9a51ac2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +``` + +# SQL Server 2014 SP1 CU7 - 12.0.4459.0 - x86 (KB3162659) +``` powershell +# SQL Server 2014 SP1 CU7 - 12.0.4459.0 - x86 (KB3162659) +$outputFolder = 'c:\sqlsyms\12.0.4459.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/6fff44d1682f4a9495ec0d87165558441/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/92d19dff78a545049ba60ecbb778e1b81/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ad454e7f63754f3f8ea5182420e1a95c1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/9228212f994f44d5b53f3ab7dd3356cc1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/8578316b4f5d4354a53ec2cfd55481022/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/bd487adc6b904a848c1231663606b3f31/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1832bee682d6478cadcc049a8e7f667c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/274a8b7eca104af493f554023e54b1511/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4459.00 ((SQL14_SP1_QFE-CU).160527-1445) +``` + +# SQL Server 2014 SP1 CU6 - 12.0.4457.0 - x64 (KB3167392) +``` powershell +# SQL Server 2014 SP1 CU6 - 12.0.4457.0 - x64 (KB3167392) +$outputFolder = 'c:\sqlsyms\12.0.4457.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0d205c1fa08b4e30be8d57b0b66f7aad2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ca933e39df4a4a06877ec27e0ca8635c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/73bb9ef1b6d444949ec88857e9ad1a282/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8405542cc1254c03a666cb742da51ea72/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/95315aebcf874ef0bb34618350d666432/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c6bebcd7804e461f9efd30cabf8e8f8a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/79d2d1bdc00b4d4eba2870d71a3dd2d61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a8ccc254a9e6493295a6bca4bfaa61401/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/fae429df4a7f4b2fb2654331aed0ac171/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b950a8b8c82d4963b5c9dd17c8d278d41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f44520516b3d4f4eba97077627392c722/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +``` + +# SQL Server 2014 SP1 CU6 - 12.0.4457.0 - x86 (KB3167392) +``` powershell +# SQL Server 2014 SP1 CU6 - 12.0.4457.0 - x86 (KB3167392) +$outputFolder = 'c:\sqlsyms\12.0.4457.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/e20a40c355fc4e44a73ebc5e6f9aedff1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/46bbfbc5d91f42e49d4787fdb099ac611/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/4fc6d961f7114c9b99d7a889580a49451/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/205de64132184b59aae89e227e12d54d1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/10f36fe6efa44624bd46211d0d8cb4202/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/349d89ce6e074117afa7cf153ccc510c1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b0785ae48497462bac6fd725dfb8517f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/71d4f69079d846b192583ae1293d14c91/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4457.00 ((SQL14_SP_QFE-OD).160526-2301) +``` + +# SQL Server 2014 SP1 CU6 (Deprecated) - 12.0.4449.0 - x64 (KB3144524) +``` powershell +# SQL Server 2014 SP1 CU6 (Deprecated) - 12.0.4449.0 - x64 (KB3144524) +$outputFolder = 'c:\sqlsyms\12.0.4449.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/541dc558cad74e0694256b9a79761f922/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8a5052b8ff7345599f6f242cf4f3e09f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/8a62d7af769a4f2c864d2b808ab81dfe2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/251fdfd9e8454621b19032d327a2fbbf2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/6cf73332314548c29f5d02b19d98963b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/55742e7e85204da4818d8a730a2f70852/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1a20c516b71c4ee9a74d40cd5b3597631/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/db864229a8b14fce99322d74a808b8d61/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/db0d700ed8dd45349808c9c8078f7c1d1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/42213ff00a944645a6752810210b9c4f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bba4a2d05f6b4a7da8cb248ae45a322a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +``` + +# SQL Server 2014 SP1 CU6 (Deprecated) - 12.0.4449.0 - x86 (KB3144524) +``` powershell +# SQL Server 2014 SP1 CU6 (Deprecated) - 12.0.4449.0 - x86 (KB3144524) +$outputFolder = 'c:\sqlsyms\12.0.4449.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/ff6fa640813246d6b61408f766f2ba301/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/79a658164e2e44e482bca7933ae40daf1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9871f564b21d489591a9d62997125cfe1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b12da1e6770a4cb7819bae2c4d8ab0fb1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/326123b149634674bdb729d1f67111da2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/dc4d9c2424574034b47f8c3f62d96cee1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/011a3a3c5ee64a52bbfbb132c3c067011/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5867019c5089413eb07654da21ad9eb21/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4449.00 ((SQL14_SP1_QFE-CU).160413-1153) +``` + +# SQL Server 2014 SP1 CU5 - 12.0.4439.1 - x64 (KB3130926) +``` powershell +# SQL Server 2014 SP1 CU5 - 12.0.4439.1 - x64 (KB3130926) +$outputFolder = 'c:\sqlsyms\12.0.4439.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8c05af1cd714431692715e7c894227922/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9d7930b2b40d4a76882ff6e932d114ea2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3620205f1aa146fc8fb261528826e9252/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/a4841e65bbea49e8b8fb034d059b1f3a2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/51bd4d350e134a0788e8e5082f7b5df22/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/040e2fe727c3407584cf8ec849b8ec752/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ee405fe12c294db58642f2aaab531b541/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/19c41b55d37f49c9a1ae06318c57e8d11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b4b47d122cc049cbb8f6781a308dda711/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a1181e9122f6449b8283138dbe7117171/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/748dfbd824714b7784555b943be771552/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +``` + +# SQL Server 2014 SP1 CU5 - 12.0.4439.1 - x86 (KB3130926) +``` powershell +# SQL Server 2014 SP1 CU5 - 12.0.4439.1 - x86 (KB3130926) +$outputFolder = 'c:\sqlsyms\12.0.4439.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/98b4120a06c3471f972576543f15ac971/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dd78d54baaeb4fcfa8ec3adac01727ee1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0e9fc78f89ab4d5297fc3ade50fa39f51/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/71a0972911d64d6d89202a102f4e36331/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e8f53d675d904f2ab71e74b2619f6f612/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/0ccdcf5f1baa43bb8fe10be379928bc21/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b4cea174690147acad1b103353feaad01/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/da27c83c09ec4ebfb0df22b5746adc711/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4439.01 ((SQL14_SP1_QFE-CU).160215-1104) +``` + +# SQL Server 2014 SP1 CU4 - 12.0.4436.0 - x64 (KB3106660) +``` powershell +# SQL Server 2014 SP1 CU4 - 12.0.4436.0 - x64 (KB3106660) +$outputFolder = 'c:\sqlsyms\12.0.4436.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/362a8410d21b4d39ac0e7a02cc9c2c372/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/681476d84d7d40f186d3ea82a2661c672/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a31f385046b54b9cbaf08c4df972c6782/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8a3fe11c189b4435bcbe953f4841d99f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/8f68c8d3545c49e8b83079bc84c6e2842/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f08834e6067d4b98acb3b60090b4ba292/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1d1d583c3f204024a1c6247dfce1af251/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/bf369e60da5943c5ac4ecd1c83e9c1491/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6fe2ce101a564db2a580f3f85176f0681/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e1afd1f24c8a44f1a734bd1c4a10eaf51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5aa7af725caf4fe38f52515b787d4c4d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +``` + +# SQL Server 2014 SP1 CU4 - 12.0.4436.0 - x86 (KB3106660) +``` powershell +# SQL Server 2014 SP1 CU4 - 12.0.4436.0 - x86 (KB3106660) +$outputFolder = 'c:\sqlsyms\12.0.4436.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/e3278cf94d974d73a099dd3541f1430b1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/65cc2740001e4389a652c81d662ff4a31/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1215ee0470bf46c1bcd1ddfa35951f911/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/737570a73e254326826ad1c811c340671/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/50cf83342da94fbeaee4f79bd16973ab2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/df2f947c30e4454b9e568b53ca4dd8c51/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3e240bb821c44d9d8ab1e59638d2bf351/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/28a61563540846d5a4c6c1b9f58e6b9c1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4436.00 ((SQL14_SP1_QFE-CU).151202-1517) +``` + +# SQL Server 2014 SP1 CU3 - 12.0.4427.24 - x64 (KB3094221) +``` powershell +# SQL Server 2014 SP1 CU3 - 12.0.4427.24 - x64 (KB3094221) +$outputFolder = 'c:\sqlsyms\12.0.4427.24\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8b612bab70d84b87bc09f27e4886aeb32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dd15f98e38c244fc99b4ea43e149751a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/cfee366445fd45cb90c9a47537129e772/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/da33ddc66f9843f38802e386e21a23d92/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/5d78955b0a444fa8a0829509864abdcf2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/d625926716ac4a4ab6d395e0717eee292/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f7bfed5a7b9c4b0a89c2351606f6dabd1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2829cd5018b94524a05d17c0aba940a51/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/28ce7b1a2fe64c1bae7180a1ab1d4b841/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2ab9eea24838455ebedc0b4bfca780651/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d1da515568304cada52f5ca07d32c56f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +``` + +# SQL Server 2014 SP1 CU3 - 12.0.4427.24 - x86 (KB3094221) +``` powershell +# SQL Server 2014 SP1 CU3 - 12.0.4427.24 - x86 (KB3094221) +$outputFolder = 'c:\sqlsyms\12.0.4427.24\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3ef0e0f2fe2b43ac93875b3b3925fc6e1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e630387bc0da4378a384f2f0381a70361/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/195f5a4a374443d7aba2b2bee84e34891/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/f7d1027c3648472896a7f5d88da4c9d21/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/9e81862bb11447788e4a5248fb8a067e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5a5b0039a4474b42bb55ccb3ca6127721/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d656086d4f4b422580baf43047ee17da1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ac149317d5054708a94ca8aa8cef2fb41/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4427.24 ((SQL14_SP1_QFE-CU).151010-1609) +``` + +# SQL Server 2014 SP1 CU2 - 12.0.4422.0 - x64 (KB3075950) +``` powershell +# SQL Server 2014 SP1 CU2 - 12.0.4422.0 - x64 (KB3075950) +$outputFolder = 'c:\sqlsyms\12.0.4422.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/cc4b19123a7e4b00bc327dc0d8c0535a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/685f3f3dd9bf40a384bc3b34b5e0ec382/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/132245b6e07d4ed0b8a037f372c07a1c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/f2d5c201fa064580a88c8620fcf528942/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/3c213b3e4cac475c986f38788ee7ae812/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9833540f5dd84c07bfa7aa07e35878c82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/703a0ff035d8421093c5873ca70254021/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a70c6bd99bbb44129002fe32794a1a491/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3b2cc6000a1e46aa8ad7be339858e1871/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6e69bdfbde834092882537afb0164ee41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d6bbc455ed6d43fca5b6c541fd9840a82/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +``` + +# SQL Server 2014 SP1 CU2 - 12.0.4422.0 - x86 (KB3075950) +``` powershell +# SQL Server 2014 SP1 CU2 - 12.0.4422.0 - x86 (KB3075950) +$outputFolder = 'c:\sqlsyms\12.0.4422.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3e6e97436d7947efba0199c077de575e1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8f1c6ef392a94f7280e4551d787bde0e1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/802091eeae1040b9929300673cf1e6cc1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/7cf486d748c648a993d8fee09d470ed01/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/77421fe01c504798bd84ff1111394ed02/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/bce992e7e4704168967f6b792d2c92161/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/10d2fbe0372a465a984499f610117b671/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8132ccd977ac49b9b82d21e453c9d7db1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4422.00 ((SQL14_SP1_QFE-CU).150727-1536) +``` + +# SQL Server 2014 SP1 SP1 - 12.0.4100.1 - x64 (KB3058865) +``` powershell +# SQL Server 2014 SP1 SP1 - 12.0.4100.1 - x64 (KB3058865) +$outputFolder = 'c:\sqlsyms\12.0.4100.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0b3969cc9d1c42209d848cdd6619deb22/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/cb126849ce004b6fb8128a91ca87d5de2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3b28768245824b4e9dbe603fd491e2852/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b7ffc8fe9e2f4b15b44e40b4afd2ea012/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/08ffbabfdc4a4926bc16c8522c9bbc322/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/3b87272344ce49a79745b7c63a7e20182/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/4fedbb6d132d4ed49a566bcd7212408d1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c333820aef364ad2b93a5bcc5a1c66101/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1a18e036793145c8a9d1ab124a2607e41/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/63dadaf018f1419f8a4dbbd6bc1dc14a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ab6196f20a154ace825cff70fd87b6092/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +``` + +# SQL Server 2014 SP1 SP1 - 12.0.4100.1 - x86 (KB3058865) +``` powershell +# SQL Server 2014 SP1 SP1 - 12.0.4100.1 - x86 (KB3058865) +$outputFolder = 'c:\sqlsyms\12.0.4100.1\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/0865f069e71245ca8bfa3d606b60c1621/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e489ada097d74198927ef538fd8927a41/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5bea9870e6614f7e83671000e406de331/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/68a3418eaba04db5b35c3ab2cc4a67681/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/295830323d5343efad5c418d4e6dddb72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a3aeeef5442b49b4abf8d50de9edab181/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1ea104008bc644218268d19341eecd741/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e36eebbe2905446fbf814c89dee44df71/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.4100.01 ((SQL14_PCU_main).150420-1653) +``` + +# SQL Server 2014 RTM CU14 - 12.0.2569.0 - x64 (KB3158271) +``` powershell +# SQL Server 2014 RTM CU14 - 12.0.2569.0 - x64 (KB3158271) +$outputFolder = 'c:\sqlsyms\12.0.2569.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/539b0c025c174d6698c4969ee00d608a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/da89f627ad2346c38a7e801fed26a28d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/50637ed0c6714c5c99da521077e3e5c32/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/01a3ff5e96cd40d5a8f1ab8f127009522/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/05af9fc52b03405a9cb80cbd73c60a692/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a803366e7b534798ab18db7ab2f059602/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/bee70081bce04d9e9a4d9145f820ec5f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/097922796c7443deaaebb689165db0c81/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/fc8453414c104e1992d469013988d78d1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/4cc60f940e164516ba060e2ec7a9085d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/167b796ce1b84bd6aab8a050c0507d842/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +``` + +# SQL Server 2014 RTM CU14 - 12.0.2569.0 - x86 (KB3158271) +``` powershell +# SQL Server 2014 RTM CU14 - 12.0.2569.0 - x86 (KB3158271) +$outputFolder = 'c:\sqlsyms\12.0.2569.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/759d2b26ff5346bd861ce3f29f45bec81/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/78d8fd90a81d424b9a11cff7694359be1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/10adc5ffc4504f70bea9ace99b83d4811/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/d5d8a1b7129843e992a5cc7ac48d8cdc1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/88e10155378342d28c551097e352cddc2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a51778462d5b483bb0f7c56f35e1b3881/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/63daa87222644774b370021497f13aae1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2e5c327356dd422e8df429052b8e1de21/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2569.00 ((SQL14_RTM_QFE-CU).160527-1418) +``` + +# SQL Server 2014 RTM CU13 - 12.0.2568.0 - x64 (KB3144517) +``` powershell +# SQL Server 2014 RTM CU13 - 12.0.2568.0 - x64 (KB3144517) +$outputFolder = 'c:\sqlsyms\12.0.2568.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/de53ea6dfde743f18cadc0b0d43042492/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dd5ba486f24344ad8405ff37e26b4e1f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/93d02eddd4a34a3dbbecfeb54abf9a1d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c9fd07c3fc294f1da6e434f006522b152/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a032aa8c1f9c4768a7f44c6e724c25542/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c244f112481946d78890457e4e7ee5a72/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/64efea4a66a242fe84610bdea54e47fd1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d1faf0f81672488e975d5cbff4f5f4c51/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d6ba17eeb5534b6c8f09b7bd7a9d87ef1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/7b633a8ab9664ffaa16dff394ebc5d331/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5e921cfba868494fa153b17f0d1fda992/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +``` + +# SQL Server 2014 RTM CU13 - 12.0.2568.0 - x86 (KB3144517) +``` powershell +# SQL Server 2014 RTM CU13 - 12.0.2568.0 - x86 (KB3144517) +$outputFolder = 'c:\sqlsyms\12.0.2568.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/f4ce9bbe9cd94155a053957fc6e89a171/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e3272664d7ac4280889108adaa8fa4081/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b3d91828d7c04aef9f0a597390b6e3f01/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/7f73aff2ab6146b59f7cba467bfe64071/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/5db522686f8c42f58a7a6cb449f772d32/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/d5748e2f6f7043058e5bbd55bacb3b4f1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5958ca20c2cd4e2e855fe49509dd0e7c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/310e33c9d39046199259897860543ef81/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2568.00 ((SQL14_RTM_QFE-CU).160330-1726) +``` + +# SQL Server 2014 RTM CU12 - 12.0.2564.0 - x64 (KB3130923) +``` powershell +# SQL Server 2014 RTM CU12 - 12.0.2564.0 - x64 (KB3130923) +$outputFolder = 'c:\sqlsyms\12.0.2564.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ac2576ff05574d0895c27ddeafbe5c8c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/24cf73afb18b44e98f4ba0ac01281e232/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/05ca53d70a0d46c78025be9f7379f3f02/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e478a5c24cc047cdaa62614b9d6bd3052/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/eb2d01edd0b143d3a8cf1c8a5ebea4972/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/16cdbd70f47b48cf908a13007767df1a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9f3ca7a2feee48a1998590fec323b2e91/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3ebf546ee388483abdb7dab6effd82d21/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a2f68300ade4407fb71d87f30a77fc111/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/cc7dd6966b7e43d99c7c23447f95542f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f0308e1404e542b2a920139701283a252/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +``` + +# SQL Server 2014 RTM CU12 - 12.0.2564.0 - x86 (KB3130923) +``` powershell +# SQL Server 2014 RTM CU12 - 12.0.2564.0 - x86 (KB3130923) +$outputFolder = 'c:\sqlsyms\12.0.2564.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/17b9f26230cd4187a439851dc2b15e5a1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/df46ff7b155e49048c088afde27092b21/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1849c8c7f5774787a047b5c3105a4f861/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/1e704748340e45ad8c1e5bc9b08a77281/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c3e4dde16a9a427ea900174c72dfb9e82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6c5d715625174c2c94d325757fa8d1e81/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/fa23d7c84b444dcd8b619046b60b65421/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/29ba1ceeca2744fe84f8d852530d27f71/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2564.00 ((SQL14_RTM_QFE-CU).160204-1937) +``` + +# SQL Server 2014 RTM CU11 - 12.0.2560.0 - x64 (KB3106659) +``` powershell +# SQL Server 2014 RTM CU11 - 12.0.2560.0 - x64 (KB3106659) +$outputFolder = 'c:\sqlsyms\12.0.2560.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/71ccee0526474342a5891a30d552962b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/3919239c1e00493990334a7288fcb7962/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/756b21da38ee46d0984b1188544092342/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d028137b7daa4438bc7be686320a64fe2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/781c50f9c2c44642b355a47de65574b82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a0aff51dd9904d55a4fcce650e40a9762/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9293a8099c4d4f49bc6b0543846b03791/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fa5b0015e66a4fb286899631f60591021/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/56f5dd0eb56e420b92dcd5f59b05ef9c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/64b1f742fbcb4e2eb3f2e1dc05b70ea61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8ec5a23b411344a6b1fb5a9dfc8d1c752/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +``` + +# SQL Server 2014 RTM CU11 - 12.0.2560.0 - x86 (KB3106659) +``` powershell +# SQL Server 2014 RTM CU11 - 12.0.2560.0 - x86 (KB3106659) +$outputFolder = 'c:\sqlsyms\12.0.2560.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a90e6d303f4345efaedba859da66d0e21/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/64473f2a9c0243d08ad2cebd7e62f0ac1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/eb1f9c11c81140199ee680f02d407a3c1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/5b6c3b54f0234bb2be975c25092ba4851/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/286b5c4590a94a3bb3da0360ecd0e9c72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ce4f67214c154f52ad60711ba933ad3d1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/aec11813c97e4e44bdb233dd821866191/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bd25689f8fa549398c347993c1fba4851/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2560.00 ((SQL14_RTM_QFE-CU).151130-1922) +``` + +# SQL Server 2014 RTM CU10 - 12.0.2556.4 - x64 (KB3094220) +``` powershell +# SQL Server 2014 RTM CU10 - 12.0.2556.4 - x64 (KB3094220) +$outputFolder = 'c:\sqlsyms\12.0.2556.4\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a06b30032d9f4505a3c8f000010f8e4a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e48e96adf3df44b481c69001d428659f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a1d6b6fd3e564262ae281bf794e96bd72/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/038d25c7c8644a3395f40f40f36382c62/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cfb6dad33e5f4582bb467ca8f85d4a162/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/98e46a54759c4bdfbab7383aa518630a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/76f05d07a3e9414f80f50c6442eea7931/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1383af48c8034eebb40e2851e1a44a1c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f3b781e181fe41d98402118e16e3f7601/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d0f7a6c9e839447fbf537b344c12efae1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6f9cb7b79b0f4b7eb215793a66b2ef942/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +``` + +# SQL Server 2014 RTM CU10 - 12.0.2556.4 - x86 (KB3094220) +``` powershell +# SQL Server 2014 RTM CU10 - 12.0.2556.4 - x86 (KB3094220) +$outputFolder = 'c:\sqlsyms\12.0.2556.4\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/9c806d9ee5a84c898f8421b5380b95e31/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b69a5dcf43574aa79661d3e85b9daf3b1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/97d553cffeff4762b0266da68f578fba1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/d79a773caeba4ac59f6882c36b1f356c1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f646c10572b24eaaadbae323b7abd2782/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/38dc9d399d6b41a69f084603941b4de21/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3960118c1cbe4a29af87cc01706ce2641/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/7e7fd36e795447998d8a574e0de7c1871/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2556.04 ((SQL14_RTM_QFE-CU).150925-1720) +``` + +# SQL Server 2014 RTM CU9 - 12.0.2553.0 - x64 (KB3075949) +``` powershell +# SQL Server 2014 RTM CU9 - 12.0.2553.0 - x64 (KB3075949) +$outputFolder = 'c:\sqlsyms\12.0.2553.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/4d240a39c8904928a18106632f6553402/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a7035a6ff90d479b9919516f8a75c6f92/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/90c16352697346c4adc344d5bcbef4ec2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c4b7ea36a9ed41e28a86daf39605b1332/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/afdf18a69a2247a69f8775fb26ba35842/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/531f254bc1634a668690bfa78ac1c9642/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a0a41504488d42e0889c7aec0d470a201/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8f66e9d5591841f585146e18e861ba1e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7b7dadea82424ddb940d8bcb1ced7a461/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/19ab0699fbdf4c26b2c48e3206ac53ca1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/eceabbbb5b7a43e49511f7e3b3064b472/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +``` + +# SQL Server 2014 RTM CU9 - 12.0.2553.0 - x86 (KB3075949) +``` powershell +# SQL Server 2014 RTM CU9 - 12.0.2553.0 - x86 (KB3075949) +$outputFolder = 'c:\sqlsyms\12.0.2553.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/d56eacfc22cb4f8ebfb7ed4457b60f311/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2dd16123a37f485dae76965defe7f15e1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/569970ff8be84c0b9f067365e4a00c3b1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/17dd6df3096b4d0199d1035815c1d8881/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/594a78c1c2204ba1a183b4127c462a3e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6446039fddc749d3a1583d2472405cf21/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6f805634dddd401994ea5e31420c30281/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8d3747171962416d957f2f4a2a5dc8701/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2553.00 ((SQL14_RTM_QFE-CU).150727-1511) +``` + +# SQL Server 2014 RTM CU8 - 12.0.2546.0 - x64 (KB3067836) +``` powershell +# SQL Server 2014 RTM CU8 - 12.0.2546.0 - x64 (KB3067836) +$outputFolder = 'c:\sqlsyms\12.0.2546.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/1869491de3c641a18e49984e36c254472/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/23feec68725245cba986d45a86d87c3f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/21db9cb621534d9e9be8f5c03e7091c52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8575334bb55240b5a1f44608bf3eda9b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/aeb2b040245c4f408ba6cfba7376190a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/bfffb5bc7a3044ebb54ab848cdfeb7632/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6e2e2a0675164fe8a3ade4ecae7ac20c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/dde786dd2d5b4cdca67f2653dafdb4d91/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/20f66d85e7d54ab797a4802c4e642b431/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/281a067206bb4599bf54b71128337a161/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a7596bb350534cfc874c588a8c31dccc2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +``` + +# SQL Server 2014 RTM CU8 - 12.0.2546.0 - x86 (KB3067836) +``` powershell +# SQL Server 2014 RTM CU8 - 12.0.2546.0 - x86 (KB3067836) +$outputFolder = 'c:\sqlsyms\12.0.2546.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a902edbf6d6e45a5bdb96d88b3d8b9eb1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/91f4ba068591426395fba9cf46b9fe3b1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a3454c90a9ec423abaab7718704766c41/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/6648b0c58be2467c85d16b826474f8e71/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/57dad04962d6454e8ee40edafdd2a7382/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9b2bcdfb948342728b8154e042fa2aab1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9291ad53019f4d93b0a31996c43797fb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6aaa6f308fc649d8b2982b6ae4cb77c71/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2546.00 ((SQL14_RTM_QFE-CU).150606-0007) +``` + +# SQL Server 2014 RTM CU7 - 12.0.2495.0 - x64 (KB3046038) +``` powershell +# SQL Server 2014 RTM CU7 - 12.0.2495.0 - x64 (KB3046038) +$outputFolder = 'c:\sqlsyms\12.0.2495.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/892a317818044f39a181616fc087af5d2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/3f9503803aac4aaf9068cf713da94fcc2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7b4cb4924f874c2c9a01962d7bebb4322/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/f953a26136a349b4bc7123c9b57674cb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/5b04b86cb1df4377852dcdfbaa579d6a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/68b76d2800ca4d67a20176b8080792622/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/8ed3b76470a54f71a22fe04ec4aa07971/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ac765b05370f4dd39bc3dab2c9c5b0881/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/868f36d33dea4cdd80d7ac95d51becb61/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e750975049a44a5ca167527370ef01171/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/76a12fa76ee2455086cf3afd914b939b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +``` + +# SQL Server 2014 RTM CU7 - 12.0.2495.0 - x86 (KB3046038) +``` powershell +# SQL Server 2014 RTM CU7 - 12.0.2495.0 - x86 (KB3046038) +$outputFolder = 'c:\sqlsyms\12.0.2495.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/b723d38841c74cb09e79d2eeadffc2ab1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0f90d520883c490f9d0815f7a6211e701/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bc6b474d28164912bd70a0e0087e35261/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c32b08605905479daa5521248a294c091/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/96046540101444be821ef103aa4e0f982/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/710e00b267c04ae1bc850a013edee5231/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/982821e1f1a348c4845b7a31dd0a43ce1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d8c2b98f2dd94438849861c279784cfb1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2495.00 ((SQL14_RTM_QFE-CU).150331-0856) +``` + +# SQL Server 2014 RTM CU6 - 12.0.2480.0 - x64 (KB3031047) +``` powershell +# SQL Server 2014 RTM CU6 - 12.0.2480.0 - x64 (KB3031047) +$outputFolder = 'c:\sqlsyms\12.0.2480.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/dbacb5b0cfd24693ae42ddf04ab4b27c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/31d5b80990d64e0fb25cb5327135bf492/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ff523ac683ae46a2b355c15b4ac022eb2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/edbd5ea4bbe04d47b93025254094b02d2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4929c9ecd1704cf8a7821dc901f6d92f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1c0f8135f2934a5ca84ebff15f88b6aa2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3ab1423a6b7f48d1a942c5df2fd242b61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c9aa7a554ed94d15b35740ffe04036c01/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/95947070310e43e2accbc93c08f222241/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0d379c00cf81409587f1a4c9f95f77dd1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ec96151a8358494bb84329e05aaf78e02/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +``` + +# SQL Server 2014 RTM CU6 - 12.0.2480.0 - x86 (KB3031047) +``` powershell +# SQL Server 2014 RTM CU6 - 12.0.2480.0 - x86 (KB3031047) +$outputFolder = 'c:\sqlsyms\12.0.2480.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/9b22a94162d74004a82810c2c3710a3f1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ececdbe975594116b9e388e6c9f8a80f1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9f41e051cb014f8d9fec6e44e9b721131/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/2ffeb57130c84f8fa3d69df7de71eb681/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7d7d89e6640645beb6306cbf2444ee662/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/22336473e39548f99831e8d061b7831b1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/b16a9fdb9f8546788b04a5d80b2bae261/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2c1a8c9a1b8c44e283868f97d75481e01/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2480.00 ((SQL14_RTM_QFE-CU).150128-1755) +``` + +# SQL Server 2014 RTM CU5 - 12.0.2456.0 - x64 (KB3011055) +``` powershell +# SQL Server 2014 RTM CU5 - 12.0.2456.0 - x64 (KB3011055) +$outputFolder = 'c:\sqlsyms\12.0.2456.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/eb8a93e72a794e8b9f5e5319cfc523682/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/53f31818f69145f48eee069d0d23fbd12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6e2939b1a6c747c79606f27572d2167d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/133c13f037d542e68e5d1fb06ae6e8042/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1afa777fdd2643e8b7eaa7faa9b6b5fa2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/19634392d50f4dcab91217f04a415f482/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/8fbc290a832848ffb96d30114d63ed611/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/291765ae21a741eda736cb1cbcea5de51/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7b53fe2f993e41209ea93c774deed22f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/214c250884534e1aa0185e6bef362a521/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9b95a106672640318876b62eb49ce32b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +``` + +# SQL Server 2014 RTM CU5 - 12.0.2456.0 - x86 (KB3011055) +``` powershell +# SQL Server 2014 RTM CU5 - 12.0.2456.0 - x86 (KB3011055) +$outputFolder = 'c:\sqlsyms\12.0.2456.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/b845d2f2afb44859904e1c51ea2df77c1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/93ab40244d4b4108b3e1e5e507a841f81/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3bd2da20bc3d42df9bda66521f4763141/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/301c79ece27a4a4ea90a4026b151273d1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/15d84d064320486d8f0aa9c175e73ff72/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/677fc25409af4e5cb079fc220a507a281/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c99783448e224e5ead440e48808f3a371/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3ee8df660b704120a5769fe486d912b91/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2456.00 ((SQL14_RTM_QFE-CU).141211-1636) +``` + +# SQL Server 2014 RTM CU4 - 12.0.2430.0 - x64 (KB2999197) +``` powershell +# SQL Server 2014 RTM CU4 - 12.0.2430.0 - x64 (KB2999197) +$outputFolder = 'c:\sqlsyms\12.0.2430.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8ed2ab1b64c64cd6b53be5ba2940d1a42/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1d8587b3f0eb464f8da9733cc91606862/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/21f00ed9f1534ee39faf557af2efe0b22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/0999d6303e144ea494c2befc049f4f052/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f21b42e831e3406796f8341329a2109c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6ea90b282987428e950c06ca61b48d022/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/72b8a33dcd5a4c199f48947510111e4f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c3f38698f3db4272bbf911928e3a71c91/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c9e0caaa8d11431aadaff0f8fc85c2041/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f98a21da91c24cfdb165f8f2c1a4019d1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/3863b99a65d94c2f9aba257ddb80519c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +``` + +# SQL Server 2014 RTM CU4 - 12.0.2430.0 - x86 (KB2999197) +``` powershell +# SQL Server 2014 RTM CU4 - 12.0.2430.0 - x86 (KB2999197) +$outputFolder = 'c:\sqlsyms\12.0.2430.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/c842b82043f14b56bbdaf6f3daf8c9361/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/bd6cc732c1a04a70949c746ad7c75bfc1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5e255a6c840c4135afd13947b885a0bc1/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/bf46680cb561413d92bf308f29ed422d1/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c2a06041e7e2494889e753f9633f49ad2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b6b6b351ea9b4ddc8d275499e307dc371/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d44e146dd57b4e84bd689c2dc23f38a21/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0bad01bb555b4a9a9fb58bba8dbdee961/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2430.00 ((SQL14_RTM_QFE-CU).141015-1502) +``` + +# SQL Server 2014 RTM CU3 - 12.0.2402.0 - x64 (KB2984923) +``` powershell +# SQL Server 2014 RTM CU3 - 12.0.2402.0 - x64 (KB2984923) +$outputFolder = 'c:\sqlsyms\12.0.2402.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/74853044551f42dc87b5388cb869e80e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b95f32db724a460eb6eef6e130b837262/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ea34d76c06f34b6cb7b0908f0746c0782/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b0d9d6294e034a73afeeee938172760b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/bf41580581a9420fb851f76ec3afb75a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f96bf02390534634bdc1e8d623c2d33a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f822ab6d65fc431cb5ab54b0ee8e3d4e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/7b77a2193e4f4891b0f34f9cda87f7b11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5ef94f8c3ac34e8494fe1807ea68107b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/70d73245215e4eb1968511982957b5a51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/56ece3cd49754bf8b5aea9068ca1858a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +``` + +# SQL Server 2014 RTM CU3 - 12.0.2402.0 - x86 (KB2984923) +``` powershell +# SQL Server 2014 RTM CU3 - 12.0.2402.0 - x86 (KB2984923) +$outputFolder = 'c:\sqlsyms\12.0.2402.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/0232dbfdd56b459fb96c006f563d2f6c1/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0d331b541b294e44a065cae4384077da1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1fdf9f2c4cd74c4c99eaf0b33fb615271/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/1f461bef6f764833badbfb63717c6ca21/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/8dde3944f69a481aa12e39b50dc1387e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/fc462491d53f4437bbf3b53c21a2d19b1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3abaa853cdfd43538b656cf6b8ed08f41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c1fcff98a6144ea89585dbf7506c49c31/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2402.00 ((SQL14_RTM_QFE-CU).140813-1032) +``` + +# SQL Server 2014 RTM CU2 - 12.0.2370.0 - x64 (KB2967546) +``` powershell +# SQL Server 2014 RTM CU2 - 12.0.2370.0 - x64 (KB2967546) +$outputFolder = 'c:\sqlsyms\12.0.2370.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/00fe9a5483574e96ba85d4e14743c8cf2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c0cd8d60c1ac4687a1f529cca07230152/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a3e0e381d1dc4ba2abefa830fb5908072/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/abf0ec3c6c1f49efb5ad08dbf408ef8e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/2709a8f9d5804dc695ad1b95124e3c732/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/27958e94f9a14900b53db20d28600db82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/af790770d88f4c40a2b39623e71a4dab1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d4ac25f2460744f992933ca2b332429e1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/21a099f1ea704e979734421be237b3751/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/28d76d0753dc4ed1b8a26d6a8820df5e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/021ad6b05b234d8484546842381e7d652/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +``` + +# SQL Server 2014 RTM CU2 - 12.0.2370.0 - x86 (KB2967546) +``` powershell +# SQL Server 2014 RTM CU2 - 12.0.2370.0 - x86 (KB2967546) +$outputFolder = 'c:\sqlsyms\12.0.2370.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/efa900c9c1eb4134a444a4adf16505551/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/7e9bd6b6dc8f41448ceaad495e2da09a1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/1866d12aa39c485397ac98c9edfb88101/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/3cd6a9cb42774008ad553c1ff1b647d91/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/9c6ed829937f4036b7fabcff7173cdab2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6f14e9defc694da98c58fd58d3a358481/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/54dbf7bb6af447298c7637a9ada989ac1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1e3ffb2e704744d6a73cfb79cb38619f1/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2370.00 ((SQL14_RTM_QFE-CU).140621-1135) +``` + +# SQL Server 2014 RTM CU1 - 12.0.2342.0 - x64 (KB2931693) +``` powershell +# SQL Server 2014 RTM CU1 - 12.0.2342.0 - x64 (KB2931693) +$outputFolder = 'c:\sqlsyms\12.0.2342.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/57c252c885d8450b93688037679d5db22/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a35c73537ad64f2ab17ad8ef76ceeb4c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/550f9e5b95f44c42a77d2f32154b77eb2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/b97e3ca52a8e4182992f891a812e911d2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/65b8869fb0b44abfaf9f3635bb4c694f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9e454a85cdba496dbb47c8aeb1d5c66b2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ba6cba69141549d4b828b2e3a8e69b981/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fe5ab059d8de48b6b74bd26c7c0015ca1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/318b9d34af1d4e1780ef5277e5a5a8741/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8f42604977cd4be4a8c3d12f390048cf1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5460fb87c3d54751906607c8a455f81a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +``` + +# SQL Server 2014 RTM CU1 - 12.0.2342.0 - x86 (KB2931693) +``` powershell +# SQL Server 2014 RTM CU1 - 12.0.2342.0 - x86 (KB2931693) +$outputFolder = 'c:\sqlsyms\12.0.2342.0\x86' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/74815ec15b4c4e5db8b41b9f77197a431/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/33e87393cabf44a381d3b0d5f7d36efe1/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/e84e6950792046a9ad837c8451c0bab41/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/2369cc5ed5334d2587d538a1075230d01/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/6982bb0a3859490eae0d8885cc0dd1322/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5d24211092fb49aaa62c76ee12da579f1/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c98e147056fd4ad9bc50de8c6705590a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/76992783851b4654be2bd359dc53bc831/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2014.0120.2342.00 ((SQL14_RTM_QFE-CU).140404-1739) +``` + diff --git a/Errors/PDB/SQL-Server-2016.md b/Errors/PDB/SQL-Server-2016.md new file mode 100644 index 00000000..4acae0e8 --- /dev/null +++ b/Errors/PDB/SQL-Server-2016.md @@ -0,0 +1,699 @@ +# SQL Server 2016 SP2 CU13 - 13.0.5820.21 - x64 (KB4549825) +``` powershell +# SQL Server 2016 SP2 CU13 - 13.0.5820.21 - x64 (KB4549825) +$outputFolder = 'c:\sqlsyms\13.0.5820.21\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/e6a5231d69314339a622dec94dcdd7d32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/96c764d747bf420b9996befef7475c9a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9ee1aa873d2d4b778e6a54459fd7914d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e09ce83a1ee54955a5e6406176a389362/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/62fe14b4c3604a3fb403bb7e22940c362/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/7221bd8eef08483c81a4a857dd6587d82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/aa95581843cc476f8b86d487e4f708f51/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/22bf33591a704ff09291525ac1d00d191/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/8f4b1832517446938ef926263aab57cf1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/f8668e661315449497cea566e51c83131/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2633f57463f64221a5ebeff75ed2100d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5820.21 ((SQL16_SP2_QFE-CU).200522-0642) +``` + +# SQL Server 2016 SP2 CU12 - 13.0.5698.0 - x64 (KB4536648) +``` powershell +# SQL Server 2016 SP2 CU12 - 13.0.5698.0 - x64 (KB4536648) +$outputFolder = 'c:\sqlsyms\13.0.5698.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0271f8481dae4e9493e450b8dc796bc02/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/641b2f06bbc146b38bc05e9b58e36d0f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/72307bde192a4c319454098c20cb912b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/bcd4e428d7c94039b4955ed076e7a3682/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/92812c2e4617474db8111c7804eda4f92/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/5a323ebb0fbc4248b605abd7c0654b2c2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d3cd4e59ac0046c1a6f61aafb00e2c4c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/20e8d53a37e1427cb93fa7cafe5f27aa1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d0bcad819dcc4842929e81a1e9ecb59e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/98ebdb42d04440ba9295070f88407f6a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0148f923aea94af19053f99ba79996682/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5698.00 ((SQL16_SP2_QFE-CU).200215-0125) +``` + +# SQL Server 2016 SP2 CU11 - 13.0.5598.27 - x64 (KB4527378) +``` powershell +# SQL Server 2016 SP2 CU11 - 13.0.5598.27 - x64 (KB4527378) +$outputFolder = 'c:\sqlsyms\13.0.5598.27\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/430ef93c7b564dc2a93647e6e1fafc8c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/79015e09729743128701ee4f66f24fe92/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c4b83e706a594c56b9f509cd06c33b762/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/f137caf5bd854030935dcf93b62eeaeb2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/832f21f9f07244ca8ae43ecb5f76fb9d2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1aefde25bf814c2197bd09f7f58513292/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/380b9e486b1643008a409f775f7c8a411/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/001fd9d68d3c4dae8e89c2402fa889021/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/75ccea7cdb124f4a8ececf21620e312f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8a1a47fa116541d3bf3428149ba6b3bb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/186252fbc0884d24b6fe231af0759a352/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5598.27 ((SQL16_SP2_QFE-CU).191127-1657) +``` + +# SQL Server 2016 SP2 CU10 - 13.0.5492.2 - x64 (KB4524334) +``` powershell +# SQL Server 2016 SP2 CU10 - 13.0.5492.2 - x64 (KB4524334) +$outputFolder = 'c:\sqlsyms\13.0.5492.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/70ecf5dbd5ef45d58df538eeb5e739b42/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/63e1be959b6b450b974b7736342adbfa2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bf2a1e4b8d03428aacfea5d795e2425b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/fd96f94072a141758a4cbea2812690a12/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4048059f80d943babfc3f6c28cbaea1f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/bb191544f6184394adf2c918affc041f2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d5895ca6c7dc4374b010a96739da4bc21/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/801fb6f15a7f4965acaabfab3e987d9c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c3151df89b1c457dabf76e34c04f1bb71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6f298cba9ac5443cb1450d8082c0c3011/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/006c2ae04bf045c0a9b5effd267136ad2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5492.02 ((SQL16_SP2_QFE-CU).191004-1836) +``` + +# SQL Server 2016 SP2 CU8 - 13.0.5426.0 - x64 (KB4505830) +``` powershell +# SQL Server 2016 SP2 CU8 - 13.0.5426.0 - x64 (KB4505830) +$outputFolder = 'c:\sqlsyms\13.0.5426.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/18b397dfe9034092a48167ec1ec5ea0b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/132b5e0d712b4464be80ed12e1e5505e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/db48420d121b42899a92f0d23dc57ad22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d5acd14328d4434abea6af32ef61536a2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/32d9395ab3de4e75a7e11a1d23cb5e822/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c010f16083f14fab9a85dd2d21893a302/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9dfd9945902246ccb7d504ba4d348f461/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/331c42cbf74a420e81faba8d2c85a3cf1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7acfbd3f08164c9aa7b501bf677cb43c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/d604a24250b64ca6a926842ec51546ad1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1e0e6f6d8afd403bbb31684416b9314e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5426.00 ((SQL16_SP2_QFE-CU).190721-2038) +``` + +# SQL Server 2016 SP2 Hotfix for SP2 CU7 - 13.0.5343.1 - x64 (4508636) +``` powershell +# SQL Server 2016 SP2 Hotfix for SP2 CU7 - 13.0.5343.1 - x64 (4508636) +$outputFolder = 'c:\sqlsyms\13.0.5343.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/e4884387ee894c14b9ba32a55b1e4ed72/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/5504c31fbc484a04960c330f5520df7a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b4414980247d436abdf4cf4c43f5023f2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/47b47fc8b89d47d5a82297cf24630ca02/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/72d0f73f142c4d1f9c2be9ce5c5f9a7b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/66bd5fc8cd934353b7fa1b2db5d1e5382/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/5e06fd5a624848ff9a02a71ddf0c11481/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ca29126933fd43f7bcc35106076ac2471/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/25e8c49501a8498a86d2a13ab329b3ea1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ccd4f61a1ae7416b9caecb49e46c96ca1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9dd288e031a2402dbad6f68c468a1f662/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5343.01 ((SQL16_SP2_QFE-OD).190614-1944) +``` + +# SQL Server 2016 SP2 CU7 - 13.0.5337.0 - x64 (KB4495256) +``` powershell +# SQL Server 2016 SP2 CU7 - 13.0.5337.0 - x64 (KB4495256) +$outputFolder = 'c:\sqlsyms\13.0.5337.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/19f0728b189a437db61f6d0a59378c2f2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/27a0893b43494606b4da007056d14b8f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/53f66882dcc948a5ab43ccf35f8c62172/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/26528819a67f4c9793cdb2c6b6d25f022/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f6d28fb6f5ac469a828b160544679d362/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/956090e1037945b2928f4f605b52ded32/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/55ab1c4583324e4181dc2d13638a270c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4a5ef712546c4ea593b3919fc8e9be3c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b29f002c7c8546f399a8818e0f01340f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/decb2afdf5ad41c48644e8ee74024d501/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e272bf31dd404e02800badc8605d29702/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5337.00 ((SQL16_SP2_QFE-CU).190516-0131) +``` + +# SQL Server 2016 SP2 CU6 - 13.0.5292.0 - x64 (KB4488536) +``` powershell +# SQL Server 2016 SP2 CU6 - 13.0.5292.0 - x64 (KB4488536) +$outputFolder = 'c:\sqlsyms\13.0.5292.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/950cfd27fb154e0fa81f5171d3a9e72c2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f4e8c4a23f0e4300b84aff830703780e2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/98e48204764e43beb5a7512730a309542/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/2c6f6ddf2326442bbf1d71142d177eb12/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e677182deae14a179afc8d4cd0de3e682/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/705ca25058a944e6ab3c1ab89d77de3c2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6b45c84e9e8e4450ac26bdc614b491da1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1f44e38a066b4c9aad14b90ea547e5f11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/bcf044a5cfc64d03be7cdf8df023bd2d1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/dad251dee8644e4dbf61bedbcf9a06bf1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d6c736e277fd4baf8e88d3b6d27cff362/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5292.00 ((SQL16_SP2_QFE-CU).190311-2257) +``` + +# SQL Server 2016 SP2 CU5 - 13.0.5264.1 - x64 (KB4475776) +``` powershell +# SQL Server 2016 SP2 CU5 - 13.0.5264.1 - x64 (KB4475776) +$outputFolder = 'c:\sqlsyms\13.0.5264.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0bae10a1491645f8a97b697fe565dd332/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/85a6f0d21b0a4d8f96d6aa8049a1c8892/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f5b7a81e036a4be3bc7c1858909869802/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/e8f4359ed540405ebf50b2593e54434b2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/73d85290046448bdbcc3ede97dfc234b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/81dc5887677b47be879138df0c3009b12/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/97818e2e150f41d4a1b3882e98aee44e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fcb62686788c4edab5fbbb3586fa70641/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e3d3a5d84aa04e1c95a508d1a2a121ca1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8f3f2c17b925463ab3be306a8bfbf6191/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/21046a92c3c344459925db3348bed5402/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5264.01 ((SQL16_SP2_QFE-CU).190110-1506) +``` + +# SQL Server 2016 SP2 CU4 - 13.0.5233.0 - x64 (KB4464106) +``` powershell +# SQL Server 2016 SP2 CU4 - 13.0.5233.0 - x64 (KB4464106) +$outputFolder = 'c:\sqlsyms\13.0.5233.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/f1595ec49d654c548b60b5b8640881562/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8d1e052738ed4834ac1162b8970bf0532/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9b29b84d1daa4cb690c91697520de38a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7975964f1eb7477988fd520d142465bf2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1be684f3c3984a379a6438f8c36fbb4a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/17bc4cfd173e428fb9eae9da392a49682/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/87146b12ed3649fa9968b622bb55394e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f428b375b3ac4ef38be75a3d7affd27b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/624caa45728c42819a84a8a89279d3471/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1f8acdfa201f4b3fb8fd8b64013b32be1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/45097423fa97421fb2c60e85d141580c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5233.00 ((SQL16_SP2_QFE-CU).181102-1539) +``` + +# SQL Server 2016 SP2 CU3 - 13.0.5216.0 - x64 (KB4458871) +``` powershell +# SQL Server 2016 SP2 CU3 - 13.0.5216.0 - x64 (KB4458871) +$outputFolder = 'c:\sqlsyms\13.0.5216.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/f9c66f15cdc3472da5b316372a3cd0c62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4eb925dc9f414f4293fb048931c1d1d12/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2aaea59f054945b1948f09a286af4aa22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/d9a41e1b050741a9915c9f2f68841b662/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/127cbf6e83634f56858c143daccdf3472/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8cd3001646bb4bee9fa7b29c4e3c424d2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/cef124fae1224970a283718094129ec41/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3428a25be3a1405bb9e935aa5e5a5f921/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/86edaf9016ec43d49af82793f7361d011/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/25fb6b2428844941bc633974f50616bc1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/df83d51fbc304a579684e3c308750cba2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5216.00 ((SQL16_SP2_QFE-CU).180913-2138) +``` + +# SQL Server 2016 SP2 CU2 + Security Update - 13.0.5201.2 - x64 (KB4458621) +``` powershell +# SQL Server 2016 SP2 CU2 + Security Update - 13.0.5201.2 - x64 (KB4458621) +$outputFolder = 'c:\sqlsyms\13.0.5201.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/048d5147a1fb4e80b787588ffc9fc1e62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a75b883c7cf144338e088ca1afe44c472/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/fadd356647c4454191fdf160228f57e72/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/55d8b0e99a7446308229c50cefdd930e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f7a6fc258016430597598d515e0a483f2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8f9e0659b5514f89b3cac5bdcfc7e3882/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ecb9fb39a89c4e59b3daad0b525fa9b71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/9ecba208484247eaa0a0e2d43c3bbb5d1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d05ba204ab6d4176bfa45358d8bc42121/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/41df1265eeed4d5086844d85018088bf1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8360d2c4f315435cb1a449b1ebe4a68a2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5201.02 ((SQL16_SP2_QFE-CU).180818-0710) +``` + +# SQL Server 2016 SP2 CU2 - 13.0.5153.0 - x64 (KB4340355) +``` powershell +# SQL Server 2016 SP2 CU2 - 13.0.5153.0 - x64 (KB4340355) +$outputFolder = 'c:\sqlsyms\13.0.5153.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/fddc412a5dcb40429eda4fb2f4fb09572/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dd1807b4810a4aee89a261e957c2d8f92/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0e02593224ce4b00a8ae88c15f7554822/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7f96e1cef4e24bd58ce1bfb0097d7bd62/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cbb698692191446e8e63cbb247cb4abe2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ce4e0c0acef54b2e889a6e92ce618f3b2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/8b8a156300244f6d998e9518bf3655741/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f332d042c9ba422c8fb4dadb8ad6bd601/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f507bb1cdc6b4c46b06676fde5cdf8c71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9689d6f86afc4da78d5cfb3bfbe5950b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bb2788ca8bc24a8cac395d4371de62422/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5153.00 ((SQL16_SP2_QFE-CU).180628-1652) +``` + +# SQL Server 2016 SP2 CU1 - 13.0.5149.0 - x64 (KB4135048) +``` powershell +# SQL Server 2016 SP2 CU1 - 13.0.5149.0 - x64 (KB4135048) +$outputFolder = 'c:\sqlsyms\13.0.5149.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/6d9698a353374e5c938b2acb7ee7ed362/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/37faf9a6bc2b4d16a8d962d486092a302/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/271e230238254765bcd979679d6b56982/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9f9dc614a58242c2a85acc563e431db62/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/bf258f9a750546b6a8b936b4970b7eca2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b896f5579e09485e9d9eec87d67b676f2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3cd9ede70ebf4e4185992fe4fa65b2d61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f31fd9f5e3ef4fe096cf59903c387f4b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/762df1defe62466280d87d81794865c61/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/72d4af7f134e4cb49edcccf5f4cf383f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c5ce87b693a14696b7df5cb69aee3d442/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5149.00 ((SQL16_SP2_QFE-CU).180519-0907) +``` + +# SQL Server 2016 SP2 SP2 - 13.0.5026.0 - x64 (KB4052908) +``` powershell +# SQL Server 2016 SP2 SP2 - 13.0.5026.0 - x64 (KB4052908) +$outputFolder = 'c:\sqlsyms\13.0.5026.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/efc619ab5524425aa224c623beaf4a662/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/104358b4c4b04eec8a75e36af274c29f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/cae1133e7ab54002a38c876e49559d222/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8f07285b69314e478c481af6c60aa28e2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c390e4f8204e4d87a76a44032594be0d2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/4f2f9273fda643d4a2dfd31a67e93a0e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7866454b831848c5b5de93b2b03fb8491/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/445daee2af1a43f295208380348074031/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6c004a1c95204734b6cef4f8511617421/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a6047d2982024452905f1fff97fa11421/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ee2324e08c3e4f42acf1572a9cb62d9e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0131.5026.00 ((SQL16_PCU_Main).180318-0835) +``` + +# SQL Server 2016 SP1 CU15 - 13.0.4574.0 - x64 (KB4495257) +``` powershell +# SQL Server 2016 SP1 CU15 - 13.0.4574.0 - x64 (KB4495257) +$outputFolder = 'c:\sqlsyms\13.0.4574.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/da14e7ceb24d4c2890b2bde9a03778e52/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d0dc0e05673549c39349963e9c6115eb2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/003624ea1e0642a58b9040c5811ecc372/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c408c0723f014e5f90286bc7c822f7142/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/205c4da00f5c4795a18730dd162b0e5c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/7d0210ad6c38483d82d5a673f656490b2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e5157d95993b4804b14b3ba28ac25a4e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6c807a6e0bfe4a3d8ddbebb9c5df94b21/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/04e55a9040ff4d5a901fb9edb3f714ba1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0d0627accf6849419318444c37eb8fb61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/16d8c4351bdc40ac9997dfc601968a8e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4574.00 ((SQL16_SP1_QFE-CU).190427-1658) +``` + +# SQL Server 2016 SP1 CU14 - 13.0.4560.0 - x64 (KB4488535) +``` powershell +# SQL Server 2016 SP1 CU14 - 13.0.4560.0 - x64 (KB4488535) +$outputFolder = 'c:\sqlsyms\13.0.4560.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/6a1934433512464b8b8ed905ad930ee62/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4d031e02b20c495c8581a9a757ae5fad2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/fe7ef391534148c79622e391200336c42/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/55eb1336f7f74ba48038b7c00dd46a0d2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cf41b9625c804b5c8cbc1a77ebc6330b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9179e43956784d1ebdbffe52d6a40c5e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c5be83b1f16440bc8f708236c273c2051/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/15a13e10244142eb9d45aff1353423771/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/a7b733870ad24fdfae1196da3201bee41/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/33d27befeb5c4432830896ac70de90501/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/9d0d577195464804b2e7e408f64f87d32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4560.00 ((SQL16_SP1_QFE-CU).190312-0204) +``` + +# SQL Server 2016 SP1 CU13 - 13.0.4550.1 - x64 (KB4475775) +``` powershell +# SQL Server 2016 SP1 CU13 - 13.0.4550.1 - x64 (KB4475775) +$outputFolder = 'c:\sqlsyms\13.0.4550.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/a9a4c14c343f48969f80364f590898602/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/12140f43a3c84dc99114f1db9d63442b2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/2485f60633124761be7e478491159c092/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4d617c540beb4fc59140e9f8547c57962/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c3061b6d621e4d1081838f523ef808d62/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/22da8e8de40543f8aa01fb1b02a60e5c2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1a8accfb14c14072a4929654c400f8491/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c765c8f7785e4598b640f828d81fd9851/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/30268bd8d01d40d0be47fb9ce30522021/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/4c1f27348acd463dbe00df9477d840c51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5c4f7f0fbb6a42689720fe6353a343e92/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4550.01 ((SQL16_SP1_QFE-CU).190110-1903) +``` + +# SQL Server 2016 SP1 CU12 - 13.0.4541.0 - x64 (KB4464343) +``` powershell +# SQL Server 2016 SP1 CU12 - 13.0.4541.0 - x64 (KB4464343) +$outputFolder = 'c:\sqlsyms\13.0.4541.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/d3080f42570f4bf0a4a837a8895ca7902/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/4dce2e3f19f74c31b5a6ac2af6a9d8262/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/18954e55372343d5a4d6681895c263ea2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9aac7f2866b540b4ab2c1b9ac9e577a72/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/8093743906d24ebbbaf34109d536867b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c7333000708848b794283812c1bb4c1f2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c1238bf343b747f7b8b337f438942c711/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/7f07d29b92d74e038aec8d7d0dd4b36b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/98c1ec14b1674f1c86ddd4ceb6ccf6fa1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/06a0750893f44304ad32a17a180927f21/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/7162e87a93b346bba5752ed81f9b57202/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4541.00 ((SQL16_SP1_QFE-CU).181026-1658) +``` + +# SQL Server 2016 SP1 CU11 - 13.0.4528.0 - x64 (KB4459676) +``` powershell +# SQL Server 2016 SP1 CU11 - 13.0.4528.0 - x64 (KB4459676) +$outputFolder = 'c:\sqlsyms\13.0.4528.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/49f484665e944b7b955f47ac457f6f132/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/db189aef1bba4446a2162ff54266b4ce2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/e1bc1af368224105abe4120dbdb73f832/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/33537b3dbc714ad39948f5a027e02e042/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d4a5c566de5f4e8cbc0724155e6897252/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6abb1e2ee2324531a59ef3e3532c7a012/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/af8f4fe9f42b47208ffae42cd1cd846d1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2da374ada649478aa35648edc58188811/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f073ed383da5472da181faca36520b1e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9f53ea00e8104275af6dbf64e1b6a3591/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2dc4533ebfec420a88bcb188833b50db2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4528.00 ((SQL16_SP1_QFE-CU).180830-2114) +``` + +# SQL Server 2016 SP1 CU10 + Security Update - 13.0.4522.0 - x64 (KB4293808) +``` powershell +# SQL Server 2016 SP1 CU10 + Security Update - 13.0.4522.0 - x64 (KB4293808) +$outputFolder = 'c:\sqlsyms\13.0.4522.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/2c80618f9f82487ba2385a9cc3ddf88f2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0fae990bea634884b2bb03ef48ae0f9c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/744610eb2fed4fe28992cb1051af89f52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/231b6d23fea44f0e9978b2903e55f98c2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/9ebc1faac19940a2913209dedfe0a8fb2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/920fc8ef2b144b92b9e500f34c7a71292/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/0f4ea0db1e374ab5aa9c527249a56a5b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/48c8d8e079b5402da40b9db2b50d98381/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/332f649e9f7a4444b0e7f810cfe46daf1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/306b24badfce478b88e7cc9bf4f158ba1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/1900f69e405d454783d12534bc3e62232/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4522.00 ((SQL16_SP1_QFE-CU).180717-2208) +``` + +# SQL Server 2016 SP1 CU10 - 13.0.4514.0 - x64 (KB4341569) +``` powershell +# SQL Server 2016 SP1 CU10 - 13.0.4514.0 - x64 (KB4341569) +$outputFolder = 'c:\sqlsyms\13.0.4514.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/eba3127f55a6490b925ac53a6af5ef262/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c36664a87ee44edc82989935ce8fa1ad2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7b867a51f536452a95636acf588d0cef2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/4f050afd2b5b4cacb6ff7c302f5ce5c72/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e4ce24f005df4299b285c9da1050c01e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ad7c0ab9750744a9985d59afa1474dda2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6a522b1480b54288a132ac67e8da49e51/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/e63e19d43fb24d81b84c1208c96984ac1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7f5068607ec14c409d9d04c56ac9e1731/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0e87037690c64c06ac41a9db319a970f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0840ef6023a7422f90acbfc2bfe60dfe2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4514.00 ((SQL16_SP1_QFE-CU).180622-1535) +``` + +# SQL Server 2016 SP1 CU9 - 13.0.4502.0 - x64 (KB4100997) +``` powershell +# SQL Server 2016 SP1 CU9 - 13.0.4502.0 - x64 (KB4100997) +$outputFolder = 'c:\sqlsyms\13.0.4502.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/ee6e6cc4172f49ca87933514afe4929b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2676f65ef4f14e1c9a6b62a9d1522fe82/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7dfceb96c58c453ba4e3d8a1ca78615d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7f8a037059454eba99b698a776696daa2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/334ffbfb732c4fc79e4e3513e5027a3d2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b561f4e3c38e4562b7972ea695cffc4c2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/cf91d9718d41483bb4606f54896f9c3e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fca548701ad64b9eb0f58be2ab0dccf11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5cc13763d5064b6d97d9f1cc1ecaa20c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/beda030e12954da6a9eba8922683f73e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2a17dec666134d14a64d767ef4aebe202/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4502.00 ((SQL16_SP1_QFE-CU).180514-1334) +``` + +# SQL Server 2016 SP1 CU8 - 13.0.4474.0 - x64 (KB4077064) +``` powershell +# SQL Server 2016 SP1 CU8 - 13.0.4474.0 - x64 (KB4077064) +$outputFolder = 'c:\sqlsyms\13.0.4474.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/bad09995ed274e949232badd3f3d7aa82/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ddf784b88c44464fbbef4a3c309436392/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/04aab3b7206c46a9b777313cc33d57402/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/ef2f100c08554e4398658ca191205f162/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4b20376587754240a8157ec3f5c827102/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/61506f0f9d5240c18416dae8f808755e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7e93929a70af49a98c0d3a9d10d24d841/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/e66b4e3643c94f26862bcdbcae4df7901/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/48c28f25191a4ee0b7a4810e6c0f29f71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ea990dbdb39247fbbd083d2de5f867d71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0d79a37d6dda4c28aa9dea14724f12f52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4474.00 ((SQL16_SP1_QFE-CU).180224-1012) +``` + +# SQL Server 2016 SP1 CU7 - 13.0.4466.4 - x64 (KB4057119) +``` powershell +# SQL Server 2016 SP1 CU7 - 13.0.4466.4 - x64 (KB4057119) +$outputFolder = 'c:\sqlsyms\13.0.4466.4\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/4fb77886edcf4e9d89fac79ebf7d1fea2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/04bc3e5a0e4f471e9b96d67c5e3f36df2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/75cbabc14dbe4b78b399b0e5f88a97092/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c68cc2cb6c074e39881a844eec9778f82/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/bf98529869b64e518f5afd9c0c5079c82/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9215ec6a12bf4d20a9e6798034e2036e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/33d2f4d2ce9c4e3ebb58b76dd1c289a81/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/7aa9d469ad5e42b8b414338158cf15b41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f86b9c579a474a3fac7812d34b52bf221/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/893d1525c26945cf827a45f9b043e5eb1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c583e52b9d604d4da427ceb43ab482252/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4466.04 ((SQL16_SP1_QFE-CU).171222-1041) +``` + +# SQL Server 2016 SP1 CU6 - 13.0.4457.0 - x64 (KB4037354) +``` powershell +# SQL Server 2016 SP1 CU6 - 13.0.4457.0 - x64 (KB4037354) +$outputFolder = 'c:\sqlsyms\13.0.4457.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/db2fe36302c64a1a86813d0549b22b012/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9cdf1937cd024f1e82060b74e9e60e512/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/046a40a60ddc486086561319f5387e142/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/2547dc27f1324d3fbb7daad4793c6cf12/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1a145eacaf05435abe69b319f8277b9c2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/90a48bebb7f84ca9884ca115fa7ed9c32/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3daff9d0abe941b08003e61197ce4ede1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/9bb39bd5bd404d9b8693d476a4976c381/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b76a518cfcad45f5bc36600f200d8df51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5028c6a5a3bf40fb893b7034820c6ea81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/853cc6b85b6049bb8e28d35007644cf22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4457.00 ((SQL16_SP1_QFE-CU).171108-1347) +``` + +# SQL Server 2016 SP1 CU5 - 13.0.4451.0 - x64 (KB4040714) +``` powershell +# SQL Server 2016 SP1 CU5 - 13.0.4451.0 - x64 (KB4040714) +$outputFolder = 'c:\sqlsyms\13.0.4451.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/0adf0efaa0674d52b42ede2653b2bc792/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9c9bc2d7227d4a44826cc162dc9364782/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/00a5c9de969c45918756df4cfd8c6f682/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/01e048da3e0c4ca4bdf473066c7cf6c62/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/bc8c89cf69be4fd3a3364dcb0a72dca52/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/360009d4947e4ac08be932e3f16b2ccb2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8a5bedd54909459eb41b76521723683b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/57c8fa0d82c643d290ab9530b788e4d42/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4451.00 ((SQL16_SP1_QFE-CU).170905-1437) +``` + +# SQL Server 2016 SP1 CU4 - 13.0.4446.0 - x64 (KB4024305) +``` powershell +# SQL Server 2016 SP1 CU4 - 13.0.4446.0 - x64 (KB4024305) +$outputFolder = 'c:\sqlsyms\13.0.4446.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/c880090278d9483faab63d7472a628ba2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/ea6d107876b848c990276c5164f78e222/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d41f27d7505149d2a9d14483961593b92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/92e8bee376394dcb8a2a52800b39f5092/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/149150e4cdbf4baf80620e32ef97fc012/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/6cd22e703a544fac840bae7b3ab83c132/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/76b434a7b537413da49b849be7bbd2b91/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/eaaa9a9973f6411495bf3d00bb06f8f11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b8813f5978cf4a3dba90881436bb77f71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0a7f20ebf1024eaf8a1ffd2b239bfa4e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/eab3cf5200994d3eb10eaa1a884a3ef12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4446.00 ((SQL16_SP1_QFE-CU).170716-1734) +``` + +# SQL Server 2016 SP1 CU3 - 13.0.4435.0 - x64 (KB4019916) +``` powershell +# SQL Server 2016 SP1 CU3 - 13.0.4435.0 - x64 (KB4019916) +$outputFolder = 'c:\sqlsyms\13.0.4435.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/8fe09624812049058da82aa8f1dd66f22/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/558322e65c7e4b328939747b49d560902/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/470aff4a91ac4921b55a2172551f7bf12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3149ea1cf3e144a595628fffafeb88fd2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/0d9fe1a60fe342c1a1ce09de7ccdbd2a2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/225b08e74e474943bc4e1122946cbf532/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/de75b23f05c440f9a563565af615e1391/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/08b0902123f545b6bbbcd419f6f8cb5b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/cc9c2fb0544943e48eb8e300255313191/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/320d5955652048e78f2fc910d1eef2d51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ded87b2c33dd49fd93d4daed66d9092f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4435.00 ((SQL16_SP1_QFE-CU).170427-1707) +``` + +# SQL Server 2016 SP1 CU2 - 13.0.4422.0 - x64 (KB4013106) +``` powershell +# SQL Server 2016 SP1 CU2 - 13.0.4422.0 - x64 (KB4013106) +$outputFolder = 'c:\sqlsyms\13.0.4422.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/cb638c12b4674d87ac7357f16e8ad0c32/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6cf52c50743545e3b6a49ff43d1379152/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bc808d257868486f8231cded7542228e2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/be2f8736bbab4e6d9dddd5e2ee23c5ce2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7a42c58c49904f169a5aff489be7369b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/997d7a6a523843b08a2ae10c5d75534d2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/c2b0f4c16c5a4e509441c8338aa5ec1c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/28f240977ff44072aa8e8b2a7d60ba641/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/270d0aa365954e83ae7d1df1408d6d9a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3b16a7b538974a81bf76596ef78cb3381/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/65b28e59df5346238c2bb00123ee4d2b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4422.00 ((SQL16_SP1_QFE-CU).170306-1319) +``` + +# SQL Server 2016 SP1 CU1 - 13.0.4411.0 - x64 (KB3208177) +``` powershell +# SQL Server 2016 SP1 CU1 - 13.0.4411.0 - x64 (KB3208177) +$outputFolder = 'c:\sqlsyms\13.0.4411.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/268a89d9ed10413ba41fe54bf2d75b1e2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c9ead68f28c24061a124762b8351b6f82/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/74b5f464baac4a9484c931946ae5b68f2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/3c313be76f2444939a67caf043f53d7f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/84c8f12c82c44a1392d6f65ef1a318b52/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/549f12f6d342442cb72a078cabc0b0362/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e2fa7e5dba454b9b88a2a1d96b467fd01/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/751d83a8390f4faba2ebd6aafac7f1d51/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1b95571d967d4731b5e72ed855f469111/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2821e0a9f1074075bdda62de3e7008c61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/826a7546f2db4f3089d413578a2cdf882/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4411.00 ((SQL16_SP1_QFE-CU).170106-1315) +``` + +# SQL Server 2016 SP1 SP1 - 13.0.4001.0 - x64 (KB3182545) +``` powershell +# SQL Server 2016 SP1 SP1 - 13.0.4001.0 - x64 (KB3182545) +$outputFolder = 'c:\sqlsyms\13.0.4001.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/1d3fa75eb35540e287b2e012d69785df2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d38058f49e7c4d62970677e4315f1f1c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/cb9e5b8e0483423cb122da4ad87534d52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/13cb00e6ed4d46789fadceb55abddfe92/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c6d08b108b154f8b8431f090dbaab1c92/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c1220065fb9e4e61919175ac9792a2bc2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f0fd3061c4be4486b3308828ea99276e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f53682311a4e427ba43cc7908850cf9d1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f42433ff7c4b4c52b53875da10d4684e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/961e76a609b04a7c935cd8ad827f23381/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e6e24f9a081b42e3b9e22e1f6414b9b22/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.4001.00 ((SQL16_PCU_Main).161028-1734) +``` + +# SQL Server 2016 RTM CU9 - 13.0.2216.0 - x64 (KB4037357) +``` powershell +# SQL Server 2016 RTM CU9 - 13.0.2216.0 - x64 (KB4037357) +$outputFolder = 'c:\sqlsyms\13.0.2216.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/2c007938542145638d786ebdc67c1c9b2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b6c9ba6727b14530bf871a406d0724802/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/477e9070b1e642a9b166ef3b07e1687b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/8946accd7bb14ec18499ee4c4e5e53812/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/57cbeb8f33464fb69f691482ce8de8d42/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/abd45d29f555480fadf1990a92e34b252/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ff1fa69bac4f4a6ea28eea880c69588e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/f56e5624d87b4a708ca9f6667aba68a71/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1ca1e6c22cb548b296414dc80c64f4ef1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0842b22e9ff84f00bfb066e5a557d3051/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e7ba978114ac4b5b9c032b8f1e1be2222/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2216.00 ((SQL16_RTM_QFE-CU).171109-1343) +``` + +# SQL Server 2016 RTM CU8 - 13.0.2213.0 - x64 (KB4040713) +``` powershell +# SQL Server 2016 RTM CU8 - 13.0.2213.0 - x64 (KB4040713) +$outputFolder = 'c:\sqlsyms\13.0.2213.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/7a0af19f84774e599332cd0db1f1278a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f70df0f1cf3d45b5988d87fa813fe74b2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f3809f64b9a8419ea5fa8f35a32197452/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7faa03153e474bcc9d8205a253de66df2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/96aa656777b0457e9b21ebda6ec38f1e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/64c55c4c8b894ec191c9a512d64d05932/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/2610adf0ecd04828af0815caf79e19351/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/901b0c2906cb48e99fb09e1e8cbe9e751/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e47bab9e66704c33be9edb1c3468aee41/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/07f0e5afd4634724b92cd6d5ac50fbcc1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e8186d9274b8415c90bea6dbee62765d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2213.00 ((SQL16_RTM_QFE-CU).170905-1430) +``` + +# SQL Server 2016 RTM CU6 - 13.0.2204.0 - x64 (KB4019914) +``` powershell +# SQL Server 2016 RTM CU6 - 13.0.2204.0 - x64 (KB4019914) +$outputFolder = 'c:\sqlsyms\13.0.2204.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/cfb9f1f67ed94f2ca6ce13a87b281a912/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e319d277318a43f7bdbfaf7c09e8ea0d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f85c7c7fbcfe4fe2bfde5a9d3faaede92/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/0bbbf57d7cc6413fbdade7dd8e806f682/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/10777de046a746f1b118cfcc17d06c2b2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/0152302a8c624ace9201fe5842e87e012/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/3b988c8fe7f04e3f974a275a0eeeeb0b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b7d84e7993fb4451b2cd97adae2171001/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c6b1fbc9d12d414b906f7be297838d8a1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/788729ffd2354809b96f60469725732e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0e8610c36c354d36986910b6ef9f99f12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2204.00 ((SQL16_RTM_QFE-CU).170420-2326) +``` + +# SQL Server 2016 RTM CU4 - 13.0.2193.0 - x64 (KB3205052) +``` powershell +# SQL Server 2016 RTM CU4 - 13.0.2193.0 - x64 (KB3205052) +$outputFolder = 'c:\sqlsyms\13.0.2193.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/29fff1570c614d079dd399bb465245ba2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/51387eb8f90f4726aa9df7dd8a937c432/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/bf13531c7d694d729c441c09b114ba5a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/37c497fe00574995b2275c82bd5448222/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/db92e29b6d7a40a8b447c044382186f52/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c564d1d1af464ec4b23625bc349021e82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d83d9a08a6304475973f8c1527e9a18b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c9179764a88745b6b27d0340adfe00da1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/0a6f9df489884c5aae89b04a707f77991/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/db44013b2c72466ea3f22c14bdedc55f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/0e65448c6e524b05b5e23432481867792/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2193.00 ((SQL16_RTM_QFE-CU).170106-1104) +``` + +# SQL Server 2016 RTM CU3 - 13.0.2186.6 - x64 (KB3205413) +``` powershell +# SQL Server 2016 RTM CU3 - 13.0.2186.6 - x64 (KB3205413) +$outputFolder = 'c:\sqlsyms\13.0.2186.6\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/2ff2ffcd1aec4430a320031a5b39932a2/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/7a54654444b3498ea417d266f13be4852/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9554edfa9c98497691f273323bcb95cc2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/c8625b8816e14ab5b1ff2831407f971f2/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/3293fd4acafd48539b54f36145afa5a62/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/2581ec9c9a2d477fb3e3b1d87b7a7db42/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/dcb6d2efe1284ce697e4291b198fccce1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/38d5d0c4e3e94a128f0e8e61535485481/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f198f8dfc2304e189df71ef4b47851fb1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/9535038ce47847eca6d1a33db6a7497b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f4a805d2b05c4cf0ac5538e5c9d3ef122/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2186.06 ((SQL16_RTM_QFE-CU).161031-1738) +``` + +# SQL Server 2016 RTM CU2 - 13.0.2164.0 - x64 (KB3182270) +``` powershell +# SQL Server 2016 RTM CU2 - 13.0.2164.0 - x64 (KB3182270) +$outputFolder = 'c:\sqlsyms\13.0.2164.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/940eac419c934059b710be37641e39112/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/61e79d07815549199699608cf3ebd8a22/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/0b0fe3a447d74fec8396a46cbcf4ade42/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/7aee76c9772241c4abab13ba1d825bc02/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/fc8265399db44d05bb66cf0c53d3a9132/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/43431b47b3c242f2a76e2d5ca301d0372/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/956fcfce5bc348a9abe7db682dc7a85e1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6dc828b4ac564e199c26106da4394a591/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6e06587843f44870abfb873c263bdd581/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3717f27071594c5e976040c9e18032df1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8c33d4ecd80a4de683073c4e36fe87242/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2164.00 ((SQL16_RTM_QFE-CU).160909-1949) +``` + +# SQL Server 2016 RTM CU1 - 13.0.2149.0 - x64 (KB3164674) +``` powershell +# SQL Server 2016 RTM CU1 - 13.0.2149.0 - x64 (KB3164674) +$outputFolder = 'c:\sqlsyms\13.0.2149.0\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\sqldk.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqldk.pdb/175d1d9f3e3f4aa5b25e8defb354e9282/sqldk.pdb' -OutFile "$outputFolder\sqldk.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c887519f85984f93a45d804fbd9efa7c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/52a90f506b934a63bee7f9acb3ecbd592/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\sqltses.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqltses.pdb/9285360a585b4659a9178b94d54195e52/sqltses.pdb' -OutFile "$outputFolder\sqltses.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/431d7cd65d56492084619a4f2be7de342/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a4c480d343034344a88ac1b39f672b152/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/501ffaaba03a405c942a3636f744d86f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/df614cefd0a64503b3f9a8b8e28d62ab1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7f75cde05cd84c74b27b97fde6200cf21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/986ce3d6b4334bacb5c924134d2883971/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d67b0283c81c4a93b4d4ede2af0cec522/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2015.0130.2149.00 ((SQL16_RTM_QFE-CU).160711-2134) +``` + diff --git a/Errors/PDB/SQL-Server-2017.md b/Errors/PDB/SQL-Server-2017.md new file mode 100644 index 00000000..2eac5632 --- /dev/null +++ b/Errors/PDB/SQL-Server-2017.md @@ -0,0 +1,522 @@ +# SQL Server 2017 RTM CU21 - 14.0.3335.7 - x64 (KB4557397) +``` powershell +# SQL Server 2017 RTM CU21 - 14.0.3335.7 - x64 (KB4557397) +$outputFolder = 'c:\sqlsyms\14.0.3335.7\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/eb5a565f1039423ab57f1b0c07f2cf062/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a95c4feb63e24e859cc3ea84c66738362/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/15abf4bc294f43439f8d26bcc081b7852/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/0b714c2255d248be8e2772ed2614c3252/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/cfa406dc3e6f44fbaecf3bb7bfef85403/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/74e2955f444d4a999afc17aebfc101b62/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e2a53588492542619e2df6eb2f15fbd81/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0611eac031eb43e1ba9b7df173a4baaf1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/bee1e0c4ebf047f58848229e8e8080301/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0f83d02887a64bb38055cec85d9816351/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ebf1bd99202241e49994b70abd89b06c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3335.07 ((SQL17_RTM_QFE-CU).200613-0316) +``` + +# SQL Server 2017 RTM CU20 - 14.0.3294.2 - x64 (KB4541283) +``` powershell +# SQL Server 2017 RTM CU20 - 14.0.3294.2 - x64 (KB4541283) +$outputFolder = 'c:\sqlsyms\14.0.3294.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/bee1fad8fac344258a08781c73e86ed52/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2a5c5b4ca34b4406b4458d69ac3e4cae2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3875b7d16696416f9301c11cef45b20d2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b50d619829294819a0b07403e79e9ded2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/32ca1afe76d247de8ddeb0b8bed119763/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b33c89a9f1bf48dab0da20e1e1f14b372/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/13f6629965894b1a898d22a6075e9d321/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/c56991f0bbb44efd9550bdb640b930921/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c57fd569df0c4b71827c8a73da6ff82f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/120c44132c254546a280305c87974fd41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2187f716c3254ca882a146416b6231d92/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3294.02 ((SQL17_RTM_QFE-CU).200313-2113) +``` + +# SQL Server 2017 RTM CU19 - 14.0.3281.6 - x64 (KB4535007) +``` powershell +# SQL Server 2017 RTM CU19 - 14.0.3281.6 - x64 (KB4535007) +$outputFolder = 'c:\sqlsyms\14.0.3281.6\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/77d53ce9ab0d4543b6625be66af453422/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e19ffa5d57f24259a2a98fdd90289e152/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/f421b91603c34ba99b30746fd8059d772/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/672558a3b8504bb0b1dd7bcd11f9c84a2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1e174cf6018a4087be3d9fb563fe1b633/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/971fc73e739647b8998f3a158cdeee4f2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/84c15d654b424537b1947ac49c2bffef1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b69205eb69a8423dbec803e670916fe51/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7eec0edeb9f9430c9958d3a06448b6c21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2a200d24c4da4a678c4ebe925100e6e41/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e13e064b30614472be3ba2d950f0a78b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3281.06 ((SQL17_RTM_QFE-CU).200124-0352) +``` + +# SQL Server 2017 RTM CU18 - 14.0.3257.3 - x64 (KB4527377) +``` powershell +# SQL Server 2017 RTM CU18 - 14.0.3257.3 - x64 (KB4527377) +$outputFolder = 'c:\sqlsyms\14.0.3257.3\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/0cf29846f3c24e78ad6c68ffc23c958b2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/edc4c7b44f9842f5ba869f71b5d409d72/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/e9b9a716dd8a4c80a1cde404d18ca8142/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/ee0cc71e1a194e49bbb83839ce3b7f342/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/18f1fdf24e1c4a2b8a647f005476ea353/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/92014d8cf1724ba281afe5be39449fce2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/88d125cb6c734230bda07306dc5a44971/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4f77a328940e448e97c9bb6e817b34c71/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2572674dae244c15af96c8fb8dbc76891/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ae6fdf41e3a34796a31096c15ffe09b71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/46d8ae1b2f884ce8bd9bbf46c2a5a54e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3257.03 ((SQL17_RTM_QFE-CU).191116-0848) +``` + +# SQL Server 2017 RTM CU17 - 14.0.3238.1 - x64 (KB4515579) +``` powershell +# SQL Server 2017 RTM CU17 - 14.0.3238.1 - x64 (KB4515579) +$outputFolder = 'c:\sqlsyms\14.0.3238.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/5e50e02ad0cf43da8949c7caa26c49f92/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/fdb5ae5d994745f5b29bd9e5a44cfbac2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c4ff40dd1b834161b04985c7e21556dc2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/4bef8588459043f89f045f2cb9956e342/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/4bf28ededa384502a61929dae625e0833/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ac756fec0f804ed4b6bc3fecccb7ed152/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/2d58e76525314e67b7158d5b971973471/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/41ff67e8d1d94d7782771b2ceb7d91461/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3567f1e7bd304700a1315891a9bffcf21/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/74418625e16d46dea9c4dabf1f3c97711/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c3a61d285faa4b848c2ad7e7b02c54742/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3238.01 ((SQLServer2017-CU14).190913-2228) +``` + +# SQL Server 2017 RTM CU16 - 14.0.3223.3 - x64 (KB4508218) +``` powershell +# SQL Server 2017 RTM CU16 - 14.0.3223.3 - x64 (KB4508218) +$outputFolder = 'c:\sqlsyms\14.0.3223.3\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/cc2cb01a74b84342bad196721c4b229a2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b6830a8a29e746f7a9e334bbc16f73cd2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d4be23dadfa94b4eaedf98e747a35f7a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/60134c9480e24546b6dfcfa95981db792/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/942175c9b9254c3a8143db7613f4720e3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/3d22f9effe75470b9cb73b22e30ee0042/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d172da872f4f42faa859e1e262d8f1fe1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/2945c675b7f4457892e17485e328b6e11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/05671d5db5a04a3e87f616b6a172e64e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3ba3e96155514539bf263e91196a59591/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/238777599d2342ada234a90d46ae10cd2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3223.03 ((SQLServer2017-CU14).190712-2335) +``` + +# SQL Server 2017 RTM CU15+GDR - 14.0.3192.2 - x64 (KB4505225) +``` powershell +# SQL Server 2017 RTM CU15+GDR - 14.0.3192.2 - x64 (KB4505225) +$outputFolder = 'c:\sqlsyms\14.0.3192.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/122fc135abf24465ba9e6be0a6274eb32/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/207221dfd01a4ecda2e45a5be4afa8342/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7f9c184f5b2944cc8c1bdba07670f8412/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/9559bc0f3b5e4cef8a84ce08601fe3df2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/24b12b3f43be4a27a4139c39849ef5e33/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/efd30261c88042a2a49e19b21f90ef002/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/cb6a1cd50b654d0a8474f4ed74255e6c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/139c16954bd04111a21c3d8e834e5ea41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/e0243d6070c94969a2aabfc1c32fb0a61/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/439bff18122840658f0e9240ffda29301/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/107813d2dfe94332aec5cba570dfa4082/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3192.02 ((SQLServer2017-CU14).190615-0703) +``` + +# SQL Server 2017 RTM Hotfix for CU15 - 14.0.3164.1 - x64 (4506633) +``` powershell +# SQL Server 2017 RTM Hotfix for CU15 - 14.0.3164.1 - x64 (4506633) +$outputFolder = 'c:\sqlsyms\14.0.3164.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/5f0e68f3162641ad8d035c501c0b697c2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f90eacadd1904231a7dc6326c4ab53af2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7ef8fc8b0ed04a9f9dc7872b2ddb5bdb2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/05f95c5ac74d4eb599b922c69dbc39c12/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/6775b239a8fe440ba6bdae93bfcb524c3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/2be30f46dc9c414aa6ec8855811226fa2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6c08af17cbcc4ae6b47b9b000ba2df9f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1f39d18ce9124de3a8af1fb9bf3b16b21/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/beef7d8475d8486bb1acf9603c370d9b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3c4f56edb20a4d7f903ea7985ee392551/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e5610121ea0b430ba050cfd7de9a55a72/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3164.01 ((SQLServer2017-CU15-OD).190529-2332) +``` + +# SQL Server 2017 RTM CU15 - 14.0.3162.1 - x64 (KB4498951) +``` powershell +# SQL Server 2017 RTM CU15 - 14.0.3162.1 - x64 (KB4498951) +$outputFolder = 'c:\sqlsyms\14.0.3162.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1dfc724617524d0b81e6c9bfe5a3fa922/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/5b6770d3a2954ad38fcf61d69b2406f62/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d912ea3687524101b23bc88c89be16062/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/7e76c3114d2445fb957c7e2f8d395b722/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/f5a9dd15f9e0443cbabb7b93f9d76b233/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/e5f4295c75c6451a885b0d60309760772/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ba6e8c729b7f41a7b6863e2c11cd13561/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/1b3d232725c54f5dbd6e80715545efad1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/67e2b8702fa745f88d74d149c65524b81/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1b81dfc91133481ab49da77d8e57f3c61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/d7da732da1224c3dbbf571c85cdf65532/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3162.01 ((SQLServer2017-CU14).190516-0147) +``` + +# SQL Server 2017 RTM CU14+GDR - 14.0.3103.1 - x64 (KB4494352) +``` powershell +# SQL Server 2017 RTM CU14+GDR - 14.0.3103.1 - x64 (KB4494352) +$outputFolder = 'c:\sqlsyms\14.0.3103.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3d4403b9c1644b51ae4e8518d6ce10852/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dd1cd60ea219405ba26b3549a087d7cd2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d8204dcd590548d0886483894461e2712/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b5b369edbeb54c34929c63aaeef0c56a2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/6e83a97d29fa45dcad8a1531728528103/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/201a31638edb45cea8fc7e3089c1b8bb2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ccbb2144f26d47ecb0117313489d42d71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/8e895540bc1b48b1ac1056481e757a001/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/02e0af9b69b241f4a9f63962d2f7b3e51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/55a7586e0a684168944bc84d8b3f3a7b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/13efe2857d1f407d8c3eafab072d28812/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3103.01 ((SQLServer2017-CU14).190323-0508) +``` + +# SQL Server 2017 RTM CU14 - 14.0.3076.1 - x64 (KB4484710) +``` powershell +# SQL Server 2017 RTM CU14 - 14.0.3076.1 - x64 (KB4484710) +$outputFolder = 'c:\sqlsyms\14.0.3076.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/9dc4b5b9129b4d90aca76c656a8a7cdb2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/12a634d42b0a466fa8892f030ec414cf2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5a0ee5562cf744fe87b6f8f0e66342a62/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a9e9815a726f4f658305f67cbcb7ba432/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7b7b6d8bbf4e4baba8437e4623514f163/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/74bda280c8e8462b879a8d1c6684d8b32/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d9b0c3d63a0d48ce80d7ae4e6bd2faae1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fb39d136087c4150905913a5a901dd081/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/4a46951e68434ecd93a667401da5c63c1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ed48cfbb0bcb463b8ca48ab657da16221/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8505782dfd8c4d589bb569f27dda72282/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3076.01 ((SQLServer2017-CU14).190313-0159) +``` + +# SQL Server 2017 RTM CU13 - 14.0.3048.4 - x64 (KB4466404) +``` powershell +# SQL Server 2017 RTM CU13 - 14.0.3048.4 - x64 (KB4466404) +$outputFolder = 'c:\sqlsyms\14.0.3048.4\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/db7d37e644684c76aca6244566f04ddb2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/deb451448a184a019d15fbecb4b3dbd42/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/154b616962204fc98ab8ba2ac0944fd62/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a8ea1f9fa4a8417b901a2e9c1108cd532/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/162006a3c04048a5b3c3bd6db4d37d5c3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/254e81f1cf6d407188805d66c3fc8a002/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6ad53123fe984297bf11178b0f6833b61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/64e83552a4324544b14f7ad910d6dbd31/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2750700543774a219883ff4fd8f9b1c71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/045b89b9000c427aa2d7eb19476ead711/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/bb0704a30a134cc8a0436285de13449b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3048.04 ((SQLServer2017-CU13).181130-2004) +``` + +# SQL Server 2017 RTM CU12 - 14.0.3045.24 - x64 (KB4464082) +``` powershell +# SQL Server 2017 RTM CU12 - 14.0.3045.24 - x64 (KB4464082) +$outputFolder = 'c:\sqlsyms\14.0.3045.24\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/e1a278df9008417880471554645ffe0e2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0f960e0b699d427db586034ed7b0fdef2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3901620f11594833aa71280f8375f0be2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/9cfe911d498646b8ae4f2f50a9d067a42/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/27ed7bd2e8a7400e886335247c98a3073/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/9ab679cc975b4b1ba1d15706afd6450a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/d2812bf323f14d81a9b099908c9ffff61/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6615c4c7be0c407697ca045825239c131/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/196df91bf910437c9fd9acfa2117826f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6cc447fe65eb4c59aa455ccbf9b251a91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/5cc64f878ee841aab5448338015a5c952/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3045.24 ((SQLServer2017-CU12).181019-0539) +``` + +# SQL Server 2017 RTM CU11 - 14.0.3038.14 - x64 (KB4462262) +``` powershell +# SQL Server 2017 RTM CU11 - 14.0.3038.14 - x64 (KB4462262) +$outputFolder = 'c:\sqlsyms\14.0.3038.14\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/33fb5fb0d73a441090eb718412270dbd2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c9ed01ded3264172a6a840a1510a9e082/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/58093a59f19b4a3398ce13fe13ed92ab2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/93188b40fdeb4d9b84f1b0825df6e5402/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/652be97b165947e18523339f10380c3e3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/056712b91a6b43a98b8ddb86e19d07832/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/767d4249b3b342ccb953f3ff28a3477b1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/eec4e581cc1e4e9289b0ff1027f761c21/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/95f766b77d5340cf91e4237c1b5cb1d11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3da659532f314c3d971b21293e4fbf911/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4ecd8c32a3744a72b86f59e40106e58f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3038.14 ((SQLServer2017-CU11).180914-1944) +``` + +# SQL Server 2017 RTM CU10 - 14.0.3037.1 - x64 (KB4342123) +``` powershell +# SQL Server 2017 RTM CU10 - 14.0.3037.1 - x64 (KB4342123) +$outputFolder = 'c:\sqlsyms\14.0.3037.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/bd9f49c63360495684146dfce60449ca2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a7ac68d2a55042d4b014d983ca4dc5652/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/89f5a5f6f6cb46308ee263616e47a1e52/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/73b2fdabd985459abcf4b906d49acabe2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1914abc38f5c4d259a75f0d60f99fb503/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c440983f340f41279499f51c06f0796a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e67f311e495e452cba574599785f478f1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/007f32ffc751482cab8cce28fae4eaae1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/d1e4131926fb4197a56f62d1aec4b0891/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/04067943d1b14ed58777d6bc6307223c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/7726181ee6a44f1bb557e413279dd4ab2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3037.01 ((SQLServer2017-CU10).180727-1609) +``` + +# SQL Server 2017 RTM CU9 + GDR - 14.0.3035.2 - x64 (KB4293805) +``` powershell +# SQL Server 2017 RTM CU9 + GDR - 14.0.3035.2 - x64 (KB4293805) +$outputFolder = 'c:\sqlsyms\14.0.3035.2\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/2cd60104c58545f8930beb63ebc961542/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/0960eef2f5f74555a6bc0201f30b2dd32/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c48a041fc73742acb92a2483901e3e232/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/97b1e169ef954a2fa0624d2da36be4712/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/04a742d9881d40f69a5b7d65befc114c3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a91a2cb72c0b4147ac810d5c0fb0b1822/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/17e84ac011b740de94a0e096713ed7061/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/89f68be128904de1aa86fcb9815538161/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f2c0eb19ab6b47609637f59efac0a5c71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0f67bd671bda40e7b9498d504d67d9c71/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2fed6d1f4fc74711a8088b94f98d10062/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3035.02 ((SQLServer2017-CU9-GDR).180707-0051) +``` + +# SQL Server 2017 RTM CU9 - 14.0.3030.27 - x64 (KB4341265) +``` powershell +# SQL Server 2017 RTM CU9 - 14.0.3030.27 - x64 (KB4341265) +$outputFolder = 'c:\sqlsyms\14.0.3030.27\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/66034bb7692f47b68d91508392748a702/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/cd0f72d319dd45b48226d59a0a4d1b942/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/d62f64ac53a647e4a5be66a50a609f542/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/cd65ee0c97594540ac37cf1346fd46072/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/20879ea42b6046c6ac042fd5917732433/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ffcd6d3fd4724d65b7f0c3c1dcd3bbbc2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9af640605b0941d9b7934ab9eea3acdd1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/31ea27e79fc14bb991e62f4060d7c3a81/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/7805edcb819f4e70ab4d14520165787f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/097b87a6547a4e8d87b2f63f8b514e0b1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/764a2e690ea84ab3943f336482774e932/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3030.27 ((SQLServer2017-CU9).180630-0026) +``` + +# SQL Server 2017 RTM CU8 - 14.0.3029.16 - x64 (KB4338363) +``` powershell +# SQL Server 2017 RTM CU8 - 14.0.3029.16 - x64 (KB4338363) +$outputFolder = 'c:\sqlsyms\14.0.3029.16\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/5525b238911a499ca15f316ab6c962822/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1399d2afb4264c55b70e45f70f798bf22/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c50bc63f8aee470a99e4662f43e0d0522/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/35d0d8eb3c1c437ba654cb78cd4fa1e62/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/e2ba4bb806624faa8bbacdae707e61163/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/404b3fcd8cc841ccbe0003b3dfb189f02/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/281f91e3d7d14f3faaa9992d00ba32991/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/28abba31fdde432389c3beb6641c86b61/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/10393de02ddd42ae80046a075942ed4b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/3ed5a913bd7f49e4b00d13e1e0d96bd01/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/78fd9b633d9d4f15b3fa6cef32db99d72/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3029.16 ((SQLServer2017-CU8).180613-1911) +``` + +# SQL Server 2017 RTM CU7 - 14.0.3026.27 - x64 (KB4229789) +``` powershell +# SQL Server 2017 RTM CU7 - 14.0.3026.27 - x64 (KB4229789) +$outputFolder = 'c:\sqlsyms\14.0.3026.27\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/10da85787e1149a58e60e6c0b2c7a1552/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/65dcd0640108491a9e0de5ed8058f1fb2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/293ecb04af0f483b898462dba64e945a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/3799cfd261564e5ba73053afe3e0b60c2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c236c6b5eced44c3a22b1b7779f989d33/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8d9a1bacfae04c508cd2852cfc3d4e912/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6fc5beab5b2b42d9b0575f3e384038f51/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/946a419bcbcc44d08c05275adfb3dbc01/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ed1e63b89e7743619a7f541d831943f01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/2747080059f64f4ba2a97a69287d05e51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/37b0126ce3264429b7a3070d9c7ca29d2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3026.27 ((SQLServer2017-CU7).180510-1901) +``` + +# SQL Server 2017 RTM CU6 - 14.0.3025.34 - x64 (KB4101464) +``` powershell +# SQL Server 2017 RTM CU6 - 14.0.3025.34 - x64 (KB4101464) +$outputFolder = 'c:\sqlsyms\14.0.3025.34\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a98a782c58784e29bbaa2c211b0f5c682/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f24aacbfad9e414285f7046d1d48d2be2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/42522ba8c70843a89dd2cbe8af1bb4b32/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/b4e8225ee505470da1c3ae7cd8b872e12/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/02573056bbd745149600abc3fda59b873/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/75e13c8cab1140ff95e0a8be1561e5f52/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e9265ab70bc24f7892140a0c56c8fff71/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0b7a9ff5214245c7935cedb57471d2b71/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/99e106f3dc9d4485910ca051be7c7ead1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ebfd29864c4549c48179f4a037ac91271/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/ae60023494ff4dd7a992cde1dbedd2d52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3025.34 ((SQLServer2017-CU6).180410-0033) +``` + +# SQL Server 2017 RTM CU5 - 14.0.3023.8 - x64 (KB4092643) +``` powershell +# SQL Server 2017 RTM CU5 - 14.0.3023.8 - x64 (KB4092643) +$outputFolder = 'c:\sqlsyms\14.0.3023.8\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/109e36e55c01403497cc5d50c579d8532/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/bddaac25fb1f426da61e50a94d7fc9ab2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b1507220d6954a02a8b70fc6a55ef15a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/3741e4701fc3405b96394985517ff8a02/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ac8d8709958847f8a0acfc7d842689343/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b32f21bc37674e1b935d03ad80b368f42/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/457d193fc3f44383aceee37f22beb4ee1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/6051c5232f1b45d7add16da0ffbd40561/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/ae5d32ddd37e4201b4deb372cd8eeace1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ab8e5af83878473e9872fa70607103c91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/691d47cd1fe84e27beecb625888885242/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3023.08 ((SQLServer2017-CU5).180302-2330) +``` + +# SQL Server 2017 RTM CU4 - 14.0.3022.28 - x64 (KB4056498) +``` powershell +# SQL Server 2017 RTM CU4 - 14.0.3022.28 - x64 (KB4056498) +$outputFolder = 'c:\sqlsyms\14.0.3022.28\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/57d7c3c8a5d0448e80136b24d0fff1c32/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d579a66e0be244f4933f70d895ea0ca72/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3b96d064c2a7446b8bf27f889a05c5f82/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c0a46b4eda834af696bc62f1f25d2ed12/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/98358edb8975452a950cf30afd43dacb3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/d2356ed3f2a54cd39d5b0d6c67c270b02/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/374a04e072bc477297ac9c32d1cec4761/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/ae215b6a707a4db08bc6442bd43ac11c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/076f3b18167d41edbd98e8898113cad41/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/69e152bad2594a2cb66eaeeaa412f1611/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/6061b66f34624106bafd4ee77d938d8f2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3022.28 ((SQLServer2017-CU1).180209-2025) +``` + +# SQL Server 2017 RTM CU3 - 14.0.3015.40 - x64 (KB4052987) +``` powershell +# SQL Server 2017 RTM CU3 - 14.0.3015.40 - x64 (KB4052987) +$outputFolder = 'c:\sqlsyms\14.0.3015.40\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/fd63f54995484f9cada261048b448e362/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/8e5e48eb780a41c496ec3aff3e0470dd2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b882d062f0ae4f3a826bdae177e2f6ae2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a56fa639b1be44b791f33e70221a74d42/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/35e6d755c08b44dea0288b8f4c8be7e33/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/a90c29baa7a945e79a5f316c1c016de92/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a1723bbc5db04c588a7c8090f24732931/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/84fb90a5783b4d3da9f829e36dd5e4f11/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/72cc987076974daead0760fbfc9e06dc1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/8041f1f6e7894ae08d6acdd1ed3988d91/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/422ffe74342b4124ac700e11127116952/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3015.40 ((SQLServer2017-CU1).171222-2334) +``` + +# SQL Server 2017 RTM CU2 - 14.0.3008.27 - x64 (KB4052574) +``` powershell +# SQL Server 2017 RTM CU2 - 14.0.3008.27 - x64 (KB4052574) +$outputFolder = 'c:\sqlsyms\14.0.3008.27\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3138403f1ce44cc1969afc40973749f12/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f1a833a2d2c34202b7302121de112bd32/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/40d5a1efad844abfa5a689f2e49153e12/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a1dfaae5bf0f4d5691487e1d7ca137fe2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/abc003696f9c4269b13c4e246bd6d10e2/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8d19325e37f34ec5b6f4ebe1ea29978e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/9496aab8e37448c5ad97fde8635a3d201/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/d984365873cb4a10a728e6f95b206aef1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/5c90a79531e94e37ba58d8993b04e1201/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/edcf09de5c5a482991e58e26301562341/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/11a2d383108e4e49bac7214a5c4e7c2e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3008.27 ((SQLServer2017-CU1).171116-1722) +``` + +# SQL Server 2017 RTM CU1 - 14.0.3006.16 - x64 (KB4038634) +``` powershell +# SQL Server 2017 RTM CU1 - 14.0.3006.16 - x64 (KB4038634) +$outputFolder = 'c:\sqlsyms\14.0.3006.16\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/87eba05ec89242d9927509fa7cd4df222/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e801003d9d0e480aaf2a9961f14722be2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/5eb2d9b1ed7647099675595f5c1af9542/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/dfeb0841aebc48fc92d2ebce8243d6b02/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/133d9c8bada14ea89a11c0c505f8c2412/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/c7ef60b6dc0c4068a48974e6dcf589e42/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/e1feb096228e45b4ad3fd948d10b06f21/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/fc74cd37bd3c40f1a63232f24b9861621/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/88d42585c0844b0493b3383459c778cb1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/85149cd8bce34a5d80e738205084b92a1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/641d7dfd397d4232a6cf7ccc61db3ec32/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.3006.16 ((SQLServer2017-CU1).171019-0548) +``` + +# SQL Server 2017 RTM GDR - 14.0.2014.14 - x64 (KB4494351) +``` powershell +# SQL Server 2017 RTM GDR - 14.0.2014.14 - x64 (KB4494351) +$outputFolder = 'c:\sqlsyms\14.0.2014.14\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3b83b1a537f04ab3a16e88432d682bcb2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/d72fae04d4364d2f9fddc737646f1baa2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/51b6292d90284698b26fd5785f1470cd2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/74cac1ac260d4f90b5c2e3d16bd2e1fa2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/bf2dc2594f0045b287cf32f04ea6dc033/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/1f4bea33f4a44fcbbb2ed8b1b636dc442/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/962db9f1c6a34d7bb306a6b5a9eb43821/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/20bb3d988bee43fa8b73251c97892d9b1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1cab94f0f12f4c0dafd50eaf20df7ae51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/a54634c716264671ad9b42292c6d6c751/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/408c96c6da754a7f9ea16fd4e961910c2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.2014.14 ((SQL17_RTM_GDR).190405-1545) +``` + +# SQL Server 2017 RTM GDR - 14.0.2002.14 - x64 (KB4293803) +``` powershell +# SQL Server 2017 RTM GDR - 14.0.2002.14 - x64 (KB4293803) +$outputFolder = 'c:\sqlsyms\14.0.2002.14\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/eede151a1fe14c888e12bd2cd18499342/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1365eb638bb547fb8dda02460ccb1db32/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/3d765ec46087444a99857a8850ed91612/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/59c28b768a1a468d9a1d7c9e3e86c8792/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/c51ed42364994190bde46cadad32bfcc3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/67fa8e005f9e4dd5aa0f1eecd911e9fd2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/0f1a7721cd8e47319fec23bdc5ec7b911/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3ae9ebe14179453fa16c7790e4468c0a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/1986c63f87fd4b93aecba08c176afb911/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5b3e2b01fca64473b86112687e9633b51/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c11351f7ec7643bfa04d930c29d6d4872/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.2002.14 ((SQL17_RTM_GDR).180721-1410) +``` + +# SQL Server 2017 RTM GDR - 14.0.2000.63 - x64 (KB4057122) +``` powershell +# SQL Server 2017 RTM GDR - 14.0.2000.63 - x64 (KB4057122) +$outputFolder = 'c:\sqlsyms\14.0.2000.63\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/48cf4690e5f34376afb5a53a8f8ab45d2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/efc35e061a2a4daf97ee2bac1f6a96302/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/59f051256d4743af8f758d0645475b962/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/5e35faefffe6499b9489c56f061d804e2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/989ba51ed4984d1e8df0b1653ecaf3fc3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/20e66bce4c7f42f5837a7e65b84e7a742/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/db011824808740f7b2bdc935fde6ea301/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/77a3acda141547c1a6c80fdd4417d3651/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/177b8b95f7254a86a9eb266863bccfb01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/77e3bb72b6cb4714aafd8f36cfceccfe1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/4b38c81bae244806938fe19e14dfbf2e2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.2000.63 ((SQL17_RTM_GDR).171222-2325) +``` + +# SQL Server 2017 RTM RTM - 14.0.1000.169 - x64 (NA) +``` powershell +# SQL Server 2017 RTM RTM - 14.0.1000.169 - x64 (NA) +$outputFolder = 'c:\sqlsyms\14.0.1000.169\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/3cbcf6039e774ef7b3216ad46ed66e162/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/f188529c1026441ea07ad838452c34832/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a93a74f3276b4f14a8a57d6b42bf8ae22/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/e0a351d14abe45afbaef64d1f88cc9fa2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7db97580232143a99f64077925f11a9d3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/7be72e22126e41a0ba4a1589d22db4ef2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a042792795f74ae093210433b2ef4f5c1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/79032174ef0b4f9eac01826df8f5334f1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2cf7210d69f34a5484c0aa7010921c501/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/e1b7563a29b445e6aec1dc8739824fa61/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2270ab48523147ce8c3aa44993fb31bb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2017.0140.1000.169 ((SQLServer).170822-2340) +``` + diff --git a/Errors/PDB/SQL-Server-2019.md b/Errors/PDB/SQL-Server-2019.md new file mode 100644 index 00000000..697afc15 --- /dev/null +++ b/Errors/PDB/SQL-Server-2019.md @@ -0,0 +1,306 @@ +# SQL Server 2019 RTM CU5 - 15.0.4043.16 - x64 (KB4552255) +``` powershell +# SQL Server 2019 RTM CU5 - 15.0.4043.16 - x64 (KB4552255) +$outputFolder = 'c:\sqlsyms\15.0.4043.16\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/26dc3c5c64d84fbe9858e9751952614b2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/b7ecc728f4d145db8216e57082798f7f2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/e0e08efa82cf49839524d699fcbfcdd32/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/fb3bc1d1ea3b445e8b2d8f82af2c83082/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/2250bc823b6d45d78bbb1526118d5bcd1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f15f1bb425e345fbbbf9052dfff3009f2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/7119961e9948486980ac4126d67f28671/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a5e2854d1d5e4c1b9c354018f78c6ca91/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/822326dc5739477b9d02545c442b49911/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/5303b7b87c2c4e2789a75900f67989fe1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/17641aefa414415686ca0f4ad81a06a12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.4043.16 ((SQLServer2019-CU5).200611-0058) +``` + +# SQL Server 2019 RTM CU4 - 15.0.4033.1 - x64 (KB4548597) +``` powershell +# SQL Server 2019 RTM CU4 - 15.0.4033.1 - x64 (KB4548597) +$outputFolder = 'c:\sqlsyms\15.0.4033.1\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a17ffc040bf74b9da5f1c2f8bee3b0ae2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/007d639428594ba6b418a4031001af3c2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a0e96c634bcf469ba8d5739a3763b31c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/72be5cf0b1754f7990ac550066c59cf22/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/8cf1b3945a3342828669727df4b89a561/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/996fcbd6df90470fbf483f5bbc076f022/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/5e53ca24d90540b48d0c183348897c011/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/caaa30913c3f443fa2971996571662721/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/0727c20ffb694b7b966a311ba8a839ed1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/46e02f96623c4a3b980d6b915c81586c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/f326b1ebadce4ed7b63721256723d9d12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.4033.01 ((SQLServer2019-CU4).200314-2237) +``` + +# SQL Server 2019 RTM CU3 - 15.0.4023.6 - x64 (KB4538853) +``` powershell +# SQL Server 2019 RTM CU3 - 15.0.4023.6 - x64 (KB4538853) +$outputFolder = 'c:\sqlsyms\15.0.4023.6\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1f99f28740354638ab808a14641af26a2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/7ec066594c274590ad0e4284ecbb7e7b2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/6f5ca7b595704b1a83302a33ae4bc0232/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c5447784964c488cb3ec1370a45ce8a32/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ac8c33e259e74a37be1fba98de2d5dea1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b82843359f73486ebb55be54a8258a512/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/eabcb2cbd8734147826fc8e5fed91d051/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/67e76e9883cc408ab61bef65da8566ca1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/4aa18ea029164914a8ebca601fb086f31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/24f1b7e3408e46df88b53a0417eff0ec1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/e46cc8dbdfc540dda33b7bd994f636782/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.4023.06 ((SQLServer2019-CU3).200304-0805) +``` + +# SQL Server 2019 RTM CU2 - 15.0.4013.40 - x64 (KB4536075) +``` powershell +# SQL Server 2019 RTM CU2 - 15.0.4013.40 - x64 (KB4536075) +$outputFolder = 'c:\sqlsyms\15.0.4013.40\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/db2c3b3cd98041eebe71f258bb783cf52/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/79cc12f37c694a4cb246d9ff1006f48a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/135a7055bda8408a958cfd365c4a04342/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/8d85294d07c14151baa2c1fdcedb3d702/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/dc09a9a5bc5d41798cfd16759101bc0f1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/f6fa22f7a94744a3836e2e336677209a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/05c36542b2c44ac2b7e2b6718e4ee9dd1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b2a184d9e3704c63a988ad8a142af4e81/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/2d4753074ba64ba193ab702286a752b71/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/19e519afd6a34b2ba91458cbf5378e801/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/70258a046ea44af38bf97bb73a90df412/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.4013.40 ((SQLServer2019-CU2).200204-0018) +``` + +# SQL Server 2019 RTM CU1 - 15.0.4003.23 - x64 (KB4527376) +``` powershell +# SQL Server 2019 RTM CU1 - 15.0.4003.23 - x64 (KB4527376) +$outputFolder = 'c:\sqlsyms\15.0.4003.23\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1c28d53f4ce34500a0824edf754bb3182/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/725357d7267b4fcb8bed1520f7638ae52/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/872bec978b414b4894b0007d495aff9c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c2f014bfeb4148e79fa69e3bdf81fc232/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/9186d8f25f3344849c0afbd8086431c71/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/86c0928cbca241508082e6ae13a7b2ad2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ddc9bae1e79e4be38aba05b28f20ba481/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/9c7a349dca4a4f8bb2a405e2a36d7b091/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/f19350dff8c54443aee52644b816d1371/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6c2376ab69404cf89eea336bc33242371/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/db06d320fc1a4f1492e857d7804288672/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.4003.23 ((SQL19_RTM_QFE-OD).191206-2237) +``` + +# SQL Server 2019 RTM Servicing Update (GDR1) - 15.0.2070.41 - x64 (KB4517790) +``` powershell +# SQL Server 2019 RTM Servicing Update (GDR1) - 15.0.2070.41 - x64 (KB4517790) +$outputFolder = 'c:\sqlsyms\15.0.2070.41\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/35fa14a3b9874a72a017fadba93e24b12/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/1535e7976f0a431baf2704de5f2e5fdc2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9cb9edfe939f4b03b50222c9b39f196c2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/bdd5d0345b64423394986dc1a4a37e3d2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/01955e0a0c344aa9ba96522fb1ce96671/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/34e92930c4454a74acadc5f504d350f92/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/39717e154f0746668714cce86cebc6ba1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/e1295a820f7d4cb08ca66421bc0e872c1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/30c5297c5e244754a8e799717f9dd69b1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/69bd28349a494ebca2c0c0be7230183c1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/c0ead5152bae41f69d8dbcb210237a062/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.2070.41 ((SQLServer).191029-0237) +``` + +# SQL Server 2019 RTM RTM - 15.0.2000.5 - x64 (Nov 2019) +``` powershell +# SQL Server 2019 RTM RTM - 15.0.2000.5 - x64 (Nov 2019) +$outputFolder = 'c:\sqlsyms\15.0.2000.5\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/a32ecbddb336439994cc1bf8ca5612052/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/c451d01cb0d142afb1e497def47bd4b32/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/b69375ae56964976a91c384bda088abc2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c111d07e3fe9461cb21655d20b2f13e82/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d3cc4bb1711f45e5bdcbfdc6ce90400e1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/ee3b2b5f10024545bc623c768f8e98c82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b996f74062ef41f88e762d7cde413ca81/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a5b534efcad44ea4b8951a28847907031/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/139725cae1124fd19c7065ca5dd091c01/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/6e3e07ad09d6475aae40a87c8483f31e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/55586008647b45f49f51934563c320cb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.2000.05 ((SQLServer).190924-2033) +``` + +# SQL Server 2019 RC RC1 - 15.0.1900.25 - x64 (Aug 2019) +``` powershell +# SQL Server 2019 RC RC1 - 15.0.1900.25 - x64 (Aug 2019) +$outputFolder = 'c:\sqlsyms\15.0.1900.25\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/807730dc54d8486cbb301034d5c8e8d42/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/df94c4b01e8b47a7aab9cc2c24b425bb2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/176f91f058de40ca94e15eda8da9cc382/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/a3397ad3fbbd424eb40829ec9875fc832/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/7c43dc13a0244c34a87633c0b3bdf9851/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/e2f9e096f96e4860b8ba44cf4cc5a0a72/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/ca9b35071e0143df9136f86359a5ac471/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/a11cc82202ff404a9241a178f6c5c5eb1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/bdfab5fc03914efc839596e3476487e51/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/ebd4a16987eb4c8198107eca6471f4af1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/8f08dd3bcf934ea8933e21473ded4a042/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1900.25 ((SQLServer).190816-2101) +``` + +# SQL Server 2019 CTP CTP 3.2 - 15.0.1800.32 - x64 (Jul 2019) +``` powershell +# SQL Server 2019 CTP CTP 3.2 - 15.0.1800.32 - x64 (Jul 2019) +$outputFolder = 'c:\sqlsyms\15.0.1800.32\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/9c623f4336c24e489fd8dd3998f34cc02/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/e705bad3292c47e4b4d6963b8e559a1d2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/7a2bc2e75f4f4bc4ae68bbb4952c30642/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/9f16df7c1680418d83a375eb42883a312/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/85d769fd63df4a07b0bd03e683b3ac8e1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/fa2ccd5225de4ff3a33d2f28ddb69ec22/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1c3a00d0fa0a41d89e8f0b5ba2713f5d1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/886259b54c1246ff9884f355af67f1201/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/87b8448051c848149b5beb098d4880841/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/434635bff10945e8bb07c9f25339e75e1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/22541fc9a9034693b17da8546301e3bb2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1800.32 ((SQLServer).190718-0401) +``` + +# SQL Server 2019 CTP CTP3.1 - 15.0.1700.37 - x64 (Jun 2019) +``` powershell +# SQL Server 2019 CTP CTP3.1 - 15.0.1700.37 - x64 (Jun 2019) +$outputFolder = 'c:\sqlsyms\15.0.1700.37\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/9e557f85f9224d708abf2f557c7456e62/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/9af9b26e3fea49f1bd5b5367174bd9242/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/a6090023473742aa8f5c2fe198274cfe2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/e7708ef60f1d406f8bf6b05117dd8d962/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/12aa7d212fb14305bb582a9d0156079c1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/60706aa038aa4e84901a0eb75c660d452/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6b687fb2adab4f49b13169f0f6a6b1261/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/b96e03193f454e32a634e57ec66cb2dc1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/6b65fc282cf944fa9f3facf18303fa2e1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/0eed3325fb7f4ee085f479e484f5bfa81/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/51dbb121d73f4dbaa4640507a7558ecc2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1700.37 ((SQLServer).190619-1757) +``` + +# SQL Server 2019 CTP CTP3.0 - 15.0.1600.8 - x64 (May 2019) +``` powershell +# SQL Server 2019 CTP CTP3.0 - 15.0.1600.8 - x64 (May 2019) +$outputFolder = 'c:\sqlsyms\15.0.1600.8\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/8be214152c184afcaa324365f9c1a3b52/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/6bf39a278a27415e9aabfdb240d9ca612/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/c3e953f7f5704ce69b8ca62fbc62656b2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/8e72849826824e919215135180d284d92/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d0e0e82ed4be4852962c4ac90303107c1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/3986538b627e42b982a5c663fa9751862/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/866191ebab104dd38be0a902d87762581/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/38304f5776fc4982a96cf4628dcc51941/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/3bfcef2ebbba4702af4be06c10c06f861/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/25b7cfed794846d8acfed97c702ba2cd1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/a0d82d62e01542b9962d6093d402ebf62/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1600.08 ((SQLServer).190517-0718) +``` + +# SQL Server 2019 CTP CTP2.5 - 15.0.1500.28 - x64 (April 2019) +``` powershell +# SQL Server 2019 CTP CTP2.5 - 15.0.1500.28 - x64 (April 2019) +$outputFolder = 'c:\sqlsyms\15.0.1500.28\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/de490193e66048d4b8f93980b36f5cec2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/222c7b12b2d34c709a092e59249e541a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/ae39c1a85f294c068a7510b8c93814432/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/6916c4073925451ba18162d2b39980dc2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/1c80ecdf24d44affa414ab37a3a78f6f1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/af19898435d34f4e9f1dcda16e34b98a2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/f0f4f38d477a491db3fa7360b91551531/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/3f3eafd827f14c60ba3709af3fa2af791/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/09127f33dee145fcb2b1828163d986a11/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/dc460c45ed50496f9eff9c3fc107f46f1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/2fe2f4d6593444dca6294d8694cc01442/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1500.28 ((SQLServer).190415-2131) +``` + +# SQL Server 2019 CTP CTP2.4 - 15.0.1400.75 - x64 (March 2019) +``` powershell +# SQL Server 2019 CTP CTP2.4 - 15.0.1400.75 - x64 (March 2019) +$outputFolder = 'c:\sqlsyms\15.0.1400.75\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/19d870c6afaa43c9b925ace5a6c841d92/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a3a47799b1b64d928b721a14d2caa7252/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/14270b62941a4b98bd6c0f4e640ce7182/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/7348cf1b0b4a4fe6bd0a8091df4b602a2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/ad38a740f1a54a93b5ad507dcdd9d4d01/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/32664240697e4a6a99c56bbaa4b286a32/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/a6fad09bf4054c9697c38eb84eae5a801/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/70da4b6f6a574d47bba5cc811ec1046a1/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/dbd7a18fab2946f8a58c35c6bcdfa13d1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1b74c0360a0e4338a7d92cd8c00cd9d31/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/dde99a1492e84ef0926504cfe6afebec2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1400.75 ((SQLServer).190316-1802) +``` + +# SQL Server 2019 CTP CTP2.3 - 15.0.1300.359 - x64 (Feb 2019) +``` powershell +# SQL Server 2019 CTP CTP2.3 - 15.0.1300.359 - x64 (Feb 2019) +$outputFolder = 'c:\sqlsyms\15.0.1300.359\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/8d76a19c14344ec387a897611b8b8b882/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a3f62ef419b64a8c973a24150ba095b22/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/66abfc4397dd480f8873349e5edbfd142/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/c7ce4847496848b2ae3f24a282f479b12/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/a0f649ac82df495ba6a2a8fd818fb1dd1/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/33dbea5fbe0143d58286fe47f21605702/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/b1b0c9de60a14ec5a04f8f1cd80a75301/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/4293b10217714217a630622cb51ca0861/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/68bda83b7e99449987e9bdaa25a3abd31/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/aff6d1fc049e46028094cb26ee5fb9101/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/377253089c3e42168bbd7d13bedb1da52/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2019.0150.1300.359 ((SQLServer).190216-0730) +``` + +# SQL Server 2019 CTP CTP2.2 - 15.0.1200.24 - x64 (Dec 2018) +``` powershell +# SQL Server 2019 CTP CTP2.2 - 15.0.1200.24 - x64 (Dec 2018) +$outputFolder = 'c:\sqlsyms\15.0.1200.24\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/2c606b4367a4429c992d5ca42512c7282/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/a67be7179bab4e30bc9e9b2bf0a0259a2/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/9a0e2aabffc94c52a0c130ba253fe9712/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/d58e802ce7984e098a7cec464a001bee2/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/15d57320c04b444bb34709c58a93d1691/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/8eb24ab8cb084224b18cdb3aaa075be02/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/40669c7f8e7f4d33949b7c590b78ae581/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/48d913073c2c404cac8f449c33020ba31/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/71c0383ff3d64837baa474cb8fd46d341/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/25ac40a4dfb04d8d9e943259156c6eff1/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/eef4684b29ec49ada134bf2e5d266c7b2/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2018.0150.1200.24 ((SQLServer).181205-2233) +``` + +# SQL Server 2019 CTP CTP2.1 - 15.0.1100.94 - x64 (Nov 2018) +``` powershell +# SQL Server 2019 CTP CTP2.1 - 15.0.1100.94 - x64 (Nov 2018) +$outputFolder = 'c:\sqlsyms\15.0.1100.94\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/2396a09ad02847069a2932edada5013f2/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/2a859b14f55a49b18757dae8a9d431b02/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/84f83087a0914973a9378f1bd7391f0a2/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/4a0764a16a9f4862a294c68fa70d9e362/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/15a322a3311b4663b97cd77c55312efc3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/2c7c552e20814e7cafd031b4a5f55ff82/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/1861f31229a24d098ba62005e71ec1ed1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/0eefeca4685943f0b57d87091fda67e41/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/c9379eab5bab492cbbff0cec75549d6f1/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/c8e790ff4bdf41bc976393b733fae5521/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/28856cd400a64ae8bdd78eee5d1969a12/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2018.0150.1100.94 ((SQLServer).181101-2034) +``` + +# SQL Server 2019 CTP CTP2.0 - 15.0.1000.34 - x64 (Oct 2018) +``` powershell +# SQL Server 2019 CTP CTP2.0 - 15.0.1000.34 - x64 (Oct 2018) +$outputFolder = 'c:\sqlsyms\15.0.1000.34\x64' # <>' +mkdir -f $outputFolder +if (-not (Test-Path "$outputFolder\SqlDK.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlDK.pdb/1fb52db46791403f80a736a3a2892d872/SqlDK.pdb' -OutFile "$outputFolder\SqlDK.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\sqlmin.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlmin.pdb/dbb1be06cf8f47fab0354ab426dc85b82/sqlmin.pdb' -OutFile "$outputFolder\sqlmin.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\sqllang.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqllang.pdb/e0c87c8653a14fce8988a727a0c113742/sqllang.pdb' -OutFile "$outputFolder\sqllang.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\SqlTsEs.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SqlTsEs.pdb/95328c1d4b7e4c0991b1e3b23d7599132/SqlTsEs.pdb' -OutFile "$outputFolder\SqlTsEs.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\sqlaccess.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlaccess.pdb/d51850bf713a4cd0bd080a52bdbda48d3/sqlaccess.pdb' -OutFile "$outputFolder\sqlaccess.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\qds.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/qds.pdb/b7b40f4370474643b66a0b4f458bfa1e2/qds.pdb' -OutFile "$outputFolder\qds.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\hkruntime.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkruntime.pdb/6b48ecaa4c254d3fb8415b7b48b1addf1/hkruntime.pdb' -OutFile "$outputFolder\hkruntime.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\hkengine.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkengine.pdb/98e6ce276a384a459c3902090bb411e01/hkengine.pdb' -OutFile "$outputFolder\hkengine.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\hkcompile.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/hkcompile.pdb/b3123f07e8a24ff99677f0c0a39ab3461/hkcompile.pdb' -OutFile "$outputFolder\hkcompile.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\SQLOS.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/SQLOS.pdb/1c74d1e91078452f9facb3317fdf7b851/SQLOS.pdb' -OutFile "$outputFolder\SQLOS.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +if (-not (Test-Path "$outputFolder\sqlservr.pdb")) { Invoke-WebRequest -uri 'https://msdl.microsoft.com/download/symbols/sqlservr.pdb/b3c1eb7ab1d2455aac81b7eb7fb43a162/sqlservr.pdb' -OutFile "$outputFolder\sqlservr.pdb" } # File version 2018.0150.1000.34 ((SQLServer).180918-0824) +``` + From 733521d536e01a1aa82f8e5633a5069111e42ee9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 3 Aug 2020 17:44:37 +0300 Subject: [PATCH 035/553] Fix markdown links --- Errors/PDB/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Errors/PDB/README.md b/Errors/PDB/README.md index 4b806ec5..52624419 100644 --- a/Errors/PDB/README.md +++ b/Errors/PDB/README.md @@ -13,10 +13,10 @@ For running any of these scripts, please note the following: - The script will automatically create the folder where the downloaded PDB files are stored. Please click on one of the links below depending on the major version of SQL Server that you are looking at: -- [SQL Server 2019](SQL-Server-2019) -- [SQL Server 2017](SQL-Server-2017) -- [SQL Server 2016](SQL-Server-2016) -- [SQL Server 2014](SQL-Server-2014) -- [SQL Server 2012](SQL-Server-2012) -- [SQL Server 2008 R2](SQL-Server-2008-R2) -- [SQL Server 2008](SQL-Server-2008) +- [SQL Server 2019](SQL-Server-2019.md) +- [SQL Server 2017](SQL-Server-2017.md) +- [SQL Server 2016](SQL-Server-2016.md) +- [SQL Server 2014](SQL-Server-2014.md) +- [SQL Server 2012](SQL-Server-2012.md) +- [SQL Server 2008 R2](SQL-Server-2008-R2.md) +- [SQL Server 2008](SQL-Server-2008.md) From da8bf95e0a998eb58a20b7c5a4520335c1f642dd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 4 Aug 2020 18:48:31 +0300 Subject: [PATCH 036/553] Add trace flags 9424 and 9426 Thanks to Paul White --- SQL Server Trace Flag.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 54c3a186..0e20aca0 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Trace Flags -Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**611** trace flags). +Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**613** trace flags). ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.** @@ -285,7 +285,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht ## Trace Flags List -Summary: **611 trace flags** +Summary: **613 trace flags** @@ -4916,6 +4916,30 @@ Link: [SQL Server 2017: Adaptive Join Internals]
Scope: ? + +#### Trace Flag: 9424 +**Undocumented trace flag**
+Function: Sets the number of splits to four. +The SQL Server 2019 query optimizer has a new trick available to improve the performance of large aggregations. +The new exploration abilities are encoded in two new closely-related optimizer rules: `GbAggSplitToRanges` and `SelOnGbAggSplitToRanges`. +The extended event `query_optimizer_batch_mode_agg_split is` provided to track when this new optimization is considered. +The description of this event is: Occurs when the query optimizer detects batch mode aggregation is likely to spill and tries to split it into multiple smaller aggregations.
+Link: [SQL Server 2019 Aggregate Splitting]
+Scope: session or query + + + +#### Trace Flag: 9426 +**Undocumented trace flag**
+Function: Disables the aggregate splitting feature. +The SQL Server 2019 query optimizer has a new trick available to improve the performance of large aggregations. +The new exploration abilities are encoded in two new closely-related optimizer rules: `GbAggSplitToRanges` and `SelOnGbAggSplitToRanges`. +The extended event `query_optimizer_batch_mode_agg_split is` provided to track when this new optimization is considered. +The description of this event is: Occurs when the query optimizer detects batch mode aggregation is likely to spill and tries to split it into multiple smaller aggregations.
+Link: [SQL Server 2019 Aggregate Splitting]
+Scope: session or query + + #### Trace Flag: 9447 **Undocumented trace flag**
@@ -5476,4 +5500,5 @@ Scope: global only [Why are (seemingly) suitable indexes not used on a LEFT JOIN with OR]:https://topanswers.xyz/databases?q=815#a960 [A SQL Server DBA myth a day: (15/30) checkpoint only writes pages from committed transactions]:http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1530-checkpoint-only-writes-pages-from-committed-transactions/ [SQL Server 2019 Aggressive Clustered Columnstore Cleanup]:https://www.tarynpivots.com/post/aggressive-clustered-columnstore-cleanup/ -[KB153096]:https://support.microsoft.com/kb/153096 \ No newline at end of file +[KB153096]:https://support.microsoft.com/kb/153096 +[SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html From 46530858324a78bca344c713fde0ca20d454a4b7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 5 Aug 2020 18:50:39 +0300 Subject: [PATCH 037/553] Add Wait_Statistics_Snapshot script --- Scripts/Wait_Statistics_Snapshot.sql | 74 ++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Scripts/Wait_Statistics_Snapshot.sql diff --git a/Scripts/Wait_Statistics_Snapshot.sql b/Scripts/Wait_Statistics_Snapshot.sql new file mode 100644 index 00000000..a03f8006 --- /dev/null +++ b/Scripts/Wait_Statistics_Snapshot.sql @@ -0,0 +1,74 @@ +/* + + Generate complex query plan + Reads and writes per database. + 2010-12-09 by Paul Randal + 2019-02-26 by Paul Randal + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Wait_Statistics_Snapshot.sql + https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/ + + + File: WaitingTasks.sql + + Summary: Snapshot of waiting tasks + + SQL Server Versions: 2005 onward +------------------------------------------------------------------------------ + Written by Paul S. Randal, SQLskills.com + + (c) 2019, SQLskills.com. All rights reserved. + + For more scripts and sample code, check out + http://www.SQLskills.com + + You may alter this code for your own *non-commercial* purposes. You may + republish altered code as long as you include this copyright and give due + credit, but you must obtain prior permission before blogging this code. + + THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF + ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED + TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + PARTICULAR PURPOSE. +*/ + +SELECT + [owt].[session_id] AS [SPID], + [owt].[exec_context_id] AS [Thread], + [ot].[scheduler_id] AS [Scheduler], + [owt].[wait_duration_ms] AS [wait_ms], + [owt].[wait_type], + [owt].[blocking_session_id] AS [Blocking SPID], + [owt].[resource_description], + CASE [owt].[wait_type] + WHEN N'CXPACKET' THEN + SUBSTRING ( -- earlier versions don't have anything after the nodeID... + [owt].[resource_description], + CHARINDEX (N'nodeId=', [owt].[resource_description]) + 7, + CHARINDEX (N' tid=', [owt].[resource_description] + ' tid=') - + CHARINDEX (N'nodeId=', [owt].[resource_description]) - 7 + ) + ELSE NULL + END AS [Node ID], + [eqmg].[dop] AS [DOP], + [er].[database_id] AS [DBID], + CAST ('https://www.sqlskills.com/help/waits/' + [owt].[wait_type] as XML) AS [Help/Info URL], + [eqp].[query_plan], + [est].text +FROM sys.dm_os_waiting_tasks [owt] +INNER JOIN sys.dm_os_tasks [ot] ON + [owt].[waiting_task_address] = [ot].[task_address] +INNER JOIN sys.dm_exec_sessions [es] ON + [owt].[session_id] = [es].[session_id] +INNER JOIN sys.dm_exec_requests [er] ON + [es].[session_id] = [er].[session_id] +FULL JOIN sys.dm_exec_query_memory_grants [eqmg] ON + [owt].[session_id] = [eqmg].[session_id] +OUTER APPLY sys.dm_exec_sql_text ([er].[sql_handle]) [est] +OUTER APPLY sys.dm_exec_query_plan ([er].[plan_handle]) [eqp] +WHERE + [es].[is_user_process] = 1 +ORDER BY + [owt].[session_id], + [owt].[exec_context_id]; +GO From cecc04986400c5c4f94f779451966ecc8855ee41 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 6 Aug 2020 18:36:02 +0300 Subject: [PATCH 038/553] Add new useful links and info --- README.md | 4 +++- SSMS/SSMS_Errors.md | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b9afe723..8a2a0536 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Server Name Convention and T-SQL Programming Style](/SQL%20Server%20Name%20Convention%20and%20T-SQL%20Programming%20Style.md) - [SQL Server Licensing](/SQL%20Server%20Licensing.md) - [SQL Server People](/SQL%20Server%20People.md 'Most Valuable SQL Server professionals') - - [SQL Server Trace Flag](/SQL%20Server%20Trace%20Flag.md 'Complete list - 610 Trace Flags') (**Complete list - 610 trace flags**) + - [SQL Server Trace Flag](/SQL%20Server%20Trace%20Flag.md 'Complete list - 613 Trace Flags') (**Complete list - 613 trace flags**) - [SQL Server Version](/SQL%20Server%20Version.md 'List of all Microsoft SQL Sever versions') (**Complete list - from SQL Server 1.0 to SQL Server 2019**) - [Articles](/Articles) - [CLR procedures](/CLR) @@ -364,6 +364,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [ASSP - Analysis Services Stored Procedure Project](https://asstoredprocedures.github.io/ASStoredProcedures/) (by Darren Gosbell) - [Data-Blogger-Resource-Kit - Includes resources for use by bloggers, microbloggers, vloggers, and origami enthusiasts who focus on SQL Server](https://github.com/amtwo/Data-Blogger-Resource-Kit) (by Andy Andy Mallon) - [SQL-Server-Multi-Thread - a framework to do multi-threading in T-SQL using SQL Server Agent jobs.](https://github.com/jobbish-sql/SQL-Server-Multi-Thread) (by ) + - [SQL Server and Azure SQL Labs and Workshops](https://microsoft.github.io/sqlworkshops/) (by Microsoft) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) @@ -562,6 +563,7 @@ SQL Server: - [Cloud Analytics with Microsoft Azure](https://azure.microsoft.com/en-us/resources/cloud-analytics-with-microsoft-azure/) (by Has Altaiar, Jack Lee, Michael Peña) - [Snowflake for SQL Server Users Part 1 – Core Concepts](https://sqldownunder.blob.core.windows.net/public/SnowflakeForSQLServerUsers_Part_1_CoreConcepts%20-%20for%20SDU%20Insiders.pdf) (by Dr Greg Low) - [The Fundamental Guide To Sql Query Optimization](https://www.quest.com/whitepapert/the-fundamental-guide-to-sql-query-optimization8143740/) (by Janis Griffin) + - [An Expert Guide To Sql Server Performance Tuning](https://www.quest.com/whitepaper/an-expert-guide-to-sql-server-performance-tuning8143874/) (by Brent Ozar, Pinal Dave, Janis Griffin) R: - [BookDown - Write HTML, PDF, ePub, and Kindle books with R Markdown](https://bookdown.org) diff --git a/SSMS/SSMS_Errors.md b/SSMS/SSMS_Errors.md index 533f1bff..9aa198e8 100644 --- a/SSMS/SSMS_Errors.md +++ b/SSMS/SSMS_Errors.md @@ -1,13 +1,14 @@ # SSMS known errors and bugs - - [What to Do When You Get a "Cache is Out of Date" Error Message](https://www.databasejournal.com/features/mssql/what-to-do-when-you-get-a-cache-is-out-of-date-error-message.html) - - [CTRL+R does not hide the Query Result window in SSMS](https://stackoverflow.com/questions/17068661/ctrlr-does-not-hide-the-query-result-window-in-ssms) - - [SQL SERVER – Unable to Launch SSMS Error – Cannot Find One or More Components. Please Reinstall the Application](https://blog.sqlauthority.com/2017/12/06/sql-server-unable-launch-ssms-error-cannot-find-one-components-please-reinstall-application/) - - [Object Reference Not Set to an Instance of an Object’ When Failing Over an Availability Group Using SSMS <= 17.5](https://sqlundercover.com/2018/03/29/object-reference-not-set-to-an-instance-of-an-object-when-failing-over-an-availability-group-using-ssms-17-5/) - - [File Growth Rate – The GUI Lies](https://sqlrus.com/2018/06/file-growth-rate-the-gui-lies/) - - [SSMS: Allow forcing case-insensitive matching in Object Explorer filters](https://feedback.azure.com/forums/908035-sql-server/suggestions/36679522-ssms-allow-forcing-case-insensitive-matching-in-o) - - [SSMS: Object Explorer Filtering allows for SQL Injection (oops)](https://feedback.azure.com/forums/908035-sql-server/suggestions/36678803-ssms-object-explorer-filtering-allows-for-sql-inj) - - [SSMS won't open scripts on double-click](https://stackoverflow.com/q/1726577/2298061) - - [SSMS Crash While Using Backup to URL or Connecting to Storage](https://blog.sqlauthority.com/2018/10/09/sql-server-sql-server-management-studio-crash-while-using-backup-to-url-or-connecting-to-storage/) - - [Error in SSMS: Attempted to read or write protected memory.](https://sqlstudies.com/2019/02/18/error-in-ssms-attempted-to-read-or-write-protected-memory/) - - [SSMS Sequence Contains No Elements](https://thomaslarock.com/2020/01/sequence-contains-no-elements/) +- [What to Do When You Get a "Cache is Out of Date" Error Message](https://www.databasejournal.com/features/mssql/what-to-do-when-you-get-a-cache-is-out-of-date-error-message.html) +- [CTRL+R does not hide the Query Result window in SSMS](https://stackoverflow.com/questions/17068661/ctrlr-does-not-hide-the-query-result-window-in-ssms) +- [SQL SERVER – Unable to Launch SSMS Error – Cannot Find One or More Components. Please Reinstall the Application](https://blog.sqlauthority.com/2017/12/06/sql-server-unable-launch-ssms-error-cannot-find-one-components-please-reinstall-application/) +- [Object Reference Not Set to an Instance of an Object’ When Failing Over an Availability Group Using SSMS <= 17.5](https://sqlundercover.com/2018/03/29/object-reference-not-set-to-an-instance-of-an-object-when-failing-over-an-availability-group-using-ssms-17-5/) +- [File Growth Rate – The GUI Lies](https://sqlrus.com/2018/06/file-growth-rate-the-gui-lies/) +- [SSMS: Allow forcing case-insensitive matching in Object Explorer filters](https://feedback.azure.com/forums/908035-sql-server/suggestions/36679522-ssms-allow-forcing-case-insensitive-matching-in-o) +- [SSMS: Object Explorer Filtering allows for SQL Injection (oops)](https://feedback.azure.com/forums/908035-sql-server/suggestions/36678803-ssms-object-explorer-filtering-allows-for-sql-inj) +- [SSMS won't open scripts on double-click](https://stackoverflow.com/q/1726577/2298061) +- [SSMS Crash While Using Backup to URL or Connecting to Storage](https://blog.sqlauthority.com/2018/10/09/sql-server-sql-server-management-studio-crash-while-using-backup-to-url-or-connecting-to-storage/) +- [Error in SSMS: Attempted to read or write protected memory.](https://sqlstudies.com/2019/02/18/error-in-ssms-attempted-to-read-or-write-protected-memory/) +- [SSMS Sequence Contains No Elements](https://thomaslarock.com/2020/01/sequence-contains-no-elements/) +- [SQL Server Management Studio Connection to Integration Services Error Class Not Registered](https://www.mssqltips.com/sqlservertip/6479/sql-server-management-studio-connection-to-integration-services-error-class-not-registered/) From ca72e51dc75265c2e342713152f900f0f72832c8 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 7 Aug 2020 10:25:43 +0300 Subject: [PATCH 039/553] Add SQL Server 2019 CU6 info and update express links --- SQL Server Version.md | 107 +++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 58 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 37dcfca2..7aa42a10 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -129,7 +129,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| -| 2019 | [Install 2019 RTM] then [CU5 KB4552255] | 15.0.2070.41
15.0.4043.16 | 2019-11-04
2020-06-22 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | +| 2019 | [Install 2019 RTM] then [CU5 KB44563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU13 KB4549825] | 13.0.5026.0
13.0.5820.21 | 2018-04-24
2020-05-28 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | @@ -138,7 +138,7 @@ Profits: | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install -[CU5 KB4552255]:https://support.microsoft.com/help/4552255 +[CU6 KB4563110]:https://support.microsoft.com/help/4563110 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU21 KB4557397]:https://support.microsoft.com/help/4557397 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 @@ -177,7 +177,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | Direct x64 Download Link | File Name | Release Date | Build Number | Size, MB | SHA1 | |:--------------------------------|:------------------------------------------------------------------|:-------------|--------------:|---------:|------------------------------------------| | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | -| [SQL Server 2019 CU5] | SQLServer2019-KB4552255-x64.exe | 2020-06-22 | 15.0.4043.16 | 603 | c6a0778132b00ced30f06ee61875d58d7a7a70b2 | +| [SQL Server 2019 CU6] | SQLServer2019-KB4563110-x64.exe | 2020-08-04 | 15.0.4053.23 | 604 | 505c6d0a8773909e87a0456978ffb43449a92309 | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | @@ -197,7 +197,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ **For downloading distributive for SQL Server 2008 R2 and SQL Server 2008 you must have MSDN subscription, see [SQL Server 2008 R2] and [SQL Server 2008] links.** [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 -[SQL Server 2019 CU5]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4552255-x64.exe +[SQL Server 2019 CU6]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4563110-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 [SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso @@ -224,13 +224,15 @@ For downloading your copy SQL Server Developer Edition you just need to join the | Edition\Direct Download Link | Release Date | File name | Size, Mb | SHA1 | |-----------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------|---------:|------------------------------------------| -| SQL Server 2017 Developer (x64) - DVD (English) | 2017-10-02 | en_sql_server_2017_developer_x64_dvd_11296168.iso | 1475 | 0280FF6C1447D287A6BD3B86B81E459FE252D17A | -| SQL Server 2016 Developer with Service Pack 2 (x64) - DVD (English) | 2018-05-22 | en_sql_server_2016_developer_with_service_pack_2_x64_dvd_12194995.iso | 2800 | 74279286C2ABFBA9E9FF6DBEE60B71669BD234D2 | -| SQL Server 2016 Developer (x64) - DVD (English) | 2016-06-01 | en_sql_server_2016_developer_x64_dvd_8777069.iso | 2100 | 1B23982FE56DF3BFE0456BDF0702612EB72ABF75 | -| SQL Server 2014 Developer Edition with Service Pack 1 (x64) - DVD (English) | 2015-05-21 | en_sql_server_2014_developer_edition_with_service_pack_1_x64_dvd_6668542.iso | 3025 | BFEE1F300C39638DA0D2CD594636698C6207C852 | -| SQL Server 2014 Developer Edition with Service Pack 1 (x86) - DVD (English) | 2015-05-21 | en_sql_server_2014_developer_edition_with_service_pack_1_x86_dvd_6668541.iso | 2462 | ED3C70507A73BCC63D67CFA272CD849B9418A18E | -| SQL Server 2014 Developer Edition (x64) - DVD (English) | 2014-04-01 | en_sql_server_2014_developer_edition_x64_dvd_3940406.iso | 2486 | F73F430F55A71DA219FC7257A3A28E8FC142530F | -| SQL Server 2014 Developer Edition (x86) - DVD (English) | 2014-04-01 | en_sql_server_2014_developer_edition_x86_dvd_3938200.iso | 2039 | 395B35FD80AA959B02B0C399DA1BB0C020DB6310 | +| SQL Server 2019 Developer (x64) - DVD (English) | 2019-11-05 | en_sql_server_2019_developer_x64_dvd_baea4195.iso | 1367 | 22974e466987d7d4659437aab06ac0798657c700 | +| SQL Server 2017 Developer (x64) - DVD (English) | 2017-10-02 | en_sql_server_2017_developer_x64_dvd_11296168.iso | 1475 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | +| SQL Server 2016 Developer with Service Pack 2 (x64) - DVD (English) | 2018-05-22 | en_sql_server_2016_developer_with_service_pack_2_x64_dvd_12194995.iso | 2800 | 74279286c2abfba9e9ff6dbee60b71669bd234d2 | +| SQL Server 2016 Developer with Service Pack 1 (x64) - DVD (English) | 2016-11-16 | en_sql_server_2016_developer_with_service_pack_1_x64_dvd_9548071.iso | 2590 | b12af2cc5112f22a784a14f8d32b49ee56d296b3 | +| SQL Server 2016 Developer (x64) - DVD (English) | 2016-06-01 | en_sql_server_2016_developer_x64_dvd_8777069.iso | 2100 | 1b23982fe56df3bfe0456bdf0702612eb72abf75 | +| SQL Server 2014 Developer Edition with Service Pack 1 (x64) - DVD (English) | 2015-05-21 | en_sql_server_2014_developer_edition_with_service_pack_1_x64_dvd_6668542.iso | 3025 | bfee1f300c39638da0d2cd594636698c6207c852 | +| SQL Server 2014 Developer Edition with Service Pack 1 (x86) - DVD (English) | 2015-05-21 | en_sql_server_2014_developer_edition_with_service_pack_1_x86_dvd_6668541.iso | 2462 | ed3c70507a73bcc63d67cfa272cd849b9418a18e | +| SQL Server 2014 Developer Edition (x64) - DVD (English) | 2014-04-01 | en_sql_server_2014_developer_edition_x64_dvd_3940406.iso | 2486 | f73f430f55a71da219fc7257a3a28e8fc142530f | +| SQL Server 2014 Developer Edition (x86) - DVD (English) | 2014-04-01 | en_sql_server_2014_developer_edition_x86_dvd_3938200.iso | 2039 | 395b35fd80aa959b02b0c399da1bb0c020db6310 | ## SQL Server Express direct download links @@ -238,48 +240,35 @@ For downloading your copy SQL Server Developer Edition you just need to join the Original post written by Scott Hanselman: http://www.hanselman.com/blog/DownloadSQLServerExpress.aspx
Official Microsoft SQL Server Express page: https://www.microsoft.com/server-cloud/products/sql-server-editions/sql-server-express.aspx - -### [Download SQL Server 2017 Express](https://www.microsoft.com/download/details.aspx?id=55994) - -### [Download SQL Server 2016 Express](https://www.microsoft.com/download/details.aspx?id=52679) - - -### [Download SQL Server 2014 Express](http://www.microsoft.com/download/details.aspx?id=42299) -[Download Microsoft SQL Server 2014 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=46697)
-You likely just want SQL Server 2014 Express with Tools. This download includes SQL Management Studio: - - [SQL Server 2014 Express x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe) - - [SQL Server 2014 Express x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2032BIT/SQLEXPRWT_x86_ENU.exe) - -Here's just SQL Server 2014 Management Studio: - - [SQL Management Studio x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/MgmtStudio%2064BIT/SQLManagementStudio_x64_ENU.exe) - - [SQL Management Studio x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/MgmtStudio%2032BIT/SQLManagementStudio_x86_ENU.exe) - -SQL Server 2014 Express with Advanced Services: - - [Advanced Services x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2064BIT/SQLEXPRADV_x64_ENU.exe) - - [Advanced Services x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2032BIT/SQLEXPRADV_x86_ENU.exe) - - -### [Download SQL Server 2012 Express](http://www.microsoft.com/download/details.aspx?id=29062) -[Download Microsoft SQL Server 2012 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=35579)
-You likely just want SQL Server 2012 Express with Tools. This download includes SQL Management Studio: - - [SQL Server 2012 Express x64](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPRWT_x64_ENU.exe) - -Here's just SQL Server 2012 Management Studio: - - [SQL Management Studio x64](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLManagementStudio_x64_ENU.exe) - - [SQL Management Studio x86](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x86/SQLManagementStudio_x86_ENU.exe) - - -### [Download SQL Server 2008 Express R2 SP2](http://www.microsoft.com/download/details.aspx?id=30438) -You likely just want SQL Server 2008 Express with Tools. This download includes SQL Management Studio: - - [SQL Server 2008 Express x64](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPRWT_x64_ENU.exe) - - [SQL Server 2008 Express x86](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPRWT_x86_ENU.exe) - -Here's just SQL Server 2008 Management Studio: - - [SQL Management Studio x64](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLManagementStudio_x64_ENU.exe) - - [SQL Management Studio x86](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLManagementStudio_x86_ENU.exe) - - -### [Download SQL Server 2005 Express](https://www.microsoft.com/download/details.aspx?id=21844) +- [Download SQL Server 2019 Express](https://www.microsoft.com/Download/details.aspx?id=101064) +- [Download SQL Server 2017 Express](https://www.microsoft.com/download/details.aspx?id=55994) +- [Download SQL Server 2016 Express](https://www.microsoft.com/download/details.aspx?id=52679) +- [Download SQL Server 2014 Express](http://www.microsoft.com/download/details.aspx?id=42299) +- [Download Microsoft SQL Server 2014 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=46697)
+ - You likely just want SQL Server 2014 Express with Tools. This download includes SQL Management Studio: + - [SQL Server 2014 Express x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe) + - [SQL Server 2014 Express x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2032BIT/SQLEXPRWT_x86_ENU.exe) + - Here's just SQL Server 2014 Management Studio: + - [SQL Management Studio x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/MgmtStudio%2064BIT/SQLManagementStudio_x64_ENU.exe) + - [SQL Management Studio x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/MgmtStudio%2032BIT/SQLManagementStudio_x86_ENU.exe) + - SQL Server 2014 Express with Advanced Services: + - [Advanced Services x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2064BIT/SQLEXPRADV_x64_ENU.exe) + - [Advanced Services x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2032BIT/SQLEXPRADV_x86_ENU.exe) +- [Download SQL Server 2012 Express](http://www.microsoft.com/download/details.aspx?id=29062) +- [Download Microsoft SQL Server 2012 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=35579)
+ - You likely just want SQL Server 2012 Express with Tools. This download includes SQL Management Studio: + - [SQL Server 2012 Express x64](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPRWT_x64_ENU.exe) + - Here's just SQL Server 2012 Management Studio: + - [SQL Management Studio x64](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLManagementStudio_x64_ENU.exe) + - [SQL Management Studio x86](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x86/SQLManagementStudio_x86_ENU.exe) +- [Download SQL Server 2008 Express R2 SP2](http://www.microsoft.com/download/details.aspx?id=30438) + - You likely just want SQL Server 2008 Express with Tools. This download includes SQL Management Studio: + - [SQL Server 2008 Express x64](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPRWT_x64_ENU.exe) + - [SQL Server 2008 Express x86](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPRWT_x86_ENU.exe) + - Here's just SQL Server 2008 Management Studio: + - [SQL Management Studio x64](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLManagementStudio_x64_ENU.exe) + - [SQL Management Studio x86](http://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLManagementStudio_x86_ENU.exe) +- [Download SQL Server 2005 Express](https://www.microsoft.com/download/details.aspx?id=21844) ## Internal Database Version and Compatibility Level @@ -416,15 +405,16 @@ More additional information about latest vNext SQL Server release you can find i Here is the latest output from `SELECT @@VERSION` for SQL Server 2019 CTP Developer Edition: ``` -Microsoft SQL Server 2019 (RTM-CU5) (KB4552255) - 15.0.4043.16 (X64) - Jun 10 2020 18:25:25 +Microsoft SQL Server 2019 (RTM-CU6) (KB4563110) - 15.0.4053.23 (X64) + Jul 25 2020 11:26:55 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | **Latest** | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | +| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | **Latest** | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | +| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | | 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | | 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | | 15.0.4013.40 | 2019.150.4013.40 | RTM | CU | | 4536075 | [Cumulative Update 2 for SQL Server 2019] | 2020-02-07 | 2020-02-03 | 134 | 88 | 537 | 904 | @@ -443,7 +433,8 @@ Microsoft SQL Server 2019 (RTM-CU5) (KB4552255) - 15.0.4043.16 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | -[Cumulative Update 4 for SQL Server 2019]:https://support.microsoft.com/help/4552255 +[Cumulative Update 6 for SQL Server 2019]:https://support.microsoft.com/help/4563110 +[Cumulative Update 5 for SQL Server 2019]:https://support.microsoft.com/help/4552255 [Cumulative Update 4 for SQL Server 2019]:https://support.microsoft.com/help/4548597 [Cumulative Update 3 for SQL Server 2019]:https://support.microsoft.com/help/4538853 [Cumulative Update 2 for SQL Server 2019]:https://support.microsoft.com/help/4536075 @@ -2368,4 +2359,4 @@ All SQL Server 2012 CU downloads: [Catalog Update Microsoft SQL Server 2012](htt | 6.00.151 | Microsoft SQL Server 6.0 Service Pack 3 (SP3) | | | 6.00.139 | Microsoft SQL Server 6.0 Service Pack 2 (SP2) | | | 6.00.124 | Microsoft SQL Server 6.0 Service Pack 1 (SP1) | | -| 6.00.121 | Microsoft SQL Server 6.0 RTM | | \ No newline at end of file +| 6.00.121 | Microsoft SQL Server 6.0 RTM | | From bb875957638e53af82c22418eaa9f99105407bf6 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 7 Aug 2020 10:42:50 +0300 Subject: [PATCH 040/553] Update express edition links, fix typos --- SQL Server Version.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 7aa42a10..4d24a7a0 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -129,7 +129,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| -| 2019 | [Install 2019 RTM] then [CU5 KB44563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | +| 2019 | [Install 2019 RTM] then [CU6 KB44563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU13 KB4549825] | 13.0.5026.0
13.0.5820.21 | 2018-04-24
2020-05-28 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | @@ -237,14 +237,26 @@ For downloading your copy SQL Server Developer Edition you just need to join the ## SQL Server Express direct download links -Original post written by Scott Hanselman: http://www.hanselman.com/blog/DownloadSQLServerExpress.aspx
-Official Microsoft SQL Server Express page: https://www.microsoft.com/server-cloud/products/sql-server-editions/sql-server-express.aspx +Great thanks Scott Hanselman for Original post: [Download SQL Server Express](http://downloadsqlserverexpress.com) -- [Download SQL Server 2019 Express](https://www.microsoft.com/Download/details.aspx?id=101064) +- [SQL Server 2019 Express Edition](https://www.microsoft.com/Download/details.aspx?id=101064) + - [Download SQL Server 2019 Express Basic (English)](https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe) + - [Download SQL Server 2019 Express Advanced (English)](https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPRADV_x64_ENU.exe) + - [Download SQL Server 2019 Express LocalDB (English)](https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi) - [Download SQL Server 2017 Express](https://www.microsoft.com/download/details.aspx?id=55994) -- [Download SQL Server 2016 Express](https://www.microsoft.com/download/details.aspx?id=52679) + - [Download SQL Server 2017 Express Basic (English)](https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPR_x64_ENU.exe) + - [Download SQL Server 2017 Express Advanced (English)](https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPRADV_x64_ENU.exe) + - [Download SQL Server 2017 Express LocalDB (English)](https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SqlLocalDB.msi) +- SQL Server 2016 Express + - [Download SQL Server 2016 SP2 Express Basic (English)](https://download.microsoft.com/download/4/1/A/41AD6EDE-9794-44E3-B3D5-A1AF62CD7A6F/sql16_sp2_dlc/en-us/SQLEXPR_x64_ENU.exe) + - [Download SQL Server 2016 SP2 Express Advanced (English)](https://download.microsoft.com/download/4/1/A/41AD6EDE-9794-44E3-B3D5-A1AF62CD7A6F/sql16_sp2_dlc/en-us/SQLEXPRADV_x64_ENU.exe) + - [Download SQL Server 2016 SP2 Express LocalDB (English)](https://download.microsoft.com/download/4/1/A/41AD6EDE-9794-44E3-B3D5-A1AF62CD7A6F/sql16_sp2_dlc/en-us/SqlLocalDB.msi) +- SQL Server 2016 Express + - [Download SQL Server 2016 SP1 Express Basic (English)](https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SQLEXPR_x64_ENU.exe) + - [Download SQL Server 2016 SP1 Express Advanced (English)](https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SQLEXPRADV_x64_ENU.exe) + - [Download SQL Server 2016 SP1 Express LocalDB (English)](https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SqlLocalDB.msi) - [Download SQL Server 2014 Express](http://www.microsoft.com/download/details.aspx?id=42299) -- [Download Microsoft SQL Server 2014 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=46697)
+- [Download Microsoft SQL Server 2014 Service Pack 1 (SP1) Express](https://www.microsoft.com/download/details.aspx?id=46697) - You likely just want SQL Server 2014 Express with Tools. This download includes SQL Management Studio: - [SQL Server 2014 Express x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe) - [SQL Server 2014 Express x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2032BIT/SQLEXPRWT_x86_ENU.exe) From 3bb878cc7bb5904d3ecea70d288b40f73f21cf06 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 7 Aug 2020 10:47:26 +0300 Subject: [PATCH 041/553] Fix typos and broken link --- SQL Server Version.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 4d24a7a0..a44f0f75 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -129,7 +129,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| -| 2019 | [Install 2019 RTM] then [CU6 KB44563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | +| 2019 | [Install 2019 RTM] then [CU6 KB4563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU13 KB4549825] | 13.0.5026.0
13.0.5820.21 | 2018-04-24
2020-05-28 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | @@ -267,7 +267,7 @@ Great thanks Scott Hanselman for Original post: [Download SQL Server Express](ht - [Advanced Services x64](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2064BIT/SQLEXPRADV_x64_ENU.exe) - [Advanced Services x86](http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2032BIT/SQLEXPRADV_x86_ENU.exe) - [Download SQL Server 2012 Express](http://www.microsoft.com/download/details.aspx?id=29062) -- [Download Microsoft SQL Server 2012 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=35579)
+- [Download Microsoft SQL Server 2012 Service Pack 1 (SP1) Express ](https://www.microsoft.com/download/details.aspx?id=35579) - You likely just want SQL Server 2012 Express with Tools. This download includes SQL Management Studio: - [SQL Server 2012 Express x64](http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPRWT_x64_ENU.exe) - Here's just SQL Server 2012 Management Studio: @@ -1928,7 +1928,7 @@ All SQL Server 2012 CU downloads: [Catalog Update Microsoft SQL Server 2012](htt [915306 FIX: The merge agent fails and a "permission denied" error message is logged when you synchronize a SQL Server 2005-based merge publication]:http://support.microsoft.com/kb/915306 [915112 FIX: Error message when an ADO.NET-connected application tries to reuse a connection from the connection pool in SQL Server 2005: "The request failed to run because the batch is aborted"]:http://support.microsoft.com/kb/915112 [913494 FIX: The merge agent does not use a specified custom user update to handle conflicting UPDATE statements in SQL Server 2005]:http://support.microsoft.com/kb/913494 -[913941 FIX: A SQL Server login may have more permissions when you log on to an instance of SQL Server 2005]:http://support.microsoft.com/kb/913941 +[913941 FIX: A SQL Server login may have more permissions when you log on to an instance of SQL Server 2005]:https://web.archive.org/web/20170712163528/https://support.microsoft.com/en-us/help/913494 ## Microsoft SQL Server 2000 Builds From 2125b34d80dec454ec2b59141a46b6bd7df4f367 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 8 Aug 2020 00:32:36 +0300 Subject: [PATCH 042/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3b45a5df..8979f7cd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1170,6 +1170,8 @@ Articles types: | [Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.] | Brent Ozar | 2020-07-29 | [DBA][DEV] | | [Finding & Downloading Required SQL Server Updates] | Andy Levy | 2020-07-21 | [DBA] | | [SQLskills SQL101: Why do some wait types need to be ignored?] | Paul Randal | 2018-05-23 | [DBA][DEV] | +| [What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)] | Joe Obbish | 2018-09-27 | [DBA][DEV] | +| [SQL Server 2019 Aggregate Splitting] | Paul White | 2020-08-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2314,3 +2316,5 @@ Articles types: [Remember “Nothing Stops a Hekaton Transaction?” Yeah, About That.]:https://www.brentozar.com/archive/2020/07/remember-nothing-stops-a-hekaton-transaction-yeah-about-that/ [Finding & Downloading Required SQL Server Updates]:https://flxsql.com/downloading-latest-sql-server-updates/ [SQLskills SQL101: Why do some wait types need to be ignored?]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-why-do-some-wait-types-need-to-be-ignored/ +[What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)]:https://orderbyselectnull.com/2018/09/27/what-is-the-sos_work_dispatcher-wait-type/ +[SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html From f20dd86e4b092c81c7598f85d565580a6941776c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 8 Aug 2020 15:35:09 +0300 Subject: [PATCH 043/553] Add 1480 and 35264 errors --- Errors/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Errors/README.md b/Errors/README.md index a6760e79..0a0d2c5e 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -128,6 +128,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 1205 | Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen … | [1205_link1][46] | | 1222 | Lock request time out period exceeded. | [1222_link1][46] | | 1219 | Your session has been disconnected because of a high priority DDL operation. | [1219_link1][32] | +| 1480 | The %S_MSG database "%.*ls" is changing roles from "%ls" to "%ls" because the mirroring session or … | [1480_link1][48] | | 1701 | Creating or altering table %ls failed because the minimum row size would be 8061, including 10 b … | [1701_link1] | | 1807 | Could not obtain exclusive lock on database ‘model’. Retry the operation later. … | [1807_link1] | | 1904 | The statistics on table has 65 columns in the key list … | [1904_link1] | @@ -231,6 +232,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 33206 | SQL Server Audit failed to create the audit file '%s'. Make sure that the disk is not full and … | [33206_link1][10] | | 35217 | The thread pool for Always On Availability Groups was unable to start a new worker thread because … | [35217_link1] | | 35250 | The connection to the primary replica is not active. The command cannot be processed. | [35250_link1] | +| 35264 | Always On Availability Groups data movement for database '%.*ls' has been suspended for the following … | [35264_link1][48] | | 35320 | Column store indexes are not allowed on tables for which the durability option SCHEMA_ONLY is specified. | [35320_link1][41] | | 35337 | UPDATE STATISTICS failed because statistics cannot be updated on a columnstore index. … | [35337_link1][33] | | 35343 | The statement failed. Column '%.*ls' has a data type that cannot participate in a columnstore index. | [35343_link1][36] | @@ -285,6 +287,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [45]:http://www.seangallardy.com/error-8474-state-11-17836-state-20-9642-state-3-and-your-companys-need-to-incessantly-scan-for-vulnerable-ports/ [46]:https://www.mssqltips.com/sqlservertip/6279/prevent-sql-server-blocking-using-locktimeout/ [47]:https://www.sqlshack.com/sql-varchar-data-type-deep-dive/ +[48]:https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ From ec5c40c6d5a57702dfa1995e73c37613224979fd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 9 Aug 2020 15:41:36 +0300 Subject: [PATCH 044/553] Add jobs for monitoring AG --- Scripts/Job_AG_Failover_Detected.sql | 39 +++++++ Scripts/Job_AG_Resume_Data_Movement.sql | 129 ++++++++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 Scripts/Job_AG_Failover_Detected.sql create mode 100644 Scripts/Job_AG_Resume_Data_Movement.sql diff --git a/Scripts/Job_AG_Failover_Detected.sql b/Scripts/Job_AG_Failover_Detected.sql new file mode 100644 index 00000000..b674343d --- /dev/null +++ b/Scripts/Job_AG_Failover_Detected.sql @@ -0,0 +1,39 @@ +/* + + Use this event to run a job when the replica becomes primary + Create job to resume AG database data movement for suspended databases. + 2020-08-06 by Wayne Sheffield + 1.0 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Job_AG_Failover_Detected.sql + https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ + +*/ + +/* +Use this event to run a job when the replica becomes primary +*/ +USE msdb; +GO +EXEC msdb.dbo.sp_add_alert @name=N'AG Failover Detected - Now Primary', +@message_id=1480, +@severity=0, +@enabled=1, +@delay_between_responses=0, +@include_event_description_in=0, +@event_description_keyword=N'"RESOLVING" to "PRIMARY"', +@job_id=N'00000000-0000-0000-0000-000000000000'; +GO +/* +Use this event to run a job when the replica becomes secondary +*/ +USE msdb; +GO +EXEC msdb.dbo.sp_add_alert @name=N'AG Failover Detected - Now Secondary', +@message_id=1480, +@severity=0, +@enabled=1, +@delay_between_responses=0, +@include_event_description_in=0, +@event_description_keyword=N'"RESOLVING" to "SECONDARY"', +@job_id=N'00000000-0000-0000-0000-000000000000'; +GO diff --git a/Scripts/Job_AG_Resume_Data_Movement.sql b/Scripts/Job_AG_Resume_Data_Movement.sql new file mode 100644 index 00000000..310ce020 --- /dev/null +++ b/Scripts/Job_AG_Resume_Data_Movement.sql @@ -0,0 +1,129 @@ +/* + + Create job to resume AG database data movement for suspended databases. + Create alert to catch when data movement has been suspended, and run the job + + Create job to resume AG database data movement for suspended databases. + 2020-08-06 by Wayne Sheffield + 1.0 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Job_AG_Resume_Data_Movement.sql + https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ + +*/ + +USE msdb; +GO + +BEGIN TRANSACTION; +DECLARE @ReturnCode INT; +SELECT @ReturnCode = 0;DECLARE @jobname sysname = N'AG - Resume Data Movement'; +DECLARE @categoryname sysname = 'HADR-Availability Group'; + +IF EXISTS (SELECT name FROM dbo.sysjobs where name = @jobname) +BEGIN +EXECUTE msdb.dbo.sp_delete_job @job_name = @jobname; +END; + +IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=@categoryname AND category_class=1) +BEGIN +EXECUTE @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=@categoryname; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; +END; + + +EXECUTE @ReturnCode = msdb.dbo.sp_add_job +@job_name=@jobname, +@enabled=1, +@notify_level_eventlog=0, +@notify_level_email=2, +@notify_level_netsend=2, +@notify_level_page=2, +@delete_level=0, +@description=N'Resume data movement on suspended Availability Group databases. + +This job can be run manually, or from an alert', +@category_name=N'HADR-Availability Group', +@owner_login_name=N'sa'; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; + +EXECUTE @ReturnCode = msdb.dbo.sp_add_jobserver @job_name=@jobname, @server_name = N'(local)' +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; + +EXECUTE @ReturnCode = msdb.dbo.sp_add_jobstep +@job_name=@jobname, +@step_name=N'Resume data movement in AG databases', +@step_id=1, +@cmdexec_success_code=0, +@on_success_action=1, +@on_fail_action=2, +@retry_attempts=0, +@retry_interval=0, +@os_run_priority=0, +@subsystem=N'TSQL', +@command=N'DECLARE @SQLCMD VARCHAR(1000); +DECLARE cDBSuspended CURSOR FOR +SELECT ''ALTER DATABASE ['' + DB_NAME(database_id) + ''] SET HADR RESUME;'' +FROM sys.dm_hadr_database_replica_states drs +JOIN sys.availability_replicas ar ON ar.replica_id = drs.replica_id +WHERE ar.replica_server_name = @@SERVERNAME +AND drs.is_suspended = 1; + +OPEN cDBSuspended; +FETCH NEXT FROM cDBSuspended INTO @SQLCMD; +WHILE @@FETCH_STATUS = 0 +BEGIN +EXECUTE (@SQLCMD); +FETCH NEXT FROM cDBSuspended INTO @SQLCMD; +END; +CLOSE cDBSuspended; +DEALLOCATE cDBSuspended; +', +@database_name=N'master', +@flags=0; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; + + +EXECUTE @ReturnCode = msdb.dbo.sp_update_job +@job_name=@jobname, +@enabled=1, +@start_step_id=1, +@notify_level_eventlog=0, +@notify_level_email=2, +@notify_level_netsend=2, +@notify_level_page=2, +@delete_level=0, +@description=N'Resume data movement on suspended Availability Group databases.', +@category_name=N'HADR-Availability Group', +@owner_login_name=N'sa', +@notify_email_operator_name=N'', +@notify_netsend_operator_name=N'', +@notify_page_operator_name=N''; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; + +DECLARE @alertname sysname = N'AG Data Movement suspended'; +IF EXISTS (SELECT * FROM msdb.dbo.sysalerts WHERE name = @alertname) +BEGIN +EXECUTE @ReturnCode = msdb.dbo.sp_delete_alert @alertname; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; +END; + +/* +Alert text: +AlwaysOn Availability Groups data movement for database '%.*ls' has been suspended for the following reason: "%S_MSG" (Source ID %d; Source string: '%.*ls'). To resume data movement on the database, you will need to resume the database manually. For information about how to resume an availability database, see SQL Server Books Online. +*/ +EXECUTE @ReturnCode = msdb.dbo.sp_add_alert +@name=@alertname, +@message_id=35264, +@severity=0, +@enabled=1, +@delay_between_responses=0, +@include_event_description_in=0, +@job_name = @jobname; +IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback; + +COMMIT TRANSACTION; +GOTO EndSave +QuitWithRollback: +IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION; +EndSave: +GO From 272c16e57eb59127d46dfdc7eb7f0e201f7d7ab7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 10 Aug 2020 17:45:32 +0300 Subject: [PATCH 045/553] Add Jobs_Get_Runing_info script --- Scripts/Jobs_Get_Runing_info.sql | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Scripts/Jobs_Get_Runing_info.sql diff --git a/Scripts/Jobs_Get_Runing_info.sql b/Scripts/Jobs_Get_Runing_info.sql new file mode 100644 index 00000000..517abcf3 --- /dev/null +++ b/Scripts/Jobs_Get_Runing_info.sql @@ -0,0 +1,39 @@ +/* + + Return active jobs info. + 1 data set with information about current runnig jobs. + 2017-01-07 by Brenda + 2020-08-10 by Konstantin Taranov + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Jobs_Get_runing_info.sql + https://sqlstudies.com/2013/09/05/a-t-sql-query-to-get-current-job-activity/ + +*/ + +SELECT + DISTINCT j.name as JobName + , CASE WHEN ja.last_executed_step_id IS NULL THEN js.step_name ELSE js2.step_name END AS StepName + , ja.start_execution_date AS StartDateTime + , 'Running' AS RunStatus + , RIGHT('0' + CONVERT(VARCHAR(2), DATEDIFF(second, ja.start_execution_date, GetDate())/3600), 2) + ':' + + RIGHT('0' + CONVERT(VARCHAR(2), DATEDIFF(second, ja.start_execution_date, GetDate())%3600/60), 2) + ':' + + RIGHT('0' + CONVERT(VARCHAR(2), DATEDIFF(second, ja.start_execution_date, GetDate())%60), 2) AS Duration + , '' AS message +FROM msdb.dbo.sysjobactivity ja + JOIN msdb.dbo.sysjobs j + ON ja.job_id = j.job_id + LEFT JOIN msdb.dbo.sysjobsteps js + ON j.job_id = js.job_id + AND CASE WHEN ja.last_executed_step_id IS NULL THEN j.start_step_id + ELSE ja.last_executed_step_id + END = js.step_id + LEFT JOIN msdb.dbo.sysjobsteps js2 + ON js.job_id = js2.job_id + AND js.on_success_step_id = js2.step_id +WHERE ja.session_id = ( + SELECT TOP(1) session_id + FROM msdb.dbo.syssessions + ORDER BY agent_start_date DESC + ) +AND ja.start_execution_date IS NOT NULL +AND ja.stop_execution_date IS NULL; From 17a565d5ca4ccf2d75b9060570a01eab5df9fe82 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 11 Aug 2020 11:08:45 +0300 Subject: [PATCH 046/553] Add POPSQL, remove scripts, fix typos --- Utilities/README.md | 945 ++++++++++++++++++-------------------------- 1 file changed, 378 insertions(+), 567 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 370ac76a..59f0737b 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,390 +1,376 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **360** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **346** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {9} + - **[B]**: Backup solutions {7} - **[BI]**: Business Intelligence Solutions {4} - - **[D]**: Documentation solutions {7} - - **[DA]**: Database Architecture {21} - - **[DC]**: Data compare {14} + - **[D]**: Documentation solutions {8} + - **[DA]**: Database Architecture {20} + - **[DC]**: Data compare {15} - **[ETL]**: Extract Download Load (ETL) Tools {9} - **[I]**: Internal SQL Server utilities (for example, bcp) {14} - - **[IDX]**: Index manager {4} + - **[IDX]**: Index manager {3} - **[G]**: Data generation {4} - **[J]**: Job managers {4} - - **[M]**: Monitoring and alerting Tools {27} - - **[MG]**: Migration tool {35} + - **[M]**: Monitoring and alerting Tools {26} + - **[MG]**: Migration tool {29} - **[MS]**: Management Studio (alternative for SSMS) {31} - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {8} + - **[S]**: Search tools {4} - **[SEC]**: Security tools {7} - - **[SC]**: Structure compare {20} - - **[ST]**: Statistics utilities {4} - - **[T]**: Testing tools {6} - - **[?]**: Not yet classified {133} - -| Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | -|------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-----------------------|------------|----------------|------:| -| [SSMS](#ssms) | No | No | [MS] | [SSMS] | 2020-04-07 | Microsoft | | Yes | No | -| [Azure Data Studio](#ads) | PostgreSQL | Linux,Mac | [MS] | [Azure Data Studio] | 2020-05-20 | Microsoft | [MIT] | Open Source | No | -| [bcp Utility](#bcp) | No | No | [I] | [bcp Utility] | 2012-02-11 | Microsoft | | Yes | No | -| [sqlcmd Utility](#sqlcmd-utility) | No | No | [I] | [sqlcmd Utility] | 2016-08-23 | Microsoft | | Yes | No | -| [mssql-cli](#mssql-cli) | No | Linux,Mac | [?] | [mssql-cli] | 2020-05-01 | Microsoft | [BSD-3] | Open Source | No | -| [RML Utilities for SQL Server](#rml) | No | No | [T] | [RML Utilities for SQL Server] | 2014-12-12 | Microsoft | | Yes | No | -| [GraphView](#graphview) | No | No | [?] | [GraphView] | 2016-02-23 | Microsoft | | Yes | No | -| [Baseline Security Analyze](#baseline-security-analyze) | No | No | [SEC] | [Baseline Security Analyze] | 2015-01-09 | Microsoft | | Yes | No | -| [tablediff Utility](#tablediff-utility) | No | No | [I] | [tablediff Utility] | - | Microsoft | | Yes | No | -| [Microsoft Log Parser](#microsoft-log-parser) | No | No | [?] | [Microsoft Log Parser] | - | Microsoft | | Yes | No | -| [Log Parser Lizard GUI](#log-parser-lizard-gui) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Log Parser Lizard GUI] | 2017-06-01 | Lizard Labs | | Yes | $59 | -| [Diskspd](#diskspd) | No | No | [T] | [Diskspd] | 2015-12-14 | Microsoft | | Yes | No | -| [HammerDB](#hammerdb) | No | No | [T] | [HammerDB] | 2015-05-04 | Open Source | | Yes | No | -| [Exchange Server Error Code Look-up](#error-code-look-up) | No | No | [?] | [Exchange Server Error Code Look-up] | 2004-05-10 | Microsoft | | Yes | No | -| [LINQPad](#linqpad) | No | No | [?] | [LINQPad] | 2016-01-02 | Joseph Albahari | | Non-commercial | $45 | -| [SqlDynamite](#sqldynamite) | No | No | [S] | [SqlDynamite] | 2016-04-06 | Anatoly Sova | | Yes | No | -| [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | -| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | -| [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | -| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | -| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | -| [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | -| [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | -| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Sybase](#sybasetosql) | No | No | [MG] | [Migration Assistant for Sybase] | 2017-02-17 | Microsoft | | Yes | No | -| [dta Utility](#dta-utility) | No | No | [I] | [dta Utility] | - | Microsoft | | Yes | No | -| [osql Utility](#osql-utility) | No | No | [I] | [osql Utility] | - | Microsoft | | Yes | No | -| [sqldiag Utility](#sqldiag-utility) | No | No | [I] | [sqldiag Utility] | - | Microsoft | | Yes | No | -| [sqldumper Utility](#sqldumper-utility) | No | No | [I] | [sqldumper Utility] | - | Microsoft | | Yes | No | -| [SqlLocalDB Utility](#sqllocaldb-utility) | No | No | [I] | [SqlLocalDB Utility] | - | Microsoft | | Yes | No | -| [sqllogship Utility](#sqllogship-utility) | No | No | [I] | [sqllogship Utility] | - | Microsoft | | Yes | No | -| [sqlservr Application](#sqlservr-application) | No | No | [I] | [sqlservr Application] | - | Microsoft | | Yes | No | -| [sqlps Utility](#sqlps-utility) | No | No | [I] | [sqlps Utility] | - | Microsoft | | Yes | No | -| [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | -| [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | -| [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | -| [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | -| [SQL Server 2005 Best Practices Analyzer](#bpa-2005) | No | No | [?] | [BPA 2005] | 2008-08-13 | Microsoft | | Yes | No | -| [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | -| [SQL Server 2008 R2 Best Practices Analyzer](#bpa-2008) | No | No | [?] | [BPA 2008] | 2010-06-18 | Microsoft | | Yes | No | -| [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | -| [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | -| [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | -| [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | -| [Red Gate SQL Prompt](#red-gate-sql-prompt) | No | No | [MS] | [Red Gate SQL Prompt] | 2016-04-28 | Red Gate | | No | $369 | -| [Red Gate SQL Monitor](#red-gate-sql-monitor) | No | No | [M] | [Red Gate SQL Monitor] | 2015-10-15 | Red Gate | | No | $1495 | -| [Red Gate SQL Backup Pro](#red-gate-sql-backup-pro) | No | No | [B] | [Red Gate SQL Backup Pro] | 2014-07-08 | Red Gate | | No | $995 | -| [Red Gate SQL Doc](#red-gate-sql-doc) | No | No | [D] | [Red Gate SQL Doc] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Data Generator](#red-gate-sql-data-generator) | No | No | [G] | [Red Gate SQL Data Generator] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Dependency Tracker](#sql-dependency-tracker) | No | No | [?] | [Red Gate SQL Dependency Tracker] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Multi Script](#red-gate-sql-multi-script) | No | No | [?] | [Red Gate SQL Multi Script] | 2016-04-15 | Red Gate | | No | $245 | -| [Red Gate SQL Index Manager](#red-gate-sql-index-manager) | No | No | [IDX] | [Red Gate SQL Index Manager] | ? | Red Gate | | No | $149 | -| [Red Gate SQL Comparison SDK](#red-gate-sql-comparison-sdk) | No | No | [DC],[SC]| [Red Gate SQL Comparison SDK] | 2016-02-22 | Red Gate | | No | $895 | -| [Red Gate SQL Clone](#red-gate-sql-clone) | No | No | [?] | [Red Gate SQL Clone] | 2017-02-27 | Red Gate | | No | $6955 | -| [Red Gate SQL Provision](#red-gate-sql-provision) | No | No | [?] | [Red Gate SQL Provision] | 2018-02-26 | Red Gate | | No | $2955 | -| [Red Gate Data Masker](#red-gate-data-masker) | Oracle | No | [?] | [Red Gate SQL Data Masker] | 2018-02-26 | Red Gate | | No | $2395 | -| [DLM Automation](#dlm-automation) | No | No | [?] | [DLM Automation] | ? | Red Gate | | No | ? | -| [ReadyRoll](#readyroll) | No | No | [?] | [ReadyRoll] | 2016-01-03 | Red Gate | | No | $345 | -| [SQL Search](#sql-search) | No | No | [S] | [SQL Search] | ? | Red Gate | | Yes | No | -| [SQL Scripts Manager](#sql-scripts-manager) | No | No | [?] | [SQL Scripts Manager] | ? | Red Gate | | Yes | No | -| [Rapid Database Extractor](#rapid-database-extractor) | Oracle | No | [?] | [Rapid Database Extractor] | 2016-11-03 | Idera | | Yes | No | -| [SQL XEvent Profiler](#sql-xevent-profiler) | No | No | [?] | [SQL XEvent Profiler] | 2014-03-14 | Idera | | Yes | No | -| [SQL Check](#sql-check) | No | No | [?] | [SQL Check] | 2015-09-24 | Idera | | Yes | No | -| [SQL Fragmentation Analyzer](#sql-fragmentation-analyzer) | No | No | [?] | [SQL Fragmentation Analyzer] | 2012-11-16 | Idera | | Yes | No | -| [SQL Heat Map](#sql-heat-map) | No | No | [?] | [SQL Heat Map] | 2016-01-27 | Idera | | Yes | No | -| [SQL Hekaton Memory Check](#sql-hekaton-memory-check) | No | No | [?] | [SQL Hekaton Memory Check] | 2015-06-10 | Idera | | Yes | No | -| [SQL Page Viewer](#sql-page-viewer) | No | No | [?] | [SQL Page Viewer] | 2014-08-25 | Idera | | Yes | No | -| [SQL Update Statistics](#sql-update-statistics) | No | No | [ST] | [SQL Update Statistics] | 2015-12-14 | Idera | | Yes | No | -| [SQL Statistics Aggregator](#sql-statistics-aggregator) | No | No | [ST] | [SQL Statistics Aggregator] | 2015-05-18 | Idera | | Yes | No | -| [SQL Backup Status Reporter](#sql-backup-status-reporter) | No | No | [B] | [SQL Backup Status Reporter] | 2015-08-07 | Idera | | Yes | No | -| [SQL Integrity Check](#sql-integrity-check) | No | No | [?] | [SQL Integrity Check] | 2013-08-26 | Idera | | Yes | No | -| [SQL Job Manager](#sql-job-manager) | No | No | [J] | [SQL Job Manager] | 2012-03-19 | Idera | | Yes | No | -| [Azure SQL Database Backup](#azure-sql-database-backup) | No | No | [B] | [Azure SQL Database Backup] | 2012-10-02 | Idera | | Yes | No | -| [SQL Column Search](#sql-column-search) | No | No | [S] | [SQL Column Search] | 2015-11-17 | Idera | | Yes | No | -| [SQL Permissions Extractor](#sql-permissions-extractor) | No | No | [?] | [SQL Permissions Extractor] | 2015-08-07 | Idera | | Yes | No | -| [SQL BI Check](#sql-bi-check) | No | No | [BI] | [SQL BI Check] | 2016-04-13 | Idera | | Yes | No | -| [SQL Inventory Check](#sql-inventory-check) | No | No | [?] | [SQL Inventory Check] | 2016-03-24 | Idera | | Yes | No | -| [SQL Diagnostic Manager](#sql-diagnostic-manager) | No | No | [?] | [SQL Diagnostic Manager] | ? | Idera | | No | $1747 | -| [SQL Safe Backup](#sql-safe-backup) | No | No | [B] | [SQL Safe Backup] | 2016-09-08 | Idera | | No | $907 | -| [SQL Compliance Manager](#sql-compliance-manager) | No | No | [?] | [SQL Compliance Manager] | 2015-09-08 | Idera | | No | $2657 | -| [SQL Inventory Manager](#sql-inventory-manager) | No | No | [?] | [SQL Inventory Manager] | 2016-04-22 | Idera | | No | $3195 | -| [SQL Virtual Database](#sql-virtual-database) | No | No | [?] | [SQL Virtual Database] | 2016-03-24 | Idera | | No | $625 | -| [SQL Secure](#sql-secure) | No | No | [?] | [SQL Secure] | 2016-04-19 | Idera | | No | $907 | -| [SQL Doctor](#sql-doctor) | No | No | [?] | [SQL Doctor] | 2015-12-17 | Idera | | No | $625 | -| [SQL Admin Toolset](#sql-admin-toolset) | No | No | [?] | [SQL Admin Toolset] | 2016-01-13 | Idera | | No | $395 | -| [SQL Defrag Manager](#sql-defrag-manager) | No | No | [?] | [SQL Defrag Manager] | 2016-03-10 | Idera | | No | $1495 | -| [DBArtisan](#dbartisan) | No | No | [?] | [DBArtisan] | ? | Idera | | No | $3122 | -| [SQL BI Manager](#sql-bi-manager) | No | No | [BI] | [SQL BI Manager] | 2015-09-08 | Idera | | No | $697 | -| [SQL Enterprise Job Manager](#sql-enterprise-job-manager) | No | No | [J] | [SQL Enterprise Job Manager] | 2015-09-08 | Idera | | No | $697 | -| [DB Optimizer](#db-optimizer) | No | No | [?] | [DB Optimizer] | ? | Idera | | No | $1420 | -| [SQL Query Store Optimizer](#sql-query-store-optimizer) | No | No | [?] | [SQL Query Store Optimizer] | 2016-07-01 | Idera | | Yes | No | -| [Rapid SQL](#rapid-sql) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Rapid SQL] | ? | Idera | | No | $710 | -| [SQL Comparison Toolset](#sql-comparison-toolset) | No | No | [DC],[SC]| [SQL Comparison Toolset] | ? | Idera | | No | $745 | -| [ER/Studio Data Architect](#erstudio-data-architect) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ER/Studio Data Architect] | | Idera | | No | $1287 | -| [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | -| [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | -| [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | -| [SQL Data Profiler](#sql-data-profiler) | No | No | [?] | [SQL Data Profiler] | ? | Idera | | No | ? | -| [SQL Instance Check](#sql-instance-check) | No | No | [M] | [SQL Instance Check] | ? | Idera | | Yes | ? | -| [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | -| [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | -| [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | -| [dbForge Query Builder](#dbforge-query-builder) | No | No | [?] | [dbForge Query Builder] | 2019-10-10 | Devart | Shareware | No | $100 | -| [dbForge Event Profiler](#dbforge-event-profiler) | No | No | [M] | [dbForge Event Profiler] | 2019-10-10 | Devart | Freeware | Yes | No | -| [dbForge SQL Decryptor](#dbforge-sql-decryptor) | No | No | [SEC] | [dbForge SQL Decryptor] | 2017-09-19 | Devart | Freeware | Yes | No | -| [dbForge Studio](#dbforge-studio) | No | No | [MS] | [dbForge Studio] | 2019-10-10 | Devart | Shareware | Yes | $250 | -| [dbForge Fusion](#dbforge-fusion) | No | No | [?] | [dbForge Fusion] | 2019-11-08 | Devart | Shareware | No | $150 | -| [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | -| [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | -| [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | -| [dbForge Search](#dbforge-search) | No | No | [S] | [dbForge Search] | 2019-10-10 | Devart | Freeware | Yes | No | -| [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | -| [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | -| [Minion Enterprise](#minion-enterprise) | No | No | [?] | [Minion Enterprise] | ? | MinionWare | | No | $1500 | -| [SQL Server Compression Estimator](#compression-estimator) | No | No | [?] | [SQL Server Compression Estimator] | 2011-06-02 | Bob Tavlor | | Yes | No | -| [ClearTrace](#cleartrace) | No | No | [M] | [ClearTrace] | 2016-07-07 | Bill Graziano | | Yes | No | -| [ClearTraceXE](#cleartracexe) | No | No | [M] | [ClearTraceXE] | 2019-09-04 | Bill Graziano | | Yes | No | -| [Security Explorer](#security-explorer) | No | No | [SEC] | [Security Explorer] | 2015-06-25 | Quest Software | | No | $850 | -| [LiteSpeed for SQL Server](#litespeed-for-sql-server) | No | No | [?] | [LiteSpeed for SQL Server] | 2015-07-31 | Quest Software | | No | ? | -| [Toad for SQL Server](#toad-for-sql-server) | No | No | [MS] | [Toad for SQL Server] | 2015-05-12 | Quest Software | | No | ? | -| [Quest Spotlight on SQL Server Enterprise](#quest-spotlight) | No | No | [?] | [Quest Spotlight] | 2016-03-10 | Quest Software | | No | $2561 | -| [Quest Foglight](#quest-foglight) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Quest Foglight] | 2019-08-29 | Quest Software | | No | $8203 | -| [Quest Enterprise Reporter](#quest-enterprise-reporter) | No | No | [?] | [Quest Enterprise Reporter] | ? | Quest Software | | No | $511 | -| [SQL Scripter](#sql-scripter) | No | No | [?] | [SQL Scripter] | 2013-02-24 | Thomas Hinsenkamp | | No | €99 | -| [Simple Dynamic Scheduler](#simple-dynamic-scheduler) | No | No | [?] | [Simple Dynamic Scheduler] | 2016-05-02 | Miljan Radovic | | Yes | No | -| [ApexSQL Audit](#apexsql-audit) | No | No | [?] | [ApexSQL Audit] | 2017-07-11 | ApexSQL | | No | $1699 | -| [ApexSQL Backup](#apexsql-backup) | No | No | [B] | [ApexSQL Backup] | 2017-10-12 | ApexSQL | | No | $499 | -| [ApexSQL Defrag](#apexsql-defrag) | No | No | [IDX] | [ApexSQL Defrag] | 2017-06-29 | ApexSQL | | No | $499 | -| [ApexSQL Log](#apexsql-log) | No | No | [?] | [ApexSQL Log] | 2017-05-24 | ApexSQL | | No | $1999 | -| [ApexSQL Monitor](#apexsql-monitor) | No | No | [M] | [ApexSQL Monitor] | 2017-10-05 | ApexSQL | | No | $499 | -| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2019-12-02 | ApexSQL | | Yes | No | -| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2020-02-19 | ApexSQL | | Yes | No | -| [ApexSQL Recover](#apexsql-recover) | No | No | [REC] | [ApexSQL Recover] | 2017-10-26 | ApexSQL | | No | $1999 | -| [ApexSQL Build](#apexsql-build) | No | No | [?] | [ApexSQL Build] | 2017-05-15 | ApexSQL | | No | $399 | -| [ApexSQL Clean](#apexsql-clean) | No | No | [?] | [ApexSQL Clean] | 2017-09-28 | ApexSQL | | No | $399 | -| [ApexSQL Data Diff](#apexsql-data-diff) | No | No | [DC] | [ApexSQL Data Diff] | 2017-10-26 | ApexSQL | | No | $399 | -| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2020-03-12 | ApexSQL | | Yes | No | -| [ApexSQL Diff](#apexsql-diff) | No | No | [SC] | [ApexSQL Diff] | 2017-10-26 | ApexSQL | | No | $399 | -| [ApexSQL Doc](#apexsql-doc) | No | No | [D] | [ApexSQL Doc] | 2017-09-06 | ApexSQL | | No | $299 | -| [ApexSQL Generate](#apexsql-generate) | No | No | [G] | [ApexSQL Generate] | 2017-07-13 | ApexSQL | | No | $499 | -| [ApexSQL Script](#apexsql-script) | No | No | [?] | [ApexSQL Script] | 2016-05-10 | ApexSQL | | No | $249 | -| [ApexSQL Trigger](#apexsql-trigger) | No | No | [?] | [ApexSQL Trigger] | 2017-06-01 | ApexSQL | | No | $1999 | -| [ApexSQL Trigger Veiwer](#apexsql-trigger-viewer) | No | No | [?] | [ApexSQL Trigger Viewer] | 2017-06-01 | ApexSQL | | Yes | No | -| [ApexSQL Snapshot Utility](#apexsql-snapshot-utility) | No | No | [?] | [ApexSQL Snapshot Utility] | 2016-01-12 | ApexSQL | | Yes | No | -| [ApexSQL Model](#apexsql-model) | No | No | [DA] | [ApexSQL Model] | 2019-05-22 | ApexSQL | | Yes | No | -| [ApexSQL Analyze](#apexsql-analyze) | No | No | [?] | [ApexSQL Analyze] | 2017-12-13 | ApexSQL | | No | $299 | -| [ApexSQL BI Monitor](#apexsql-bi-monitor) | No | No | [BI],[M] | [ApexSQL BI Monitor] | 2018-05-18 | ApexSQL | | No | $499 | -| [ApexSQL VM Monitor](#apexsql-vm-monitor) | No | No | [M] | [ApexSQL VM Monitor] | 2018-05-09 | ApexSQL | | No | $999 | -| [ApexSQL Job](#apexsql-job) | No | No | [J] | [ApexSQL Job] | 2018-03-29 | ApexSQL | | No | $499 | -| [ApexSQL Enforce](#apexsqlL-enforce) | No | No | [?] | [ApexSQL Enforce] | 2018-07-19 | ApexSQL | | No | $299 | -| [ApexSQL CI/CD toolkit](#apexsql-ci-cd) | No | No | [?] | [ApexSQL CI/CD toolkit] | 2020-05-21 | ApexSQL | | Yes | No | -| [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | -| [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | -| [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | -| [ApexSQL Search](#apexsql-search) | No | No | [S] | [ApexSQL Search] | 2020-05-28 | ApexSQL | | Yes | No | -| [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | -| [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | -| [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | -| [SqlDiffFramework](#sqldiffframework) | No | No | [SC] | [SqlDiffFramework] | 2012-04-17 | Michael Sorens | | Yes | No | -| [DataGrip](#datagrip) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [DataGrip] | 2017-02-21 | Jet Brains | | No | $89 | -| [Pssdiag and Sqldiag Manager](#pssdiag-and-sqldiag-manager) | No | No | [?] | [Pssdiag and Sqldiag Manager] | 2017-01-06 | Jack Li | | Yes | No | -| [SQL Nexus Tool](#sql-nexus-tool) | No | No | [?] | [SQL Nexus Tool] | 2016-11-20 | Jack Li | | Yes | No | -| [DBSophic Qure Profiler](#dbsophic-qure-profiler) | No | No | [?] | [DBSophic Qure Profiler] | ? | DBSophic | | No | $300 | -| [DBSophic Qure Optimizer](#dbsophic-qure-optimizer) | No | No | [?] | [DBSophic Qure Optimizer] | ? | DBSophic | | No | ? | -| [RestoreChecker](#restorechecker) | No | No | [?] | [RestoreChecker] | 2015-01-15 | SQLServerUtilities | | No | $99 | -| [SQLScripter](#sqlscripter) | No | No | [?] | [SQLScripter] | 2009-08-24 | SQLServerUtilities | | No | $99 | -| [SQLC](#sqlc) | No | No | [DC],[SC]| [SQLC] | 2017-11-19 | David Ingleton | | Yes | No | -| [Database Performance Analyzer](#dpa-solarwinds) | Oracle, MySQL, Other | Linux | [M] | [Database Performance Analyzer] | ? | SolarWinds | | No | $1995 | -| [Database Performance Analyzer for MSSQL](#dpa-solarwinds-mssql) | No | No | [M] | [Database Performance Analyzer for MSSQL] | ? | SolarWinds | | No | $1995 | -| [SQL Enlight](#sql-enlight) | No | No | [MS] | [SQL Enlight] | 2016-04-25 | UbitSoft | | No | $295 | -| [Aireforge Studio](#aireforge-studio) | No | No | [MG],[SC]| [Aireforge Studio] | 2019-08-08 | AireForge | | Yes | $299 | -| [HexaTier](#hexatier) | No | No | [?] | [HexaTier] | ? | HexaTier | | No | ? | -| [SoftTree SQL Assistant](#softtree-sql-assistant) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [SoftTree SQL Assistant] | 2017-12-17 | SoftTree | | No | $215 | -| [DB Audit and Security 360](#db-audit-and-security-360) | Oracle,MySQL,Other | No | [SEC] | [DB Audit and Security 360] | 2015-02-07 | SoftTree | | No | $499 | -| [EMS SQL Management Studio](#ems-management-studio) | No | No | [MS] | [EMS SQL Management Studio] | 2016-05-26 | EMS | | No | $257 | -| [EMS SQL Backup](#ems-sql-backup) | No | No | [B] | [EMS SQL Backup] | 2016-04-13 | EMS | | Yes | $82 | -| [EMS SQL Administrator](#ems-sql-administrator) | No | No | [?] | [EMS SQL Administrator] | 2015-04-14 | EMS | | Yes | $135 | -| [EMS SQL Manager](#ems-sql-manager) | No | No | [?] | [EMS SQL Manager] | 2016-05-26 | EMS | | Yes | $135 | -| [EMS Data Export](#ems-data-export) | No | No | [?] | [EMS Data Export] | 2016-04-29 | EMS | | No | $47 | -| [EMS Data Import](#ems-data-import) | No | No | [?] | [EMS Data Import] | 2016-04-14 | EMS | | No | $47 | -| [EMS Data Pump](#ems-data-pump) | No | No | [?] | [EMS Data Pump] | 2016-11-03 | EMS | | No | $47 | -| [EMS Data Generator](#ems-generator) | No | No | [G] | [EMS Data Generator] | 2010-07-10 | EMS | | No | $47 | -| [EMS DB Comparer](#ems-bd-comparer) | No | No | [SC] | [EMS DB Comparer] | 2015-07-24 | EMS | | No | $47 | -| [EMS DB Extract](#ems-bd-extract) | No | No | [?] | [EMS DB Extract] | 2008-10-16 | EMS | | No | $47 | -| [EMS SQL Query](#ems-sql-query) | No | No | [?] | [EMS SQL Query] | 2012-03-29 | EMS | | No | $47 | -| [EMS Data Comparer](#ems-data-comparer) | No | No | [DC] | [EMS Data Comparer] | 2012-11-16 | EMS | | No | $47 | -| [NitroAccelerator](#nitroaccelerator) | No | No | [?] | [NitroAccelerator] | 2016-07-10 | Nitrosphere | | No | $1265 | -| [ERwin Data Modeler](#erwin-data-modeler) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERwin Data Modeler] | 2016-06-03 | ERwin | | No | $810 | -| [Toad Data Point](#toad-data-point) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Toad Data Point] | 2016-06-16 | Quest Software | | No | ? | -| [SQL Power Architect](#sql-power-architect) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [SQL Power Architect] | 2016-02-11 | SQLPower | | Yes | $995 | -| [DbWrench](#dbwrench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbWrench] | 2019-09-17 | Nizana Systems | | No | $99 | -| [Navicat Data Modeler](#navicat-data-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Navicat Data Modeler] | 2016-08-01 | PremiumSoft | | No | $199 | -| [DeZign for Databases](#dezign-for-databases) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [DeZign for Databases] | 2019-04-01 | Datanamic | | No | €29/mo| -| [ERDesigner NG](#erdesigner-ng) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [ERDesigner NG] | 2013-04-10 | Mirko Sertic | | Open Source | No | -| [Vertabelo](#vertabelo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Vertabelo] | ? | Vertabelo | | No | $948 | -| [dbDiffo](#dbdiffo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [dbDiffo] | ? | Contenet Ltd | | Yes | No | -| [SQL DXP](#sql-dxp) | Oracle,MySQL | No | [DC],[SC]| [SQL DXP] | 2016-06-20 | SQL Delta | | No | $530 | -| [Aqua Data Studio](#aqua-data-studio) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Aqua Data Studio] | 2016-07-06 | AquaFold | | No | $499 | -| [RazorSQL](#razorsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [RazorSQL] | 2019-09-26 | Richardson Software | | No | $100 | -| [SQL Pretty Printer](#sql-pretty-printer) | No | No | [?] | [SQL Pretty Printer] | 2016-02-19 | Gudu Software | | No | $50 | -| [Database .NET](#database-net) | Oracle,MySQL,PostgreSQL,Other | No | [MS],[SC]| [Database .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $69 | -| [dbMigration .NET](#dbmegration-net) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [dbMigration .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $49 | -| [Is It SQL](#is-it-sql) | No | No | [M] | [Is It SQL] | 2017-04-06 | Bill Graziano | | Non-commercial | No | -| [Database Experimentation Assistant](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2020-03-20 | Microsoft | | Yes | No | -| [Data Platform Studio](#dps) | No | No | [MG] | [Data Platform Studio] | ? | Red Gate Software | | Yes | ? | -| [Flyway](#flyway) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Flyway] | 2018-01-30 | boxfuse | [Apache] | Open Source | $950 | -| [Liquibase](#liquibase) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Liquibase] | 2018-04-11 | Liquibase | [Apache] | Open Source | No | -| [My Batis](#my-batis) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [My Batis] | 2018-03-20 | My Batis | [Apache] | Open Source | No | -| [SentryOne Plan Explorer](#sentryone-plan-explorer) | No | No | [?] | [SentryOne Plan Explorer] | 2017-05-25 | SentryOne | | Yes | No | -| [SQL Sentry](#sql-sentry) | No | No | [M] | [SQL Sentry] | 2016-12-07 | SentryOne | | No | ? | -| [DBmaestro TeamWork](#dbmaestro-teamwork) | Oracle | No | [?] | [DBmaestro TeamWork] | ? | DBmaestro | | No | ? | -| [xSQL Schema Compare](#xsql-schema-compare) | No | No | [SC] | [xSQL Schema Compare] | 2017-03-01 | xSQL Software | Shareware | Yes | $399 | -| [xSQL Data Compare](#xsql-data-compare) | No | No | [DK] | [xSQL Data Compare] | 2017-06-26 | xSQL Software | Shareware | Yes | $399 | -| [xSQL Script Executor](#xsql-script-executor) | MySQL,DB2,SQL Server CE | No | [?] | [xSQL Script Executor] | 2015-02-25 | xSQL Software | Freeware | Yes | $249 | -| [xSQL Builder](#xsql-builder) | No | No | [?] | [xSQL Builder] | 2017-03-15 | xSQL Software | Shareware | No | $799 | -| [xSQL Documenter](#xsql-documenter) | Oracle,MySQL,SQLite,Other | No | [D] | [xSQL Documenter] | 2017-01-04 | xSQL Software | Shareware | No | $199 | -| [xSQL Profiler](#xsql-profiler) | No | No | [?] | [xSQL Profiler] | 2017-06-28 | xSQL Software | Shareware | Yes | $999 | -| [xSQL Schema Compare SDK](#xsql-schema-compare-sdk) | No | No | [SC] | [xSQL Schema Compare SDK] | 2017-10-25 | xSQL Software | Shareware | No | $1499 | -| [xSQL RSS Reporter](#xsql-rss-reporter) | No | No | [D] | [xSQL RSS Reporter] | 2014-11-25 | xSQL Software | Shareware | No | $169 | -| [xSQL Database Searcher](#xsql-database-sercher) | No | No | [S] | [xSQL Database Searcher] | 2017-05-09 | xSQL Software | Freeware | Yes | No | -| [Cloud-based DB Monitoring Platform](#cbmp) | No | Mobile | [M] | [Cloud-based DB Monitoring Platform] | ? | SQLTreeo | | No | €180 | -| [SchemaCrawler](#schema-crawler) | Oracle,MySQL,PostgreSQL,Other | Yes | [D],[SC] | [SchemaCrawler] | 2017-02-27 | Sualeh Fatehi | | Open Source | No | -| [SA MaaS Microsoft SQL Server](#sa-maas) | No | No | [M] | [SA MaaS Microsoft SQL Server] | ? | SENTINELAGENT | | No | ? | -| [SSIS Framework](#ssis-framework) | No | No | [ETL] | [SSIS Framework] | 2017-01-07 | Andy Leonard | | Yes | ? | -| [SSIS Catalog Browser](#ssis-browser) | No | No | [ETL] | [SSIS Catalog Browser] | 2019-04-23 | Andy Leonard | | Yes | No | -| [BimlExpress Metadata Framework](#bimlexpress) | No | No | [?] | [BimlExpress Metadata Framework] | 2017-01-06 | Andy Leonard | | Yes | No | -| [MS Kerberos Configuration Manager](#mkcm) | No | No | [?] | [MS Kerberos Configuration Manager] | 2017-01-31 | Microsoft | | Yes | No | -| [Spotlight](#spotlight) | No | No | [M] | [Spotlight] | ? | Quest Software | | Yes | ? | -| [DBConvert Studio](#dbconvert-studio) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [DBConvert Studio] | 2020-05-11 | Slotix | | No | $499 | -| [DbDefence](#dbdefence) | No | No | [?] | [DbDefence] | 2017-03-01 | ActiveCrypt Software | | Yes | $698 | -| [SQL Server Migration Assistant for MySQL](#ssma-mysql) | MySQL | No | [MG] | [SQL Server Migration Assistant for MySQL] | 2017-02-17 | Microsoft | | Yes | No | -| [sqlcmd for Mac and Linux](#sqlcmd) | No | Linux,Mac | [?] | [sqlcmd for Mac and Linux] | 2017-01-26 | Soheil Rashidi | | Open Source | No | -| [SQL Migrator](#sql-migrator) | No | No | [MG] | [SQL Migrator] | ? | Datamate Technology | | ? | ? | -| [MS FoxPro to MS SQL Migration and Sync](#foxpro-sqlserver) | No | No | [MG] | [MS FoxPro to MS SQL Migration and Sync] | 2019-04-25 | Slotix | | No | $149 | -| [MySQL to MS SQL Migration and Sync](#mysql-sqlserver) | No | No | [MG] | [MySQL to MS SQL Migration and Sync] | 2018-10-03 | Slotix | | No | $149 | -| [Oracle to MS SQL Migration and Sync](#oracle-sqlserver) | No | No | [MG] | [Oracle to MS SQL Migration and Sync] | 2020-02-12 | Slotix | | No | $149 | -| [PostgreSQL to MS SQL Migration and Sync](#postgresql-sqlserver) | No | No | [MG] | [PostgreSQL to MS SQL Migration and Sync] | 2019-10-24 | Slotix | | No | $149 | -| [MS Excel to MS SQL Migration](#msexcel-sqlserver) | No | No | [MG] | [MS Excel to MS SQL Migration] | 2018-02-23 | Slotix | | No | $149 | -| [SQLite to MS SQL Migration and Sync](#sqllite-sqlserver) | No | No | [MG] | [SQLite to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | -| [IBM DB2 to MS SQL Migration and Sync](#db2-sqlserver) | No | No | [MG] | [IBM DB2 to MS SQL Migration and Sync] | 2019-07-09 | Slotix | | No | $149 | -| [MS Access to MS SQL Migration and Sync](#access-sqlserver) | No | No | [MG] | [MS Access to MS SQL Migration and Sync] | 2020-01-15 | Slotix | | No | $149 | -| [Firebird to MS SQL Migration and Sync](#firebird-sqlserver) | No | No | [MG] | [Firebird to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | -| [SQLines SQL Converter](#sqllines-converter) | No | No | [MG] | [SQLines SQL Converter] | ? | Dmtolpeko | | Open Source | No | -| [SQLite & SQL Server Compact Toolbox](#sqlite-sqlserver-toolbox) | No | No | [?] | [SQLite & SQL Server Compact Toolbox] | ? | ErikEJ | | Open Source | No | -| [SqlPad](#sqlpad) | Postgres,MySQL,Crate,Vertica | No | [MS] | [SqlPad] | ? | Rickbergfalk | | Open Source | No | -| [Html-query-plan](#html-query-plan) | No | No | [?] | [Html-query-plan] | ? | JustinPealing | | Open Source | No | -| [SqlQueryStress](#sql-query-stress) | No | No | [?] | [SqlQueryStress] | ? | Adam Machanic | | Open Source | No | -| [SQL Server Migration Assistant for DB2](#ssma-db2) | DB2 | No | [MG] | [SQL Server Migration Assistant for DB2] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Oracle](#ssma-oracle) | Oracle | No | [MG] | [SQL Server Migration Assistant for Oracle] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Access](#ssma-access) | Access | No | [MG] | [SQL Server Migration Assistant for Access] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for SAP ASE](#ssma-sap) | SAP ASE | No | [MG] | [SQL Server Migration Assistant for SAP ASE]| 2020-06-29 | Microsoft | | Yes | No | -| [mssql for Visual Studio Code](#mssql-for-vs-code) | No | Linux,Mac | [MS] | [mssql for Visual Studio Code] | 2017-05-02 | Microsoft | | Open Source | No | -| [Microsoft Assessment and Planning](#map) | No | No | [?] | [Microsoft Assessment and Planning] | 2017-02-10 | Microsoft | | Yes | No | -| [mssql-scripter](#mssql-scripter) | No | Linux,Mac | [?] | [mssql-scripter] | ? | Microsoft | | Open Source | No | -| [DBFS](#dbfs) | No | Linux | [M] | [DBFS] | ? | Microsoft | | Open Source | No | -| [comparator](#pumpet-comparator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [comparator] | 2017-06-06 | Pumpet | [LGPL-3.0] | Open Source | No | -| [Navicat for SQL Server](#navicat-for-sql-server) | No | Mac | [MS] | [Navicat for SQL Server] | 2017-06-14 | PremiumSoft | | No | $699 | -| [Navicat Premium](#navicat-premium) | Oracle,MySQL,PostgreSQL,Other | Mac | [MS] | [Navicat Premium] | 2017-06-14 | PremiumSoft | | No | $1299 | -| [DbVisualizer](#dbvisualizer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS],[DA]| [DbVisualizer] | 2017-08-22 | DbVis Software AB. | | Yes | $197 | -| [DbSchema](#dbschema) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbSchema] | 2017-06-19 | Wise Coders Solutions | | Yes | $127 | -| [DBGhost](#dbghost) | No | No | [?] | [DBGhost] | 2017-01-31 | Innovartis Ltd | | No | £430 | -| [SQLAutomate](#sqlautomate) | Oracle,MySQL,Other | No | [?] | [SQLAutomate] | 2017-06-19 | OnLine ToolWorks     | | No | $99 | -| [BimlExpress](#bimlexpress) | No | No | [?] | [BimlExpress] | ? | Varigence   | | No | No | -| [BI Developer Extensions](#bi-developer-extensions) | No | No | [?] | [BI Developer Extensions] | 2019-04-29 | Microsoft   | | Open Source | No | -| [Azure Data Warehouse Migration Utility](#azure-migration) | No | No | [MG] | [Azure Data Warehouse Migration Utility] | ? | Microsoft | | ? | ? | -| [Benchmark Factory](#benchmark-factory) | Oracle,MySQL,Other | No | [T] | [Benchmark Factory] | ? | Quest Software | | No | $4413 | -| [manduka](#manduka) | Oracle | Linux,Mac | [?] | [manduka] | 2017-03-08 | Virtusa Corporation | | Yes | No | -| [PowerBI Desktop](#powerbi-desktop) | Oracle,MySQL,PostgreSQL,Other | No | [BI] | [PowerBI Desktop] | 2017-07-11 | Microsoft | | Yes | ? | -| [Stellar Phoenix SQL Database Repair](#stellar-phoenix) | No | No | [REC] | [Stellar Phoenix SQL Database Repair] | 2017-07-05 | Stellar Technology | | No | $349 | -| [DataNumen SQL Recovery](#datanumen-sql-recovery) | No | No | [REC] | [DataNumen SQL Recovery] | 2017-03-20 | DataNumen | | No | $500 | -| [Recovery Toolbox for SQL Server](#recovery-toolbox) | No | No | [REC] | [Recovery Toolbox for SQL Server] | ? | Recovery Toolbox | Shareware | No | $99 | -| [SQL MDF Viewer](#sql-mdf-viewer) | No | No | [?] | [SQL MDF Viewer] | ? | SysTools | Shareware | No | $129 | -| [SQL MDF Recovery Tool](#sql-mdf-recovery-tool) | No | No | [REC] | [SQL MDF Recovery Tool] | ? | SysTools | Shareware | No | $129 | -| [SQL Passord Recovery](#sql-password-recovery) | No | No | [REC] | [SQL Passord Recovery] | ? | SysTools | Shareware | No | $69 | -| [SQL Decryptor](#sql-decryptor) | No | No | [SEC] | [SQL Decryptor] | ? | SysTools | Shareware | No | $69 | -| [SQL Backup Database Recovery](#sql-backup-database-recovery) | No | No | [REC] | [SQL Backup Database Recovery] | ? | SysTools | Shareware | No | $149 | -| [SQL Log File Viewer](#sql-log-file-viewer) | No | No | [?] | [SQL Log File Viewer] | ? | SysTools | Shareware | No | $999 | -| [DAX Studio](#dax-studio) | No | No | [?] | [DAX Studio] | ? | Sqlbi | Freeware | Yes | No | -| [SQL Cop](#sql-cop) | No | No | [?] | [SQL Cop] | ? | LessThanDot | Freeware | Yes | No | -| [Dataedo](#dataedo) | Oracle,MySQL | No | [D] | [Dataedo] | 2017-09-15 | Logic Systems | Shareware | Yes | $239 | -| [Azure Database Migration Service](#azure-db-migration) | Oracle,MySQL, Other | Online | [MG] | [Azure Database Migration Service] | 2017-12-01 | Microsoft | | Yes | No | -| [FlowHeater](#flowheater) | Oracle,MySQL,PostgreSQL,Other | No | [ETL] | [FlowHeater] | 2017-10-02 | FlowHeater GmbH | Shareware | No | $79 | -| [EDIS](#edis) | No | No | [ETL] | [EDIS] | ? | SQL ETL | Shareware | Yes | $599 | -| [SchemaSpy](#schemaspy) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [D] | [SchemaSpy] | 2018-08-05 | Rafal Kasa | [MIT] | Open Source | No | -| [Adminer](#adminer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Adminer] | 2019-08-27 | Jakub Vrána | [Apache] | Open Source | No | -| [Full Convert](#full-convert) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Full Convert] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | -| [Replicator](#replicator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [Replicator] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | -| [JackDB](#jackdb) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [JackDB] | ? | JackDB | | No | $48 | -| [SQL Workbench](#sql-workbench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQL Workbench] | 2018-08-20 | Thomas Kellerer | | Yes | No | -| [Valentina Studio](#valentina-studio) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Valentina Studio] | 2018-09-24 | Paradigma Software | | Yes | $200 | -| [SQL Plus Dot Net](#sql-plus-dot-net) | No | No | [?] | [SQL Plus Dot Net] | ? | SQL+.NET | | No | ? | -| [SQLIndexManager](#sqlindexmanager) | No | No | [IDX] | [SQLIndexManager] | 2019-05-19 | Sergey Syrovatchenko | | Open Source | No | -| [JAMS Enterprise Job Scheduling](#jams-job) | No | No | [J] | [JAMS Enterprise Job Scheduling] | 2019-08-20 | HelpSystems | | No | ? | -| [Stitch Data Loader](#stitch) | Oracle,MySQL,PostgreSQL,Other | Online | [ETL] | [Stitch Data Loader] | 2019-09-20 | Talend | | No | ? | -| [Talend Data Integration](#talend-integration) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Integration] | 2019-06-20 | Talend | [Apache] | Yes | ? | -| [Talend Data Preparation](#talend-preparation) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Preparation] | 2018-06-05 | Talend | [Apache] | Yes | ? | -| [Pentaho Data Integration](#pentaho) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [ETL] | [Pentaho Data Integration] | 2019-06-20 | Hitachi Vantara | Shareware | No | ? | -| [Studio3T](#studio3t) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [Studio3T] | 2019-09-19 | Studio 3T | Shareware | No | $150 | -| [SQLGrease](#sqlgrease) | No | Online | [M] | [SQLGrease] | 2019-09-20 | SQLGrease | Shareware | No | $948 | -| [QuickDBD](#quickdbd) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [QuickDBD] | ? | Dovetail Technologies | | Yes | $95 | -| [DB Designer](#dbdesigner) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [DB Designer] | ? | DB Designer | | Yes | $180 | -| [ESF Database Migration Toolkit](#esf) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [ESF Database Migration Toolkit] | 2019-10-23 | DBSofts Inc | Shareware | No | $322 | -| [MS SQL Migration Toolkit](#msskit) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [MS SQL Migration Toolkit] | 2019-04-22 | Intelligent Converters| Shareware | No | $99 | -| [DatabasesSpy](#databasespy) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [DatabaseSpy] | 2019-10-09 | Altova | Shareware | No | €109 | -| [DiffDog](#diffdog) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [DiffDog] | 2019-10-09 | Altova | Shareware | No | €109 | -| [ERBuilder data modeler](#erbuilder) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERBuilder data modeler] | 2019-11-14 | Softbuilder | | Yes | $99 | -| [SQLDatabaseStudio](#sqldatabasestudio) | No | No | [MS] | [SQLDatabaseStudio] | 2017-05-10 | Jan Pivarcek | | Yes | $215 | -| [Enterprise Architect](#ea) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Enterprise Architect] | 2019-10-31 | Sparx Systems Pty Ltd | Shareware | No | $225 | -| [MogwaiERDesignerNG](#mogwai) | Oracle,MySQL,PostgreSQL | No | [DA] | [MogwaiERDesignerNG] | 2019-08-22 | Mirko Sertic | [LGPL-3.0] | Open Source | No | -| [Xcase](#xcase) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Xcase] | 2018-06-19 | Resolution Software | Shareware | No | $799 | -| [Oracle SQL Developer Data Modeler](#oracle-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Oracle SQL Developer Data Modeler] | 2019-08-01 | Oracle | Shareware | Yes | No | -| [Exportizer](#exportizer) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Exportizer] | 2019-11-17 | Vitaliy Levchenko | Shareware | No | $29 | -| [Reportizer](#reportizer) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Reportizer] | 2019-09-10 | Vitaliy Levchenko | Shareware | No | $39 | -| [Database Tour](#database-tour) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Database Tour] | 2019-11-20 | Vitaliy Levchenko | Shareware | No | $49 | -| [Ispirer MnMATK](#mnmatk) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Ispirer MnMATK] | ? | Ispirer Systems | Shareware | No | ? | -| [SQL Database Recovery](#sql-database-recovery) | No | No | [REC] | [SQL Database Recovery] | 2019-09-10 | KernelApps Private | Shareware | No | $399 | -| [SysTools SQL Log Analyzer](#log-analzyer) | No | No | [M][REC] | [SysTools SQL Log Analyzer] | 2019-01-01 | SysTools | Shareware | No | $999 | -| [SysTools SQL Server Recovery Manager](#systools-rec-manager) | No | No | [REC] | [SysTools SQL Log Analyzer] | 2017-01-01 | SysTools | Shareware | No | $1499 | -| [SysTools SQL Recovery](#systools-recovery) | No | No | [REC] | [SysTools SQL Recovery] | 2019-01-01 | SysTools | Shareware | No | $249 | -| [SQL Backup Recovery](#systools-backup-recovery) | No | No | [REC] | [SQL Backup Recovery] | 2018-01-01 | SysTools | Shareware | No | $149 | -| [SysTools SQL Password Recovery](#systools-password-recovery) | No | No | [REC] | [SysTools SQL Password Recovery] | 2018-01-01 | SysTools | Shareware | No | $69 | -| [SysTools SQL Decryptor](#systools-sql-decryptor) | No | No | [SEC] | [SysTools SQL Decryptor] | 2019-01-01 | SysTools | Shareware | No | $69 | -| [SysTools SQL Server Database Migrator](#systools-migrator) | No | No | [MG] | [SysTools SQL Server Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $249 | -| [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | -| [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | -| [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | -| [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | -| [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | -| [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | -| [DbViewSharp](#dbviewsharp) | No | No | [MS] | [DbViewSharp] | 2014-08-08 | David Moore | [MIT] | Yes | No | -| [DTSQL](#dtsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [DTSQL] | 2017-08-18 | DigerTech Inc | Shareware | Yes | $69 | -| [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | -| [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | -| [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | -| [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | -| [sp_Blitz](#sp-blitz) | No | No | [?] | [sp_Blitz] | ? | Brent Ozar | | Yes | No | -| [sp_whoisactive](#sp-whoisactive) | No | No | [M] | [sp_whoisactive] | 2017-10-10 | Adam Machanic | | Yes | No | -| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell, Gerd Wagner| | Yes | No | -| [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | -| [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | -| [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | -| [SQLDBSize](#sqldbsize) | No | No | [?] | [SQLDBSize] | ? | Mohamed Bouarroudj | | Yes | No | -| [SQLines Data](#sqlines-data) | Oracle,MySQL,PostgreSQL,Other | Linux |[MG],[ETL]| [SQLines Data] | 2019-05-29 | SQLines | | Open Source | No | -| [SqlDbAid](#sqldbaid) | No | No | [?] | [SqlDbAid] | 2018-02-10 | Miken | | Yes | No | -| [sqlectron](#sqlectron) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [sqlectron] | 2018-09-06 | sqlectron | | Open Source | No | -| [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | -| [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | -| [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | -| [SQL Hunting Dog](#sql-hunting-dog) | No | No | [S] | [SQL Hunting Dog] | ? | SQL Hunting Dog | | Yes | No | -| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions| | Yes | No | -| [SQL Server Backup](#sql-server-backup) | No | No | [B] | [SQL Server Backup] | ? | Ola Hallengren | | Yes | No | -| [SQL Server Integrity Check](#sql-server-integrity-check) | No | No | [?] | [SQL Server Integrity Check] | ? | Ola Hallengren | | Yes | No | -| [SQL Server Index and Statistics Maintenance](#index-stat-maint) | No | No | [I],[ST] | [SQL Server Index and Statistics Maintenance]| ? | Ola Hallengren | | Yes | No | -| [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | -| [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | -| [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | -| [TSQLT](#tsqlt) | No | No | [T] | [TSQLT] | ? | sqlity.net llc | | Yes | No | -| [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | -| [YourSqlDba](#yoursqldba) | No | No | [?] | [YourSqlDba] | 2020-05-05 | Maurice Pelchat | | Open Source | No | - + - **[SC]**: Structure compare {21} + - **[ST]**: Statistics utilities {3} + - **[T]**: Testing tools {5} + - **[?]**: Not yet classified {127} + +| Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | +|------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-------------------------|------------|----------------|------:| +| [SSMS](#ssms) | No | No | [MS] | [SSMS] | 2020-04-07 | Microsoft | | Yes | No | +| [Azure Data Studio](#ads) | PostgreSQL | Linux,Mac | [MS] | [Azure Data Studio] | 2020-05-20 | Microsoft | [MIT] | Open Source | No | +| [bcp Utility](#bcp) | No | No | [I] | [bcp Utility] | 2012-02-11 | Microsoft | | Yes | No | +| [sqlcmd Utility](#sqlcmd-utility) | No | No | [I] | [sqlcmd Utility] | 2016-08-23 | Microsoft | | Yes | No | +| [mssql-cli](#mssql-cli) | No | Linux,Mac | [?] | [mssql-cli] | 2020-05-01 | Microsoft | [BSD-3] | Open Source | No | +| [RML Utilities for SQL Server](#rml) | No | No | [T] | [RML Utilities for SQL Server] | 2014-12-12 | Microsoft | | Yes | No | +| [GraphView](#graphview) | No | No | [?] | [GraphView] | 2016-02-23 | Microsoft | | Yes | No | +| [Baseline Security Analyze](#baseline-security-analyze) | No | No | [SEC] | [Baseline Security Analyze] | 2015-01-09 | Microsoft | | Yes | No | +| [tablediff Utility](#tablediff-utility) | No | No | [I] | [tablediff Utility] | - | Microsoft | | Yes | No | +| [Microsoft Log Parser](#microsoft-log-parser) | No | No | [?] | [Microsoft Log Parser] | - | Microsoft | | Yes | No | +| [Log Parser Lizard GUI](#log-parser-lizard-gui) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Log Parser Lizard GUI] | 2017-06-01 | Lizard Labs | | Yes | $59 | +| [Diskspd](#diskspd) | No | No | [T] | [Diskspd] | 2015-12-14 | Microsoft | | Yes | No | +| [HammerDB](#hammerdb) | No | No | [T] | [HammerDB] | 2015-05-04 | Open Source | | Yes | No | +| [Exchange Server Error Code Look-up](#error-code-look-up) | No | No | [?] | [Exchange Server Error Code Look-up] | 2004-05-10 | Microsoft | | Yes | No | +| [LINQPad](#linqpad) | No | No | [?] | [LINQPad] | 2016-01-02 | Joseph Albahari | | Non-commercial | $45 | +| [SqlDynamite](#sqldynamite) | No | No | [S] | [SqlDynamite] | 2016-04-06 | Anatoly Sova | | Yes | No | +| [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | +| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | +| [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | +| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | +| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | +| [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | +| [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | +| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Sybase](#sybasetosql) | No | No | [MG] | [Migration Assistant for Sybase] | 2017-02-17 | Microsoft | | Yes | No | +| [dta Utility](#dta-utility) | No | No | [I] | [dta Utility] | - | Microsoft | | Yes | No | +| [osql Utility](#osql-utility) | No | No | [I] | [osql Utility] | - | Microsoft | | Yes | No | +| [sqldiag Utility](#sqldiag-utility) | No | No | [I] | [sqldiag Utility] | - | Microsoft | | Yes | No | +| [sqldumper Utility](#sqldumper-utility) | No | No | [I] | [sqldumper Utility] | - | Microsoft | | Yes | No | +| [SqlLocalDB Utility](#sqllocaldb-utility) | No | No | [I] | [SqlLocalDB Utility] | - | Microsoft | | Yes | No | +| [sqllogship Utility](#sqllogship-utility) | No | No | [I] | [sqllogship Utility] | - | Microsoft | | Yes | No | +| [sqlservr Application](#sqlservr-application) | No | No | [I] | [sqlservr Application] | - | Microsoft | | Yes | No | +| [sqlps Utility](#sqlps-utility) | No | No | [I] | [sqlps Utility] | - | Microsoft | | Yes | No | +| [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | +| [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | +| [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | +| [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | +| [SQL Server 2005 Best Practices Analyzer](#bpa-2005) | No | No | [?] | [BPA 2005] | 2008-08-13 | Microsoft | | Yes | No | +| [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | +| [SQL Server 2008 R2 Best Practices Analyzer](#bpa-2008) | No | No | [?] | [BPA 2008] | 2010-06-18 | Microsoft | | Yes | No | +| [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | +| [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | +| [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | +| [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | +| [Red Gate SQL Monitor](#red-gate-sql-monitor) | No | No | [M] | [Red Gate SQL Monitor] | 2015-10-15 | Red Gate | | No | $1495 | +| [Red Gate SQL Backup Pro](#red-gate-sql-backup-pro) | No | No | [B] | [Red Gate SQL Backup Pro] | 2014-07-08 | Red Gate | | No | $995 | +| [Red Gate SQL Doc](#red-gate-sql-doc) | No | No | [D] | [Red Gate SQL Doc] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Data Generator](#red-gate-sql-data-generator) | No | No | [G] | [Red Gate SQL Data Generator] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Dependency Tracker](#sql-dependency-tracker) | No | No | [?] | [Red Gate SQL Dependency Tracker] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Multi Script](#red-gate-sql-multi-script) | No | No | [?] | [Red Gate SQL Multi Script] | 2016-04-15 | Red Gate | | No | $245 | +| [Red Gate SQL Index Manager](#red-gate-sql-index-manager) | No | No | [IDX] | [Red Gate SQL Index Manager] | ? | Red Gate | | No | $149 | +| [Red Gate SQL Comparison SDK](#red-gate-sql-comparison-sdk) | No | No | [DC],[SC]| [Red Gate SQL Comparison SDK] | 2016-02-22 | Red Gate | | No | $895 | +| [Red Gate SQL Clone](#red-gate-sql-clone) | No | No | [?] | [Red Gate SQL Clone] | 2017-02-27 | Red Gate | | No | $6955 | +| [Red Gate SQL Provision](#red-gate-sql-provision) | No | No | [?] | [Red Gate SQL Provision] | 2018-02-26 | Red Gate | | No | $2955 | +| [Red Gate Data Masker](#red-gate-data-masker) | Oracle | No | [?] | [Red Gate SQL Data Masker] | 2018-02-26 | Red Gate | | No | $2395 | +| [DLM Automation](#dlm-automation) | No | No | [?] | [DLM Automation] | ? | Red Gate | | No | ? | +| [ReadyRoll](#readyroll) | No | No | [?] | [ReadyRoll] | 2016-01-03 | Red Gate | | No | $345 | +| [Rapid Database Extractor](#rapid-database-extractor) | Oracle | No | [?] | [Rapid Database Extractor] | 2016-11-03 | Idera | | Yes | No | +| [SQL XEvent Profiler](#sql-xevent-profiler) | No | No | [?] | [SQL XEvent Profiler] | 2014-03-14 | Idera | | Yes | No | +| [SQL Check](#sql-check) | No | No | [?] | [SQL Check] | 2015-09-24 | Idera | | Yes | No | +| [SQL Fragmentation Analyzer](#sql-fragmentation-analyzer) | No | No | [?] | [SQL Fragmentation Analyzer] | 2012-11-16 | Idera | | Yes | No | +| [SQL Heat Map](#sql-heat-map) | No | No | [?] | [SQL Heat Map] | 2016-01-27 | Idera | | Yes | No | +| [SQL Hekaton Memory Check](#sql-hekaton-memory-check) | No | No | [?] | [SQL Hekaton Memory Check] | 2015-06-10 | Idera | | Yes | No | +| [SQL Page Viewer](#sql-page-viewer) | No | No | [?] | [SQL Page Viewer] | 2014-08-25 | Idera | | Yes | No | +| [SQL Update Statistics](#sql-update-statistics) | No | No | [ST] | [SQL Update Statistics] | 2015-12-14 | Idera | | Yes | No | +| [SQL Statistics Aggregator](#sql-statistics-aggregator) | No | No | [ST] | [SQL Statistics Aggregator] | 2015-05-18 | Idera | | Yes | No | +| [SQL Backup Status Reporter](#sql-backup-status-reporter) | No | No | [B] | [SQL Backup Status Reporter] | 2015-08-07 | Idera | | Yes | No | +| [SQL Integrity Check](#sql-integrity-check) | No | No | [?] | [SQL Integrity Check] | 2013-08-26 | Idera | | Yes | No | +| [SQL Job Manager](#sql-job-manager) | No | No | [J] | [SQL Job Manager] | 2012-03-19 | Idera | | Yes | No | +| [Azure SQL Database Backup](#azure-sql-database-backup) | No | No | [B] | [Azure SQL Database Backup] | 2012-10-02 | Idera | | Yes | No | +| [SQL Column Search](#sql-column-search) | No | No | [S] | [SQL Column Search] | 2015-11-17 | Idera | | Yes | No | +| [SQL Permissions Extractor](#sql-permissions-extractor) | No | No | [?] | [SQL Permissions Extractor] | 2015-08-07 | Idera | | Yes | No | +| [SQL BI Check](#sql-bi-check) | No | No | [BI] | [SQL BI Check] | 2016-04-13 | Idera | | Yes | No | +| [SQL Inventory Check](#sql-inventory-check) | No | No | [?] | [SQL Inventory Check] | 2016-03-24 | Idera | | Yes | No | +| [SQL Diagnostic Manager](#sql-diagnostic-manager) | No | No | [?] | [SQL Diagnostic Manager] | ? | Idera | | No | $1747 | +| [SQL Safe Backup](#sql-safe-backup) | No | No | [B] | [SQL Safe Backup] | 2016-09-08 | Idera | | No | $907 | +| [SQL Compliance Manager](#sql-compliance-manager) | No | No | [?] | [SQL Compliance Manager] | 2015-09-08 | Idera | | No | $2657 | +| [SQL Inventory Manager](#sql-inventory-manager) | No | No | [?] | [SQL Inventory Manager] | 2016-04-22 | Idera | | No | $3195 | +| [SQL Virtual Database](#sql-virtual-database) | No | No | [?] | [SQL Virtual Database] | 2016-03-24 | Idera | | No | $625 | +| [SQL Secure](#sql-secure) | No | No | [?] | [SQL Secure] | 2016-04-19 | Idera | | No | $907 | +| [SQL Doctor](#sql-doctor) | No | No | [?] | [SQL Doctor] | 2015-12-17 | Idera | | No | $625 | +| [SQL Admin Toolset](#sql-admin-toolset) | No | No | [?] | [SQL Admin Toolset] | 2016-01-13 | Idera | | No | $395 | +| [SQL Defrag Manager](#sql-defrag-manager) | No | No | [?] | [SQL Defrag Manager] | 2016-03-10 | Idera | | No | $1495 | +| [DBArtisan](#dbartisan) | No | No | [?] | [DBArtisan] | ? | Idera | | No | $3122 | +| [SQL BI Manager](#sql-bi-manager) | No | No | [BI] | [SQL BI Manager] | 2015-09-08 | Idera | | No | $697 | +| [SQL Enterprise Job Manager](#sql-enterprise-job-manager) | No | No | [J] | [SQL Enterprise Job Manager] | 2015-09-08 | Idera | | No | $697 | +| [DB Optimizer](#db-optimizer) | No | No | [?] | [DB Optimizer] | ? | Idera | | No | $1420 | +| [SQL Query Store Optimizer](#sql-query-store-optimizer) | No | No | [?] | [SQL Query Store Optimizer] | 2016-07-01 | Idera | | Yes | No | +| [Rapid SQL](#rapid-sql) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Rapid SQL] | ? | Idera | | No | $710 | +| [SQL Comparison Toolset](#sql-comparison-toolset) | No | No | [DC],[SC]| [SQL Comparison Toolset] | ? | Idera | | No | $745 | +| [ER/Studio Data Architect](#erstudio-data-architect) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ER/Studio Data Architect] | | Idera | | No | $1287 | +| [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | +| [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | +| [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | +| [SQL Data Profiler](#sql-data-profiler) | No | No | [?] | [SQL Data Profiler] | ? | Idera | | No | ? | +| [SQL Instance Check](#sql-instance-check) | No | No | [M] | [SQL Instance Check] | ? | Idera | | Yes | ? | +| [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | +| [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | +| [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | +| [dbForge Query Builder](#dbforge-query-builder) | No | No | [?] | [dbForge Query Builder] | 2019-10-10 | Devart | Shareware | No | $100 | +| [dbForge Event Profiler](#dbforge-event-profiler) | No | No | [M] | [dbForge Event Profiler] | 2019-10-10 | Devart | Freeware | Yes | No | +| [dbForge SQL Decryptor](#dbforge-sql-decryptor) | No | No | [SEC] | [dbForge SQL Decryptor] | 2017-09-19 | Devart | Freeware | Yes | No | +| [dbForge Studio](#dbforge-studio) | No | No | [MS] | [dbForge Studio] | 2019-10-10 | Devart | Shareware | Yes | $250 | +| [dbForge Fusion](#dbforge-fusion) | No | No | [?] | [dbForge Fusion] | 2019-11-08 | Devart | Shareware | No | $150 | +| [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | +| [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | +| [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | +| [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | +| [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | +| [SQL Server Compression Estimator](#compression-estimator) | No | No | [?] | [SQL Server Compression Estimator] | 2011-06-02 | Bob Tavlor | | Yes | No | +| [ClearTrace](#cleartrace) | No | No | [M] | [ClearTrace] | 2016-07-07 | Bill Graziano | | Yes | No | +| [ClearTraceXE](#cleartracexe) | No | No | [M] | [ClearTraceXE] | 2019-09-04 | Bill Graziano | | Yes | No | +| [Security Explorer](#security-explorer) | No | No | [SEC] | [Security Explorer] | 2015-06-25 | Quest Software | | No | $850 | +| [LiteSpeed for SQL Server](#litespeed-for-sql-server) | No | No | [?] | [LiteSpeed for SQL Server] | 2015-07-31 | Quest Software | | No | ? | +| [Toad for SQL Server](#toad-for-sql-server) | No | No | [MS] | [Toad for SQL Server] | 2015-05-12 | Quest Software | | No | ? | +| [Quest Spotlight on SQL Server Enterprise](#quest-spotlight) | No | No | [?] | [Quest Spotlight] | 2016-03-10 | Quest Software | | No | $2561 | +| [Quest Foglight](#quest-foglight) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Quest Foglight] | 2019-08-29 | Quest Software | | No | $8203 | +| [Quest Enterprise Reporter](#quest-enterprise-reporter) | No | No | [?] | [Quest Enterprise Reporter] | ? | Quest Software | | No | $511 | +| [SQL Scripter](#sql-scripter) | No | No | [?] | [SQL Scripter] | 2013-02-24 | Thomas Hinsenkamp | | No | €99 | +| [Simple Dynamic Scheduler](#simple-dynamic-scheduler) | No | No | [?] | [Simple Dynamic Scheduler] | 2016-05-02 | Miljan Radovic | | Yes | No | +| [ApexSQL Audit](#apexsql-audit) | No | No | [?] | [ApexSQL Audit] | 2017-07-11 | ApexSQL | | No | $1699 | +| [ApexSQL Backup](#apexsql-backup) | No | No | [B] | [ApexSQL Backup] | 2017-10-12 | ApexSQL | | No | $499 | +| [ApexSQL Defrag](#apexsql-defrag) | No | No | [IDX] | [ApexSQL Defrag] | 2017-06-29 | ApexSQL | | No | $499 | +| [ApexSQL Log](#apexsql-log) | No | No | [?] | [ApexSQL Log] | 2017-05-24 | ApexSQL | | No | $1999 | +| [ApexSQL Monitor](#apexsql-monitor) | No | No | [M] | [ApexSQL Monitor] | 2017-10-05 | ApexSQL | | No | $499 | +| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2019-12-02 | ApexSQL | | Yes | No | +| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2020-02-19 | ApexSQL | | Yes | No | +| [ApexSQL Recover](#apexsql-recover) | No | No | [REC] | [ApexSQL Recover] | 2017-10-26 | ApexSQL | | No | $1999 | +| [ApexSQL Build](#apexsql-build) | No | No | [?] | [ApexSQL Build] | 2017-05-15 | ApexSQL | | No | $399 | +| [ApexSQL Clean](#apexsql-clean) | No | No | [?] | [ApexSQL Clean] | 2017-09-28 | ApexSQL | | No | $399 | +| [ApexSQL Data Diff](#apexsql-data-diff) | No | No | [DC] | [ApexSQL Data Diff] | 2017-10-26 | ApexSQL | | No | $399 | +| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2020-03-12 | ApexSQL | | Yes | No | +| [ApexSQL Diff](#apexsql-diff) | No | No | [SC] | [ApexSQL Diff] | 2017-10-26 | ApexSQL | | No | $399 | +| [ApexSQL Doc](#apexsql-doc) | No | No | [D] | [ApexSQL Doc] | 2017-09-06 | ApexSQL | | No | $299 | +| [ApexSQL Generate](#apexsql-generate) | No | No | [G] | [ApexSQL Generate] | 2017-07-13 | ApexSQL | | No | $499 | +| [ApexSQL Script](#apexsql-script) | No | No | [?] | [ApexSQL Script] | 2016-05-10 | ApexSQL | | No | $249 | +| [ApexSQL Trigger](#apexsql-trigger) | No | No | [?] | [ApexSQL Trigger] | 2017-06-01 | ApexSQL | | No | $1999 | +| [ApexSQL Trigger Veiwer](#apexsql-trigger-viewer) | No | No | [?] | [ApexSQL Trigger Viewer] | 2017-06-01 | ApexSQL | | Yes | No | +| [ApexSQL Snapshot Utility](#apexsql-snapshot-utility) | No | No | [?] | [ApexSQL Snapshot Utility] | 2016-01-12 | ApexSQL | | Yes | No | +| [ApexSQL Model](#apexsql-model) | No | No | [DA] | [ApexSQL Model] | 2019-05-22 | ApexSQL | | Yes | No | +| [ApexSQL Analyze](#apexsql-analyze) | No | No | [?] | [ApexSQL Analyze] | 2017-12-13 | ApexSQL | | No | $299 | +| [ApexSQL BI Monitor](#apexsql-bi-monitor) | No | No | [BI],[M] | [ApexSQL BI Monitor] | 2018-05-18 | ApexSQL | | No | $499 | +| [ApexSQL VM Monitor](#apexsql-vm-monitor) | No | No | [M] | [ApexSQL VM Monitor] | 2018-05-09 | ApexSQL | | No | $999 | +| [ApexSQL Job](#apexsql-job) | No | No | [J] | [ApexSQL Job] | 2018-03-29 | ApexSQL | | No | $499 | +| [ApexSQL Enforce](#apexsqlL-enforce) | No | No | [?] | [ApexSQL Enforce] | 2018-07-19 | ApexSQL | | No | $299 | +| [ApexSQL CI/CD toolkit](#apexsql-ci-cd) | No | No | [?] | [ApexSQL CI/CD toolkit] | 2020-05-21 | ApexSQL | | Yes | No | +| [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | +| [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | +| [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | +| [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | +| [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | +| [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | +| [SqlDiffFramework](#sqldiffframework) | No | No | [SC] | [SqlDiffFramework] | 2012-04-17 | Michael Sorens | | Yes | No | +| [DataGrip](#datagrip) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [DataGrip] | 2017-02-21 | Jet Brains | | No | $89 | +| [Pssdiag and Sqldiag Manager](#pssdiag-and-sqldiag-manager) | No | No | [?] | [Pssdiag and Sqldiag Manager] | 2017-01-06 | Jack Li | | Yes | No | +| [SQL Nexus Tool](#sql-nexus-tool) | No | No | [?] | [SQL Nexus Tool] | 2016-11-20 | Jack Li | | Yes | No | +| [DBSophic Qure Profiler](#dbsophic-qure-profiler) | No | No | [?] | [DBSophic Qure Profiler] | ? | DBSophic | | No | $300 | +| [DBSophic Qure Optimizer](#dbsophic-qure-optimizer) | No | No | [?] | [DBSophic Qure Optimizer] | ? | DBSophic | | No | ? | +| [RestoreChecker](#restorechecker) | No | No | [?] | [RestoreChecker] | 2015-01-15 | SQLServerUtilities | | No | $99 | +| [SQLScripter](#sqlscripter) | No | No | [?] | [SQLScripter] | 2009-08-24 | SQLServerUtilities | | No | $99 | +| [SQLC](#sqlc) | No | No | [DC],[SC]| [SQLC] | 2017-11-19 | David Ingleton | | Yes | No | +| [Database Performance Analyzer](#dpa-solarwinds) | Oracle, MySQL, Other | Linux | [M] | [Database Performance Analyzer] | ? | SolarWinds | | No | $1995 | +| [Database Performance Analyzer for MSSQL](#dpa-solarwinds-mssql) | No | No | [M] | [Database Performance Analyzer for MSSQL] | ? | SolarWinds | | No | $1995 | +| [SQL Enlight](#sql-enlight) | No | No | [MS] | [SQL Enlight] | 2016-04-25 | UbitSoft | | No | $295 | +| [Aireforge Studio](#aireforge-studio) | No | No | [MG],[SC]| [Aireforge Studio] | 2019-08-08 | AireForge | | Yes | $299 | +| [HexaTier](#hexatier) | No | No | [?] | [HexaTier] | ? | HexaTier | | No | ? | +| [SoftTree SQL Assistant](#softtree-sql-assistant) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [SoftTree SQL Assistant] | 2017-12-17 | SoftTree | | No | $215 | +| [DB Audit and Security 360](#db-audit-and-security-360) | Oracle,MySQL,Other | No | [SEC] | [DB Audit and Security 360] | 2015-02-07 | SoftTree | | No | $499 | +| [EMS SQL Management Studio](#ems-management-studio) | No | No | [MS] | [EMS SQL Management Studio] | 2016-05-26 | EMS | | No | $257 | +| [EMS SQL Backup](#ems-sql-backup) | No | No | [B] | [EMS SQL Backup] | 2016-04-13 | EMS | | Yes | $82 | +| [EMS SQL Administrator](#ems-sql-administrator) | No | No | [?] | [EMS SQL Administrator] | 2015-04-14 | EMS | | Yes | $135 | +| [EMS SQL Manager](#ems-sql-manager) | No | No | [?] | [EMS SQL Manager] | 2016-05-26 | EMS | | Yes | $135 | +| [EMS Data Export](#ems-data-export) | No | No | [?] | [EMS Data Export] | 2016-04-29 | EMS | | No | $47 | +| [EMS Data Import](#ems-data-import) | No | No | [?] | [EMS Data Import] | 2016-04-14 | EMS | | No | $47 | +| [EMS Data Pump](#ems-data-pump) | No | No | [?] | [EMS Data Pump] | 2016-11-03 | EMS | | No | $47 | +| [EMS Data Generator](#ems-generator) | No | No | [G] | [EMS Data Generator] | 2010-07-10 | EMS | | No | $47 | +| [EMS DB Comparer](#ems-bd-comparer) | No | No | [SC] | [EMS DB Comparer] | 2015-07-24 | EMS | | No | $47 | +| [EMS DB Extract](#ems-bd-extract) | No | No | [?] | [EMS DB Extract] | 2008-10-16 | EMS | | No | $47 | +| [EMS SQL Query](#ems-sql-query) | No | No | [?] | [EMS SQL Query] | 2012-03-29 | EMS | | No | $47 | +| [EMS Data Comparer](#ems-data-comparer) | No | No | [DC] | [EMS Data Comparer] | 2012-11-16 | EMS | | No | $47 | +| [NitroAccelerator](#nitroaccelerator) | No | No | [?] | [NitroAccelerator] | 2016-07-10 | Nitrosphere | | No | $1265 | +| [ERwin Data Modeler](#erwin-data-modeler) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERwin Data Modeler] | 2016-06-03 | ERwin | | No | $810 | +| [Toad Data Point](#toad-data-point) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Toad Data Point] | 2016-06-16 | Quest Software | | No | ? | +| [SQL Power Architect](#sql-power-architect) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [SQL Power Architect] | 2016-02-11 | SQLPower | | Yes | $995 | +| [DbWrench](#dbwrench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbWrench] | 2019-09-17 | Nizana Systems | | No | $99 | +| [Navicat Data Modeler](#navicat-data-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Navicat Data Modeler] | 2016-08-01 | PremiumSoft | | No | $199 | +| [DeZign for Databases](#dezign-for-databases) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [DeZign for Databases] | 2019-04-01 | Datanamic | | No | €29/mo| +| [ERDesigner NG](#erdesigner-ng) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [ERDesigner NG] | 2013-04-10 | Mirko Sertic | | Open Source | No | +| [Vertabelo](#vertabelo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Vertabelo] | ? | Vertabelo | | No | $948 | +| [dbDiffo](#dbdiffo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [dbDiffo] | ? | Contenet Ltd | | Yes | No | +| [SQL DXP](#sql-dxp) | Oracle,MySQL | No | [DC],[SC]| [SQL DXP] | 2016-06-20 | SQL Delta | | No | $530 | +| [Aqua Data Studio](#aqua-data-studio) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Aqua Data Studio] | 2016-07-06 | AquaFold | | No | $499 | +| [RazorSQL](#razorsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [RazorSQL] | 2019-09-26 | Richardson Software | | No | $100 | +| [SQL Pretty Printer](#sql-pretty-printer) | No | No | [?] | [SQL Pretty Printer] | 2016-02-19 | Gudu Software | | No | $50 | +| [Database .NET](#database-net) | Oracle,MySQL,PostgreSQL,Other | No | [MS],[SC]| [Database .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $69 | +| [dbMigration .NET](#dbmegration-net) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [dbMigration .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $49 | +| [Is It SQL](#is-it-sql) | No | No | [M] | [Is It SQL] | 2017-04-06 | Bill Graziano | | Non-commercial | No | +| [Database Experimentation Assistant](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2020-03-20 | Microsoft | | Yes | No | +| [Data Platform Studio](#dps) | No | No | [MG] | [Data Platform Studio] | ? | Red Gate Software | | Yes | ? | +| [Flyway](#flyway) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Flyway] | 2018-01-30 | boxfuse | [Apache] | Open Source | $950 | +| [Liquibase](#liquibase) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Liquibase] | 2018-04-11 | Liquibase | [Apache] | Open Source | No | +| [My Batis](#my-batis) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [My Batis] | 2018-03-20 | My Batis | [Apache] | Open Source | No | +| [SentryOne Plan Explorer](#sentryone-plan-explorer) | No | No | [?] | [SentryOne Plan Explorer] | 2017-05-25 | SentryOne | | Yes | No | +| [SQL Sentry](#sql-sentry) | No | No | [M] | [SQL Sentry] | 2016-12-07 | SentryOne | | No | ? | +| [DBmaestro TeamWork](#dbmaestro-teamwork) | Oracle | No | [?] | [DBmaestro TeamWork] | ? | DBmaestro | | No | ? | +| [xSQL Schema Compare](#xsql-schema-compare) | No | No | [SC] | [xSQL Schema Compare] | 2017-03-01 | xSQL Software | Shareware | Yes | $399 | +| [xSQL Data Compare](#xsql-data-compare) | No | No | [DK] | [xSQL Data Compare] | 2017-06-26 | xSQL Software | Shareware | Yes | $399 | +| [xSQL Script Executor](#xsql-script-executor) | MySQL,DB2,SQL Server CE | No | [?] | [xSQL Script Executor] | 2015-02-25 | xSQL Software | Freeware | Yes | $249 | +| [xSQL Builder](#xsql-builder) | No | No | [?] | [xSQL Builder] | 2017-03-15 | xSQL Software | Shareware | No | $799 | +| [xSQL Documenter](#xsql-documenter) | Oracle,MySQL,SQLite,Other | No | [D] | [xSQL Documenter] | 2017-01-04 | xSQL Software | Shareware | No | $199 | +| [xSQL Profiler](#xsql-profiler) | No | No | [?] | [xSQL Profiler] | 2017-06-28 | xSQL Software | Shareware | Yes | $999 | +| [xSQL Schema Compare SDK](#xsql-schema-compare-sdk) | No | No | [SC] | [xSQL Schema Compare SDK] | 2017-10-25 | xSQL Software | Shareware | No | $1499 | +| [xSQL RSS Reporter](#xsql-rss-reporter) | No | No | [D] | [xSQL RSS Reporter] | 2014-11-25 | xSQL Software | Shareware | No | $169 | +| [xSQL Database Searcher](#xsql-database-sercher) | No | No | [S] | [xSQL Database Searcher] | 2017-05-09 | xSQL Software | Freeware | Yes | No | +| [Cloud-based DB Monitoring Platform](#cbmp) | No | Mobile | [M] | [Cloud-based DB Monitoring Platform] | ? | SQLTreeo | | No | €180 | +| [SchemaCrawler](#schema-crawler) | Oracle,MySQL,PostgreSQL,Other | Yes | [D],[SC] | [SchemaCrawler] | 2017-02-27 | Sualeh Fatehi | | Open Source | No | +| [SA MaaS Microsoft SQL Server](#sa-maas) | No | No | [M] | [SA MaaS Microsoft SQL Server] | ? | SENTINELAGENT | | No | ? | +| [SSIS Framework](#ssis-framework) | No | No | [ETL] | [SSIS Framework] | 2017-01-07 | Andy Leonard | | Yes | ? | +| [SSIS Catalog Browser](#ssis-browser) | No | No | [ETL] | [SSIS Catalog Browser] | 2019-04-23 | Andy Leonard | | Yes | No | +| [BimlExpress Metadata Framework](#bimlexpress) | No | No | [?] | [BimlExpress Metadata Framework] | 2017-01-06 | Andy Leonard | | Yes | No | +| [MS Kerberos Configuration Manager](#mkcm) | No | No | [?] | [MS Kerberos Configuration Manager] | 2017-01-31 | Microsoft | | Yes | No | +| [Spotlight](#spotlight) | No | No | [M] | [Spotlight] | ? | Quest Software | | Yes | ? | +| [DBConvert Studio](#dbconvert-studio) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [DBConvert Studio] | 2020-05-11 | Slotix | | No | $499 | +| [DbDefence](#dbdefence) | No | No | [?] | [DbDefence] | 2017-03-01 | ActiveCrypt Software | | Yes | $698 | +| [SQL Server Migration Assistant for MySQL](#ssma-mysql) | MySQL | No | [MG] | [SQL Server Migration Assistant for MySQL] | 2017-02-17 | Microsoft | | Yes | No | +| [sqlcmd for Mac and Linux](#sqlcmd) | No | Linux,Mac | [?] | [sqlcmd for Mac and Linux] | 2017-01-26 | Soheil Rashidi | | Open Source | No | +| [SQL Migrator](#sql-migrator) | No | No | [MG] | [SQL Migrator] | ? | Datamate Technology | | ? | ? | +| [MS FoxPro to MS SQL Migration and Sync](#foxpro-sqlserver) | No | No | [MG] | [MS FoxPro to MS SQL Migration and Sync] | 2019-04-25 | Slotix | | No | $149 | +| [MySQL to MS SQL Migration and Sync](#mysql-sqlserver) | No | No | [MG] | [MySQL to MS SQL Migration and Sync] | 2018-10-03 | Slotix | | No | $149 | +| [Oracle to MS SQL Migration and Sync](#oracle-sqlserver) | No | No | [MG] | [Oracle to MS SQL Migration and Sync] | 2020-02-12 | Slotix | | No | $149 | +| [PostgreSQL to MS SQL Migration and Sync](#postgresql-sqlserver) | No | No | [MG] | [PostgreSQL to MS SQL Migration and Sync] | 2019-10-24 | Slotix | | No | $149 | +| [MS Excel to MS SQL Migration](#msexcel-sqlserver) | No | No | [MG] | [MS Excel to MS SQL Migration] | 2018-02-23 | Slotix | | No | $149 | +| [SQLite to MS SQL Migration and Sync](#sqllite-sqlserver) | No | No | [MG] | [SQLite to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | +| [IBM DB2 to MS SQL Migration and Sync](#db2-sqlserver) | No | No | [MG] | [IBM DB2 to MS SQL Migration and Sync] | 2019-07-09 | Slotix | | No | $149 | +| [MS Access to MS SQL Migration and Sync](#access-sqlserver) | No | No | [MG] | [MS Access to MS SQL Migration and Sync] | 2020-01-15 | Slotix | | No | $149 | +| [Firebird to MS SQL Migration and Sync](#firebird-sqlserver) | No | No | [MG] | [Firebird to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | +| [SQLines SQL Converter](#sqllines-converter) | No | No | [MG] | [SQLines SQL Converter] | ? | Dmtolpeko | | Open Source | No | +| [SQLite & SQL Server Compact Toolbox](#sqlite-sqlserver-toolbox) | No | No | [?] | [SQLite & SQL Server Compact Toolbox] | ? | ErikEJ | | Open Source | No | +| [SqlPad](#sqlpad) | Postgres,MySQL,Crate,Vertica | No | [MS] | [SqlPad] | ? | Rickbergfalk | | Open Source | No | +| [Html-query-plan](#html-query-plan) | No | No | [?] | [Html-query-plan] | ? | JustinPealing | | Open Source | No | +| [SqlQueryStress](#sql-query-stress) | No | No | [?] | [SqlQueryStress] | ? | Adam Machanic | | Open Source | No | +| [SQL Server Migration Assistant for DB2](#ssma-db2) | DB2 | No | [MG] | [SQL Server Migration Assistant for DB2] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Oracle](#ssma-oracle) | Oracle | No | [MG] | [SQL Server Migration Assistant for Oracle] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Access](#ssma-access) | Access | No | [MG] | [SQL Server Migration Assistant for Access] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for SAP ASE](#ssma-sap) | SAP ASE | No | [MG] | [SQL Server Migration Assistant for SAP ASE]| 2020-06-29 | Microsoft | | Yes | No | +| [mssql for Visual Studio Code](#mssql-for-vs-code) | No | Linux,Mac | [MS] | [mssql for Visual Studio Code] | 2017-05-02 | Microsoft | | Open Source | No | +| [Microsoft Assessment and Planning](#map) | No | No | [?] | [Microsoft Assessment and Planning] | 2017-02-10 | Microsoft | | Yes | No | +| [mssql-scripter](#mssql-scripter) | No | Linux,Mac | [?] | [mssql-scripter] | ? | Microsoft | | Open Source | No | +| [DBFS](#dbfs) | No | Linux | [M] | [DBFS] | ? | Microsoft | | Open Source | No | +| [comparator](#pumpet-comparator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [comparator] | 2017-06-06 | Pumpet | [LGPL-3.0] | Open Source | No | +| [Navicat for SQL Server](#navicat-for-sql-server) | No | Mac | [MS] | [Navicat for SQL Server] | 2017-06-14 | PremiumSoft | | No | $699 | +| [Navicat Premium](#navicat-premium) | Oracle,MySQL,PostgreSQL,Other | Mac | [MS] | [Navicat Premium] | 2017-06-14 | PremiumSoft | | No | $1299 | +| [DbVisualizer](#dbvisualizer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS],[DA]| [DbVisualizer] | 2017-08-22 | DbVis Software AB. | | Yes | $197 | +| [DbSchema](#dbschema) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbSchema] | 2017-06-19 | Wise Coders Solutions | | Yes | $127 | +| [DBGhost](#dbghost) | No | No | [?] | [DBGhost] | 2017-01-31 | Innovartis Ltd | | No | £430 | +| [SQLAutomate](#sqlautomate) | Oracle,MySQL,Other | No | [?] | [SQLAutomate] | 2017-06-19 | OnLine ToolWorks     | | No | $99 | +| [BimlExpress](#bimlexpress) | No | No | [?] | [BimlExpress] | ? | Varigence   | | No | No | +| [BI Developer Extensions](#bi-developer-extensions) | No | No | [?] | [BI Developer Extensions] | 2019-04-29 | Microsoft   | | Open Source | No | +| [Azure Data Warehouse Migration Utility](#azure-migration) | No | No | [MG] | [Azure Data Warehouse Migration Utility] | ? | Microsoft | | ? | ? | +| [Benchmark Factory](#benchmark-factory) | Oracle,MySQL,Other | No | [T] | [Benchmark Factory] | ? | Quest Software | | No | $4413 | +| [manduka](#manduka) | Oracle | Linux,Mac | [?] | [manduka] | 2017-03-08 | Virtusa Corporation | | Yes | No | +| [PowerBI Desktop](#powerbi-desktop) | Oracle,MySQL,PostgreSQL,Other | No | [BI] | [PowerBI Desktop] | 2017-07-11 | Microsoft | | Yes | ? | +| [Stellar Phoenix SQL Database Repair](#stellar-phoenix) | No | No | [REC] | [Stellar Phoenix SQL Database Repair] | 2017-07-05 | Stellar Technology | | No | $349 | +| [DataNumen SQL Recovery](#datanumen-sql-recovery) | No | No | [REC] | [DataNumen SQL Recovery] | 2017-03-20 | DataNumen | | No | $500 | +| [Recovery Toolbox for SQL Server](#recovery-toolbox) | No | No | [REC] | [Recovery Toolbox for SQL Server] | ? | Recovery Toolbox | Shareware | No | $99 | +| [SQL MDF Viewer](#sql-mdf-viewer) | No | No | [?] | [SQL MDF Viewer] | ? | SysTools | Shareware | No | $129 | +| [SQL MDF Recovery Tool](#sql-mdf-recovery-tool) | No | No | [REC] | [SQL MDF Recovery Tool] | ? | SysTools | Shareware | No | $129 | +| [SQL Passord Recovery](#sql-password-recovery) | No | No | [REC] | [SQL Passord Recovery] | ? | SysTools | Shareware | No | $69 | +| [SQL Decryptor](#sql-decryptor) | No | No | [SEC] | [SQL Decryptor] | ? | SysTools | Shareware | No | $69 | +| [SQL Backup Database Recovery](#sql-backup-database-recovery) | No | No | [REC] | [SQL Backup Database Recovery] | ? | SysTools | Shareware | No | $149 | +| [SQL Log File Viewer](#sql-log-file-viewer) | No | No | [?] | [SQL Log File Viewer] | ? | SysTools | Shareware | No | $999 | +| [DAX Studio](#dax-studio) | No | No | [?] | [DAX Studio] | ? | Sqlbi | Freeware | Yes | No | +| [SQL Cop](#sql-cop) | No | No | [?] | [SQL Cop] | ? | LessThanDot | Freeware | Yes | No | +| [Dataedo](#dataedo) | Oracle,MySQL | No | [D] | [Dataedo] | 2017-09-15 | Logic Systems | Shareware | Yes | $239 | +| [Azure Database Migration Service](#azure-db-migration) | Oracle,MySQL, Other | Online | [MG] | [Azure Database Migration Service] | 2017-12-01 | Microsoft | | Yes | No | +| [FlowHeater](#flowheater) | Oracle,MySQL,PostgreSQL,Other | No | [ETL] | [FlowHeater] | 2017-10-02 | FlowHeater GmbH | Shareware | No | $79 | +| [EDIS](#edis) | No | No | [ETL] | [EDIS] | ? | SQL ETL | Shareware | Yes | $599 | +| [SchemaSpy](#schemaspy) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [D] | [SchemaSpy] | 2018-08-05 | Rafal Kasa | [MIT] | Open Source | No | +| [Adminer](#adminer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Adminer] | 2019-08-27 | Jakub Vrána | [Apache] | Open Source | No | +| [Full Convert](#full-convert) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Full Convert] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | +| [Replicator](#replicator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [Replicator] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | +| [JackDB](#jackdb) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [JackDB] | ? | JackDB | | No | $48 | +| [SQL Workbench](#sql-workbench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQL Workbench] | 2018-08-20 | Thomas Kellerer | | Yes | No | +| [Valentina Studio](#valentina-studio) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Valentina Studio] | 2018-09-24 | Paradigma Software | | Yes | $200 | +| [SQL Plus Dot Net](#sql-plus-dot-net) | No | No | [?] | [SQL Plus Dot Net] | ? | SQL+.NET | | No | ? | +| [SQLIndexManager](#sqlindexmanager) | No | No | [IDX] | [SQLIndexManager] | 2019-05-19 | Sergey Syrovatchenko | | Open Source | No | +| [JAMS Enterprise Job Scheduling](#jams-job) | No | No | [J] | [JAMS Enterprise Job Scheduling] | 2019-08-20 | HelpSystems | | No | ? | +| [Stitch Data Loader](#stitch) | Oracle,MySQL,PostgreSQL,Other | Online | [ETL] | [Stitch Data Loader] | 2019-09-20 | Talend | | No | ? | +| [Talend Data Integration](#talend-integration) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Integration] | 2019-06-20 | Talend | [Apache] | Yes | ? | +| [Talend Data Preparation](#talend-preparation) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Preparation] | 2018-06-05 | Talend | [Apache] | Yes | ? | +| [Pentaho Data Integration](#pentaho) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [ETL] | [Pentaho Data Integration] | 2019-06-20 | Hitachi Vantara | Shareware | No | ? | +| [Studio3T](#studio3t) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [Studio3T] | 2019-09-19 | Studio 3T | Shareware | No | $150 | +| [SQLGrease](#sqlgrease) | No | Online | [M] | [SQLGrease] | 2019-09-20 | SQLGrease | Shareware | No | $948 | +| [QuickDBD](#quickdbd) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [QuickDBD] | ? | Dovetail Technologies | | Yes | $95 | +| [DB Designer](#dbdesigner) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [DB Designer] | ? | DB Designer | | Yes | $180 | +| [ESF Database Migration Toolkit](#esf) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [ESF Database Migration Toolkit] | 2019-10-23 | DBSofts Inc | Shareware | No | $322 | +| [MS SQL Migration Toolkit](#msskit) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [MS SQL Migration Toolkit] | 2019-04-22 | Intelligent Converters | Shareware | No | $99 | +| [DatabasesSpy](#databasespy) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [DatabaseSpy] | 2019-10-09 | Altova | Shareware | No | €109 | +| [DiffDog](#diffdog) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [DiffDog] | 2019-10-09 | Altova | Shareware | No | €109 | +| [ERBuilder data modeler](#erbuilder) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERBuilder data modeler] | 2019-11-14 | Softbuilder | | Yes | $99 | +| [SQLDatabaseStudio](#sqldatabasestudio) | No | No | [MS] | [SQLDatabaseStudio] | 2017-05-10 | Jan Pivarcek | | Yes | $215 | +| [Enterprise Architect](#ea) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Enterprise Architect] | 2019-10-31 | Sparx Systems Pty Ltd | Shareware | No | $225 | +| [MogwaiERDesignerNG](#mogwai) | Oracle,MySQL,PostgreSQL | No | [DA] | [MogwaiERDesignerNG] | 2019-08-22 | Mirko Sertic | [LGPL-3.0] | Open Source | No | +| [Xcase](#xcase) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Xcase] | 2018-06-19 | Resolution Software | Shareware | No | $799 | +| [Oracle SQL Developer Data Modeler](#oracle-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Oracle SQL Developer Data Modeler] | 2019-08-01 | Oracle | Shareware | Yes | No | +| [Exportizer](#exportizer) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Exportizer] | 2019-11-17 | Vitaliy Levchenko | Shareware | No | $29 | +| [Reportizer](#reportizer) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Reportizer] | 2019-09-10 | Vitaliy Levchenko | Shareware | No | $39 | +| [Database Tour](#database-tour) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Database Tour] | 2019-11-20 | Vitaliy Levchenko | Shareware | No | $49 | +| [Ispirer MnMATK](#mnmatk) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Ispirer MnMATK] | ? | Ispirer Systems | Shareware | No | ? | +| [SQL Database Recovery](#sql-database-recovery) | No | No | [REC] | [SQL Database Recovery] | 2019-09-10 | KernelApps Private | Shareware | No | $399 | +| [SysTools SQL Log Analyzer](#log-analzyer) | No | No | [M][REC] | [SysTools SQL Log Analyzer] | 2019-01-01 | SysTools | Shareware | No | $999 | +| [SysTools SQL Server Recovery Manager](#systools-rec-manager) | No | No | [REC] | [SysTools SQL Log Analyzer] | 2017-01-01 | SysTools | Shareware | No | $1499 | +| [SysTools SQL Recovery](#systools-recovery) | No | No | [REC] | [SysTools SQL Recovery] | 2019-01-01 | SysTools | Shareware | No | $249 | +| [SQL Backup Recovery](#systools-backup-recovery) | No | No | [REC] | [SQL Backup Recovery] | 2018-01-01 | SysTools | Shareware | No | $149 | +| [SysTools SQL Password Recovery](#systools-password-recovery) | No | No | [REC] | [SysTools SQL Password Recovery] | 2018-01-01 | SysTools | Shareware | No | $69 | +| [SysTools SQL Decryptor](#systools-sql-decryptor) | No | No | [SEC] | [SysTools SQL Decryptor] | 2019-01-01 | SysTools | Shareware | No | $69 | +| [SysTools SQL Server Database Migrator](#systools-migrator) | No | No | [MG] | [SysTools SQL Server Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $249 | +| [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | +| [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | +| [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | +| [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | +| [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | +| [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | +| [DbViewSharp](#dbviewsharp) | No | No | [MS] | [DbViewSharp] | 2014-08-08 | David Moore | [MIT] | Yes | No | +| [DTSQL](#dtsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [DTSQL] | 2017-08-18 | DigerTech Inc | Shareware | Yes | $69 | +| [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | +| [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | +| [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | +| [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | +| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell | | Yes | No | +| [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | +| [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | +| [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLDBSize](#sqldbsize) | No | No | [?] | [SQLDBSize] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLines Data](#sqlines-data) | Oracle,MySQL,PostgreSQL,Other | Linux |[MG],[ETL]| [SQLines Data] | 2019-05-29 | SQLines | | Open Source | No | +| [SqlDbAid](#sqldbaid) | No | No | [?] | [SqlDbAid] | 2018-02-10 | Miken | | Yes | No | +| [sqlectron](#sqlectron) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [sqlectron] | 2018-09-06 | sqlectron | | Open Source | No | +| [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | +| [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | +| [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | +| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions | | Yes | No | +| [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | +| [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | +| [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | +| [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | +| [POPSQL](#popsql) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [POPSQL] | 2020-08-01 | PopSQL | | Yes | 10$ | ## SSMS @@ -1018,18 +1004,6 @@ Price: $495 SQL Data Compare is the industry-standard tool for comparing and deploying SQL Server database contents -## Red Gate SQL Prompt - -Download page: [Red Gate SQL Prompt]
-Release date: 2016-04-28
-Support Version: 2005/2008/2012/2014
-Author: Red Gate
-Free version: No
-Price: $369 - -Write, format and refactor SQL effortlessly - - ## Red Gate SQL Monitor Download page: [Red Gate SQL Monitor]
@@ -1197,36 +1171,6 @@ It generates numerically ordered SQL migration scripts that sit inside your proj You can add them to version control, use them to build and release, and automate database and application deployments, all in one process. -## SQL Search - -Download page: [SQL Search] -Release date: ? -Support Version: ? -Author: Red Gate -Free version: Yes -Prise: No - -Find SQL fast in SQL Server Management Studio and Visual Studio - - Find fragments of SQL in tables, views, stored procedures, functions, jobs, and more - - Quickly navigate to objects wherever they happen to be on a server - - Search across multiple object types and multiple databases - - Find all references to an object - - Search with booleans and wildcards - - -## SQL Scripts Manager - -Download page: [SQL Scripts Manager] -Release date: ? -Support Version: ? -Author: Red Gate -Free version: Yes -Prise: No - - - Expert scripts: contains 28 scripts written by expert DBAs, SQL Server MVPs, and Redgate's SQL developers. - - Accelerated scripting: streamline repeated administration and scripting tasks with quick and easy access to scripts. - - Customize and extend: easily build custom user interfaces around any T-SQL or IronPython script. - ## Rapid Database Extractor Download page: [Rapid Database Extractor]
@@ -1958,18 +1902,6 @@ Price: $900 dbForge DevOps Automation for SQL Server is a cutting-edge solution that takes conventional database development and deployment to a whole new level. -## dbForge Search - -Download page: [dbForge Search]
-Release date: 2019-10-10
-Support Version: ?
-Author: Devart
-Free version: Yes
-Price: No - -Search for SQL Server is a add-in for Microsoft SQL Server Management Studio that allows you to quickly locate SQL objects, data, and text in your databases. - - ## Devart Excel Add-in for SQL Server Download page: [Devart Excel Add-in for SQL Server]
@@ -1982,23 +1914,6 @@ Price: $250 Devart Excel Add-ins allow you to work with database and cloud data in Microsoft Excel as with usual Excel spreadsheets. -## Minion Enterprise - -Download page: [Minion Enterprise]
-Release date: ?
-Support Version: 2008/2008R2/2012
-Author: MinionWare
-Free version: No
-Price: $1500 - -Minion Enterprise was designed by database administrators (DBAs) specifically to address the issues that waste the most time and cause the most problems. -Minion shrinks dozens of those one-at-a-time tasks down to a central process. And, it does this without the usual overhead of monitoring software. -When you install Minion Enterprise, it automatically begins gathering data from instances across your enterprise. -That single repository of data allows you to centrally audit, alert, report, and investigate your entire environment. -Even better, it opens up a new world of central management: audit SQL and AD security, clone user permissions across servers, -standardize and enforce SQL Server settings, automate error log searches, and so very much more. - - ## SQL Server Compression Estimator Download page: [SQL Server Compression Estimator]
@@ -2682,24 +2597,7 @@ Price: No - Format SQL objects - Obfuscate SQL - - ## ApexSQL Search - -Download page: [ApexSQL Search]
-Release date: 2020-05-28
-Support Version: 2005-2019
-Author: ApexSQL
-Free version: Yes
-Price: No - - Search for SQL objects - - Quickly find data in SQL tables - - Edit extended properties - - Easily navigate to result objects - - Rename SQL objects safely - - Export results to HTML, CSV and Excel - - ## DBBest T-SQL Analyzer Download page: [DBBest T-SQL Analyzer]
@@ -5240,30 +5138,6 @@ Prise: No Pssdiag/Sqldiag Manager is a graphic interface that provides customization capabilities to collect data for SQL Server using sqldiag collector engine. The data collected can be used by SQL Nexus tool which help you troubleshoot SQL Server performance problems. This is the same tool Microsoft SQL Server support engineers use to for data collection to troubleshoot customer's performance problems. -## sp_Blitz - -Download page: [sp_Blitz] -Release date: ? -Support Version: 2005-2016 -Author: Brent Ozar -Free version: Yes -Prise: No - -Fast, easy, free health check that flags common issues in seconds, and for each warning, gives you a link to a web page with more in-depth advice. - - -## sp_whoisactive - -Download page: [sp_whoisactive] -Release date: 2017-10-10 -Support Version: 2005-2017 -Author: Adam Machanic -Free version: Yes -Prise: No - -Comprehensive activity monitoring stored procedure that works for all versions of SQL Server from 2005 through 2017 - - ## SQuirreL SQL Client Download page: [SQuirreL SQL Client] @@ -5413,22 +5287,6 @@ Prise: No - Generate real time performance reports in PDF format and Email it from the tool -## SQL Hunting Dog - -Download page: [SQL Hunting Dog] -Release date: ? -Support Version: 2015-08-16 -Author: SQL Hunting Dog -Free version: Yes -Prise: No - -Quick Search Tool (AddIn) for Microsoft SQL Management Studio 2008/2012/2014 - - Quickly find tables, stored procedure, functions and views - - Completely removes the pain of clunky Object Explorer - - Switch between different servers and databases - - Perform common operation (select data, modify table, design table, etc.) with ease - - ## SQL Instance Check Download page: [SQL Instance Check] @@ -5459,42 +5317,6 @@ Prise: No SQLPRep 2015 aka SQL Performance Report is our newest software product that takes any TSQL and produces a concise, readable, highlighted performance report allowing you to greatly reduce your time spent in developing, debugging, optimising, testing and reviewing TSQL. -## SQL Server Backup - -Download page: [SQL Server Backup] -Release date: ? -Support Version: 2008-2019 -Author: Ola Hallengren -Free version: Yes -Prise: No - -DatabaseBackup is the SQL Server Maintenance Solution’s stored procedure for backing up databases. - - -## SQL Server Integrity Check - -Download page: [SQL Server Integrity Check] -Release date: ? -Support Version: 2008-2019 -Author: Ola Hallengren -Free version: Yes -Prise: No - -DatabaseIntegrityCheck is the SQL Server Maintenance Solution’s stored procedure for checking the integrity of databases. - - -## SQL Server Index and Statistics Maintenance - -Download page: [SQL Server Index and Statistics Maintenance] -Release date: ? -Support Version: 2008-2019 -Author: Ola Hallengren -Free version: Yes -Prise: No - -IndexOptimize is the SQL Server Maintenance Solution’s stored procedure for rebuilding and reorganizing indexes and updating statistics. - - ## SQL Server Monitoring Download page: [SQL Server Monitoring] @@ -5540,21 +5362,6 @@ Prise: No - A simplified way of looking at your servers. -## TSQLT - -Download page: [TSQLT] -Release date: ? -Support Version: from 2005 -Author: sqlity.net llc -Free version: Yes -Prise: No - - - Tests are automatically run within transactions - - Tests can be grouped together within a schema - - Output can be generated in plain text or XML - - The framework gives you the ability to fake tables and views, and create stored procedure spies - - ## WhatsUp SQL Server Monitor Download page: [WhatsUp SQL Server Monitor] @@ -5576,7 +5383,21 @@ Author: Maurice Pelchat Free version: Yes Prise: No -YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules (function, stored procedures, and views) on the server where it is run. You don't need to be concerned by all of them, albeit some of them are interesting tools for exceptional day-to-day DBA tasks, out of regular maintenance tasks. +YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules (function, stored procedures, and views) on the server where it is run. +You don't need to be concerned by all of them, albeit some of them are interesting tools for exceptional day-to-day DBA tasks, out of regular maintenance tasks. + + +## POPSQL + +Download page: [POPSQL] +Release date: 2020-08-01 +Support Version: 2008-2019 +Author: POPSQL +Free version: Yes +Prise: $10 + +Collaborative SQL editor for your team. +Write queries, visualize data, and share your results. [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms @@ -5680,14 +5501,12 @@ YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules [dbForge Documenter]:https://www.devart.com/dbforge/sql/documenter/ [dbForge SSIS Data Flow Components]:https://www.devart.com/ssis/ [dbForge DevOps Automation for SQL Server]:https://www.devart.com/dbforge/sql/database-devops/ -[dbForge Search]: [Devart Excel Add-in for SQL Server]:https://www.devart.com/excel-addins/sql-server.html [dbMonitor]:https://www.devart.com/dbmonitor/download.html [BPA 2005]: https://www.microsoft.com/en-us/download/details.aspx?id=23864 [BPA 2000]: https://www.microsoft.com/en-us/download/details.aspx?id=15691 [BPA 2008]: https://www.microsoft.com/en-us/download/details.aspx?id=15289 [BPA 2012]: https://www.microsoft.com/en-us/download/details.aspx?id=29302 -[Minion Enterprise]:http://minionware.net/enterprise/ [SQL Server Compression Estimator]:http://ssce.codeplex.com [ClearTrace]:http://www.scalesql.com/cleartrace/download.html [ClearTraceXE]:http://www.scalesql.com/cleartrace/download.html @@ -5728,7 +5547,6 @@ YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules [ApexSQL Compare]:https://www.apexsql.com/sql-tools-compare.aspx [ApexSQL Complete]:https://www.apexsql.com/sql-tools-complete.aspx [ApexSQL Refactor]:https://www.apexsql.com/sql-tools-refactor.aspx -[ApexSQL Search]:https://www.apexsql.com/sql-tools-search.aspx [DBBest T-SQL Analyzer]:https://www.dbbest.com/products/t-sql-analyzer [DBBest Database Compare Suite]:https://www.dbbest.com/products/database-compare-suite/ [Advanced Query Tool]:http://www.querytool.com/ @@ -5910,8 +5728,6 @@ YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules [Powershell Scripts]:https://www.idera.com/productssolutions/freetools/sqlpowershellscripts [PSDatabaseClone]:https://psdatabaseclone.org/# [Pssdiag&Sqldiag Manager]:https://github.com/microsoft/DiagManager/releases -[sp_Blitz]:https://www.brentozar.com/blitz -[sp_whoisactive]:http://whoisactive.com [SQuirreL SQL Client]:http://squirrelsql.org [Data Synchronisation Studio]:https://www.simego.com/solutions/sql [SQL Converter]:https://sourceforge.net/projects/sql-converter @@ -5923,21 +5739,16 @@ YourSqlDba script creates a database named YourSqlDba packed with T-SQL modules [SQL ExecStats]:http://www.qdpma.com/execstats/sqlexecstats.html [SQL-FineBuild]:https://github.com/SQL-FineBuild/v3.4 [SQL Health Monitor]:https://www.manageengine.com/sql-performance-monitor/sql-server-monitoring-index.html -[SQL Hunting Dog]:http://www.sql-hunting-dog.com [SQL Instance Check]:https://www.idera.com/productssolutions/freetools [SQLPRep]:https://www.csqls.com/products -[SQL Search]:https://www.red-gate.com/products/sql-development/sql-search [SQL Server Migration Assistant for SAP ASE]:https://www.microsoft.com/en-us/download/details.aspx?id=54256 -[SQL Scripts Manager]:https://www.red-gate.com/products/dba/sql-scripts-manager [SQL Server Backup]:https://ola.hallengren.com/sql-server-backup.html -[SQL Server Index and Statistics Maintenance]:https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html [SQL Server Integrity Check]:https://ola.hallengren.com/sql-server-integrity-check.html [SQL Server Monitoring]:https://www.spiceworks.com/free-sql-server-monitoring-tool [SQL Server Storage manager]:https://www.lepide.com/sql-storage-manager [SysKit Pulse]:https://www.syskit.com/products/insights-lite -[TSQLT]:http://tsqlt.org [WhatsUp SQL Server Monitor]:https://www.ipswitch.com/resources/free-tools/whatsup-sql-server-monitor -[YourSqlDba]:https://github.com/pelsql/YourSqlDba +[POPSQL]:https://popsql.com/ [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 209f08a6bec51968feab8762f7f9544813bc0287 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 12 Aug 2020 14:46:19 +0300 Subject: [PATCH 047/553] Add SQL Server 2016 SP2 CU14 info, fix typos --- README.md | 6 +++--- SQL Server Version.md | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8a2a0536..cb646af5 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Free Database Podcasts](#podcasts) - [SQL Courses](#courses) - [SQL Server Backwards Compatibility](#backwards-compatibility) - - [Social, Forum and Messenger SQL Server Groups](#sql-social) + - [Social, Forum and Messenger SQL Server Groups](#social) - [SQL Server Open Source Projects](#open-source) - [BIML Resources and Bloggers](#biml-resources-and-bloggers) - [PowerShell and SQL Server](#powershell-and-sql-server) @@ -95,7 +95,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [udf_SplitStringByDelimiter](/User_Defined_Function/udf_SplitStringByDelimiter.sql) - [udf_Tally](/User_Defined_Function/udf_Tally.sql) - and many others... - - [Utilities](/Utilities) (**Complete list of 314 SQL Server paid and free Utilities and Tools**) + - [Utilities](/Utilities) (**Complete list of 346 SQL Server paid and free Utilities and Tools**) **[⬆ back to top](#table-of-contents)** @@ -270,7 +270,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Slack #sqlhelp](https://sqlcommunity.slack.com/messages/sqlhelp/) (more than 900 People) - [Slack #firstresponderkit](https://sqlcommunity.slack.com/messages/firstresponderkit/) (more then 90 People) - [Twitter #SQLServer](https://twitter.com/hashtag/SQLServer), [Twitter #SQLFamily](https://twitter.com/hashtag/SQLFamily), [Twitter #sqlhelp](https://twitter.com/hashtag/sqlhelp) (more than 500 People) - - Reddit – [`/r/sqlserver`](https://www.reddit.com/r/SQLServer/), ['/r/sql`](https://www.reddit.com/r/SQL/), and ['/r/database`](https://www.reddit.com/r/Database/) + - Reddit – [`/r/sqlserver`](https://www.reddit.com/r/SQLServer/), [`/r/sql`](https://www.reddit.com/r/SQL/), and [`/r/database`](https://www.reddit.com/r/Database/) - [SQL.ru SQL Server Forum](http://www.sql.ru/forum/microsoft-sql-server) (more than 10^5 People, Russian) - [VK.com #sqlcom](https://vk.com/sqlcom) (more than 3600 People, Russian) - [SQL Server User Group Meetings](https://www.mssqltips.com/sql-server-user-groups/) diff --git a/SQL Server Version.md b/SQL Server Version.md index a44f0f75..f4afbc05 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -131,7 +131,7 @@ Profits: |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU6 KB4563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | -| 2016 | [Install 2016 SP2] then [CU13 KB4549825] | 13.0.5026.0
13.0.5820.21 | 2018-04-24
2020-05-28 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | +| 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4532098] | 11.0.2100.60
11.0.7001.0
11.0.7493.4 | 2012-02-14
2017-10-05
2020-02-11 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2008 R2 | [Install 2008 R2] then
[SP3 2008 R2] then
[SU KB3045311] | 10.50.1600
10.50.6000
10.50.6220.0 | 2010-11-21
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 R2 Updates](#microsoft-sql-server-2008-r2-builds) | @@ -142,7 +142,7 @@ Profits: [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU21 KB4557397]:https://support.microsoft.com/help/4557397 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 -[CU13 KB4549825]:https://support.microsoft.com/help/4549825 +[CU14 KB4564903]:https://support.microsoft.com/help/4564903 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 [KB4535288]:https://support.microsoft.com/help/4535288 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 @@ -181,7 +181,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | -| [SQL Server 2016 SP2 CU13] | SQLServer2016-KB4549825-x64.exe | 2020-05-28 | 13.0.5820.21 | 748 | 5e5785ee0bf5444f7a57a6c559a1d9ef6b785860 | +| [SQL Server 2016 SP2 CU14] | SQLServer2016-KB4564903-x64.exe | 2020-05-28 | 13.0.5820.21 | 752 | a1de57f8d273b9ae97868e0fd8394c237d7a593d | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | | [SQL Server 2014 SP3 KB4535288] | SQLServer2014-KB4535288-x64.exe | 2020-02-11 | 12.0.6372.1 | 604 | f5a76d473fee50a2aabe7c08daeb0910f3590491 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | @@ -202,7 +202,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 -[SQL Server 2016 SP2 CU13]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB4549825-x64.exe +[SQL Server 2016 SP2 CU14]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB4564903-x64.exe [SQL Server 2014 SP3]:https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2014-sp3 [SQL Server 2014 SP3 KB4535288]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=100913&6B49FDFB-8E5B-4B07-BC31-15695C5A2143=1 [SQL Server 2012 RTM]:https://download.microsoft.com/download/4/C/7/4C7D40B9-BCF8-4F8A-9E76-06E9B92FE5AE/ENU/SQLFULL_ENU.iso @@ -552,18 +552,19 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) All SQL Server 2016 CU downloads: [Catalog Update Microsoft SQL Server 2016](http://www.catalog.update.microsoft.com/Search.aspx?q=sql%20server%202016) -Here is the latest output from `SELECT @@VERSION` for SQL Server 2016 Developer Edition on Windows: +Here is the latest output from `SELECT @@VERSION` for SQL Server 2016 SP2 Developer Edition on Windows: ``` -Microsoft SQL Server 2016 (SP2-CU11) (KB4527378) - 13.0.5598.27 (X64) - Nov 28 2019 00:04:50 +Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) + Jul 31 2020 18:47:07 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | **Latest CU SP2** | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | -| 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | +| 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | **Latest CU SP2** | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-05-28 | 2020-08-06 | 18 | 16 | 752 | +| 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | +| 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 12 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | | 13.0.5622.0 | 2015.131.5622.0 | SP2 | GDR | CVE-2020-0618 | 4535706 | [Description of the security update for SQL Server 2016 SP2 CU11: February 11, 2020] | 2020-02-11 | 2019-11-28 | 1 | 1 | 752 | | 13.0.5598.27 | 2015.131.5598.27 | SP2 | CU | | 4527378 | [Cumulative Update 11 for SQL Server 2016 SP2] | 2019-12-09 | 2019-11-28 | 29 | 26 | 752 | | 13.0.5492.2 | 2015.131.5492.2 | SP2 | CU | | 4524334 | [Cumulative Update 10 for SQL Server 2016 SP2] | 2019-10-08 | 2019-10-05 | 21 | 21 | 752 | @@ -651,7 +652,8 @@ Microsoft SQL Server 2016 (SP2-CU11) (KB4527378) - 13.0.5598.27 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | -[Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/ +[Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/4564903 +[Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/4549825 [Cumulative Update 12 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4536648 [Description of the security update for SQL Server 2016 SP2 CU11: February 11, 2020]:https://support.microsoft.com/help/4535706 [Cumulative Update 11 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4527378 From 4324149c34c9cd3e7809fc5c7391ef2feb583526 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 13 Aug 2020 16:14:53 +0300 Subject: [PATCH 048/553] Add Paid SQL Server ebooks section --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb646af5..5aba16e3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [TSQL Format Code](#tsql-format-code) - [SQL Server Test Data Generation](#sql-server-test-data-generation) - [Free SQL Server and R ebooks](#free-ebooks) + - [Paid SQL Server ebooks](#paid-ebooks) - [License](#license) @@ -515,7 +516,6 @@ BIML Bloggers ## Free SQL Server and R ebooks - SQL Server: - [Awesome Red Gate ebooks](https://www.red-gate.com/hub/books/) - SQL Developers @@ -578,6 +578,23 @@ R: **[⬆ back to top](#table-of-contents)** + +## SQL Server Paid Books +- [T-SQL Fundamentals](https://amzn.to/39CLxSN) 361 pages (by Itzik Ben-Gan) +- [T-SQL Querying (Developer Reference)](https://amzn.to/3bGxVIa) 803 pages (by Itzik Ben-Gan) +- [Great Post, Erik](https://amzn.to/3bMtgUY) 342 pages (by Erik Darling) +- [Learn T-SQL Querying](https://amzn.to/39Ia7BX) 450 pages (by Pedro Lopes, Pam Lahoud) +- [SQL Server 2017 Query Performance Tuning](https://amzn.to/2UW3s2E) 823 pages (by Grant Fritchey) +- [Query Store for SQL Server 2019](https://amzn.to/2OZAzPp) 236 pages (by Tracy Boggiano, Grant Fritchey) +- [SQL Server 2019 Revealed](https://amzn.to/2OZSiWS) 444 pages (by Bob Ward) +- [Pro SQL Server Internals](https://www.amazon.co.uk/dp/1484219635/) 840 pages (by Dmitri Korotkevitch) +- [Pro SQL Server Always On Availability Groups](https://www.amazon.co.uk/dp/B01M3U6WRM/) 332 pages (by Uttam Parui, Vivek Sanil) +- [Refactoring Legacy T-SQL for Improved Performance: Modern Practices for SQL Server](https://www.amazon.co.uk/dp/1484255801/) 260 pages (by Lisa Bohm) + + +**[⬆ back to top](#table-of-contents)** + + ## License [MIT](/LICENSE) From 4d36c8212c9fb6ed0863531f8ef5ca7b00b7ca9e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 14 Aug 2020 16:16:58 +0300 Subject: [PATCH 049/553] Add new awesome SQL Server articles --- Articles/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 8979f7cd..f2d4871e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1172,6 +1172,12 @@ Articles types: | [SQLskills SQL101: Why do some wait types need to be ignored?] | Paul Randal | 2018-05-23 | [DBA][DEV] | | [What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)] | Joe Obbish | 2018-09-27 | [DBA][DEV] | | [SQL Server 2019 Aggregate Splitting] | Paul White | 2020-08-04 | [DBA][DEV] | +| [Security Best Practice: dny and revoke permissions granted to All Users by default - HIGHLY IMPORTANT!] | Ronen Ariely | 2019-10-13 | [DBA][SEC] | +| [Execute multiple jobs Synchronously from in a main job] | Ronen Ariely | 2020-04-11 | [DBA][DEV] | +| [The Trillion Row Table] | Joe Obbish | 2020-08-12 | [BENCH] | +| [Temporal Tables and Table Partitioning: Not If You Like Switching Partitions] | Erik Darlling | 2020-03-03 | [DBA][DEV] | +| [Long Running Query on Read-Only Replica that takes moments on the Primary] | Sean Gallardy,Joe Obbish | 2019-09-05 | [DBA][DEV] | +| [Date Tables are Great for Users, but Not So Great for Performance] | Brent Ozar | 2020-08-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2318,3 +2324,9 @@ Articles types: [SQLskills SQL101: Why do some wait types need to be ignored?]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-why-do-some-wait-types-need-to-be-ignored/ [What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)]:https://orderbyselectnull.com/2018/09/27/what-is-the-sos_work_dispatcher-wait-type/ [SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html +[Security Best Practice: dny and revoke permissions granted to All Users by default - HIGHLY IMPORTANT!]:https://ariely.info/Blog/tabid/83/EntryId/241/Security-Best-Practice-dny-and-revoke-permissions-granted-to-All-Users-by-default-HIGHLY-IMPORTANT.aspx +[Execute multiple jobs Synchronously from in a main job]:https://ariely.info/Blog/tabid/83/EntryId/250/Execute-multiple-jobs-Synchronously-from-in-a-main-job.aspx +[The Trillion Row Operator]:https://www.erikdarlingdata.com/2020/08/the-trillion-row-operator/ +[Temporal Tables and Table Partitioning: Not If You Like Switching Partitions]:https://www.erikdarlingdata.com/2020/03/temporal-tables-and-table-partitioning-not-if-you-like-switching-partitions/ +[Long Running Query on Read-Only Replica that takes moments on the Primary]:https://dba.stackexchange.com/questions/237671/long-running-query-on-read-only-replica-that-takes-moments-on-the-primary/ +[Date Tables are Great for Users, but Not So Great for Performance]:https://www.brentozar.com/archive/2020/08/date-tables-are-great-for-users-but-not-so-great-for-performance/ From 9f1995ee994041ac10db084ffe702a02f21c9d63 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 15 Aug 2020 10:42:06 +0300 Subject: [PATCH 050/553] Add new awesome articles --- Articles/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index f2d4871e..29ae738c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -549,7 +549,7 @@ Articles types: | [How to “debug” a Linked Server from SQL Server to an Oracle Database instance] | Jefferson Elias | 2018-06-11 | [DEV] | | [How to implement error handling in SQL Server] | Bojan Petrovic | 2018-06-15 | [DEV] | | [SQL Server Closure Tables] | Phil Factor | 2018-04-10 | [DEV] | -| [Deadlock victim choice in SQL Server - an exception?] | Josh the Coder | 2018-05-10 | [DBA][DEV] | +| [Deadlock victim choice in SQL Server - an exception?] | Josh Darnell | 2018-05-10 | [DBA][DEV] | | [Azure and Windows PowerShell: The Basics] | Nicolas Prigent | 2017-12-29 | [AZ][PS] | | [Azure and Windows PowerShell: Getting Information] | Nicolas Prigent | 2018-06-26 | [AZ][PS] | | [Be our guest, be our guest, put our database to the test] | Kenneth Fisher | 2018-06-25 | [DBA] | @@ -1178,6 +1178,15 @@ Articles types: | [Temporal Tables and Table Partitioning: Not If You Like Switching Partitions] | Erik Darlling | 2020-03-03 | [DBA][DEV] | | [Long Running Query on Read-Only Replica that takes moments on the Primary] | Sean Gallardy,Joe Obbish | 2019-09-05 | [DBA][DEV] | | [Date Tables are Great for Users, but Not So Great for Performance] | Brent Ozar | 2020-08-05 | [DBA][DEV] | +| [Should I install SSMS on a server running SQL Server?] | Andy Mallon | 2020-04-14 | [DBA][DEV] | +| [Finding a table name from a page ID] | Paul Randal | 2014-09-25 | [DBA][DEV] | +| [Finding Distinct Values Quickly] | Paul White | 2020-04-17 | [DBA][DEV] | +| [Can You Fail To Spill To tempdb?] | Josh Darnell | 2019-07-17 | [DBA][DEV] | +| [Migrating SQL workloads to Microsoft Azure: Databases Trip to Azure SQL Database] | Ahmad Yaseen | 2020-08-03 | [AZ][DBA] | +| [How It Works: Bob Dorr's SQL Server I/O Presentation] | Bob Dorr | 2010-03-24 | [DBA][DEV] | +| [Who does SQL Server run xp_cmdshell command as?] | Steve Stedman | 2020-04-14 | [DBA][DEV] | +| [Transaction Modes in SQL Server] | Kevin Feasel | 2020-08-10 | [DBA][DEV] | +| [Working Effectively with Legacy SQL] | Kevin Feasel | 2015-03-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2330,3 +2339,12 @@ Articles types: [Temporal Tables and Table Partitioning: Not If You Like Switching Partitions]:https://www.erikdarlingdata.com/2020/03/temporal-tables-and-table-partitioning-not-if-you-like-switching-partitions/ [Long Running Query on Read-Only Replica that takes moments on the Primary]:https://dba.stackexchange.com/questions/237671/long-running-query-on-read-only-replica-that-takes-moments-on-the-primary/ [Date Tables are Great for Users, but Not So Great for Performance]:https://www.brentozar.com/archive/2020/08/date-tables-are-great-for-users-but-not-so-great-for-performance/ +[Should I install SSMS on a server running SQL Server?]:https://am2.co/2020/04/should-i-install-ssms-on-a-server-running-sql-server/ +[Finding a table name from a page ID]:https://www.sqlskills.com/blogs/paul/finding-table-name-page-id/ +[Finding Distinct Values Quickly]:https://sqlperformance.com/2020/03/sql-performance/finding-distinct-values-quickly +[Can You Fail To Spill To tempdb?]:https://www.joshthecoder.com/2019/07/17/can-you-fail-to-spill-to-tempdb.html +[Migrating SQL workloads to Microsoft Azure: Databases Trip to Azure SQL Database]:https://www.sqlshack.com/migrate-sql-workloads-to-microsoft-azure-databases-trip-to-azure-sql-database/ +[How It Works: Bob Dorr's SQL Server I/O Presentation]:https://techcommunity.microsoft.com/t5/sql-server-support/how-it-works-bob-dorr-s-sql-server-i-o-presentation/ba-p/316031 +[Who does SQL Server run xp_cmdshell command as?]:https://stevestedman.com/2020/04/who-does-sql-server-run-xp_cmdshell-command-as/ +[Transaction Modes in SQL Server]:https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/ +[Working Effectively with Legacy SQL]:https://www.catallaxyservices.com/presentations/legacy-sql/ From 665226ff4c57ad5fc3e1c30c8ef863cc243ff54d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 16 Aug 2020 10:43:11 +0300 Subject: [PATCH 051/553] Add transaction mode recommendation and 1105 error --- Errors/README.md | 2 + ... Convention and T-SQL Programming Style.md | 40 ++++++++++++------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Errors/README.md b/Errors/README.md index 0a0d2c5e..4c1b353f 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -124,6 +124,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 926 | Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog … | [926_link1] | | 1052 | Conflicting %ls options "%ls" and "%ls". | [1052_link1][33] | | 1065 | The NOLOCK and READUNCOMMITTED lock hints are not allowed for target tables of INSERT, UPDATE, DELETE …| [1065_link1] | +| 1105 | Could not allocate space for object '%.*ls'%.*ls in database '%.*ls' because the '%.*ls' filegroup is …| [1105_link1] | | 1204 | The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your … | [1204_link1][46] | | 1205 | Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen … | [1205_link1][46] | | 1222 | Lock request time out period exceeded. | [1222_link1][46] | @@ -311,6 +312,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [926_link1]:https://blog.sqlauthority.com/2018/11/06/sql-server-script-level-upgrade-for-database-master-failed-because-upgrade-step-msdb110_upgrade-sql-encountered-error-926-state-1-severity-25/ [KB2152734]:https://support.microsoft.com/help/2152734 [1065_link1]:https://www.mssqltips.com/sqlservertip/2470/understanding-the-sql-server-nolock-hint/ +[1105_link1]:https://www.joshthecoder.com/2019/07/17/can-you-fail-to-spill-to-tempdb.html [1701_link1]:http://www.sqlservercentral.com/questions/163450/ [1807_link1]:http://www.sqlservercentral.com/blogs/martin_catherall/2017/01/22/create-database-ive-not-seen-that-before/ [1904_link1]:http://blog.sqlauthority.com/2016/10/27/sql-server-fix-error-msg-1904-statistics-table-65-columns-key-list/ diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index e939beb8..7403a1b8 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -229,6 +229,14 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. More details [here](https://www.sentryone.com/blog/aaronbertrand/backtobasics-lower-case-data-types). - All system database and tables must be in **lowercase** for properly working for Case Sensitive instance: `master, sys.tables …`. + - Whenever you have data modification on non-temporary tables, is to use [explicit transactions] over [autocommit]. + 1. If you have a stored procedure which is simply running a `SELECT` statement, use [autocommit]. + 2. If you have a stored procedure which performs data modification on non-temporary tables, use an [explicit transaction] only over the area which modifies data. + 3. If you are working with non-global temporary tables beforehand, don’t include any modification of those inside the explicit transaction. + 4. In a [loop](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/while-transact-sql), choose whether you want to put the [explicit transaction] around the loop or inside it. In most cases, prefer to put the transaction inside the loop to minimize the amount of time that blocking other users. + 5. Outside of a stored procedure use [explicit transactions] if you’re doing something potentially risky. + 6. Watch out for nested transactions. + More details [her](https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/). - Avoid using [Cross-Database Queries](https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/cross-database-queries) because it increase backup/restore complexity (you restore one database, then realise you don’t have log backups to bring the other database to the same point in time). Also Azure SQL Database does not support cross-database queries and you can not migrate into in future. - Use `temp` tables to reduce network trafic, decrease query complexity and also to get better estimates for modification queries.More details [here](https://www.brentozar.com/archive/2020/04/how-to-get-better-estimates-for-modification-queries/). @@ -275,13 +283,13 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - The first argument in `SELECT` expression should be on the next line: ```sql SELECT - FirstName + FirstName ``` - Arguments are divided by line breaks, commas should be placed before an argument: ```sql SELECT - FirstName - , LastName + FirstName + , LastName ``` - For SQL Server >= 2012 use [`FETCH-OFFSET`] instead [`TOP`]. More details [here](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql#using-offset-and-fetch-to-limit-the-rows-returned). @@ -425,20 +433,20 @@ TSQL Example with formating: ```tsql WITH CTE_MyCTE AS ( SELECT - t1.Value1 AS Val1 - , t1.Value2 AS Val2 - , t2.Value3 AS Val3 - INNER JOIN dbo.Table3 AS t2 - ON t1.Value1 = t2.Value1 - WHERE t1.Value1 > 1 - AND t2.Value2 >= 101 + t1.Value1 AS Val1 + , t1.Value2 AS Val2 + , t2.Value3 AS Val3 + INNER JOIN dbo.Table3 AS t2 + ON t1.Value1 = t2.Value1 + WHERE t1.Value1 > 1 + AND t2.Value2 >= 101 ) SELECT - t1.Value1 AS Val1 - , t1.Value2 AS Val2 - , t2.Value3 AS Val3 -INTO #Table3 -FROM CTE_MyCTE AS t1 + t1.Value1 AS Val1 + , t1.Value2 AS Val2 + , t2.Value3 AS Val3 +INTO #Table3 +FROM CTE_MyCTE AS t1 ORDER BY t2.Value2; ``` @@ -685,3 +693,5 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure [10]:https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql [`INFORMATION_SCHEMA`]:https://docs.microsoft.com/en-us/sql/relational-databases/system-information-schema-views/system-information-schema-views-transact-sql [11]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql#best-practices +[explicit transactions]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql +[autocommit]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql From aa870ebb56c402b9253151c09007aca6cd1d4ebd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 17 Aug 2020 10:48:58 +0300 Subject: [PATCH 052/553] Add Conference section and fix typos --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5aba16e3..c9ebb6c1 100644 --- a/README.md +++ b/README.md @@ -181,10 +181,10 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [User Group.tv](http://usergroup.tv/) (by Shawn Weisfeld) - [SQLPass Virtual Chapters](http://www.sqlpass.org/passchapters/virtualchapters.aspx) - [Youtube SQLpassion](https://www.youtube.com/channel/UCkrUQVPrv36Musorn0K4KoA) - - [SQLBits Video](https://sqlbits.com/) + - [SQLBits Video](https://sqlbits.com/content/) - [Pragmatic Works Free Training Webinars](http://pragmaticworks.com/Training/FreeTrainingWebinars) - [Youtube Pragmatic Works Video](https://www.youtube.com/user/PragmaticWorks) (by Devin Knight and Manuel Quintana) - - [MVP: Data Platform](https://channel9.msdn.com/Blogs/MVP-Data-Platform) + - [TechEd SQL Server Videos](https://channel9.msdn.com/Search?term=sql%20server&lang-en=true) - [Build 2018 conference](http://sqlservercode.blogspot.ru/2018/05/azure-sql-data-warehouse-azure-sql.html) - Free Database Podcasts - [SQL Server Radio](http://www.sqlserverradio.com/) (by Guy Glantser and Matan Yungman) @@ -282,6 +282,13 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [DBA telegram chat](https://t.me/dba_ru) (1389 People, Russian) - [SQLTeam SQL Server Forum](https://forums.sqlteam.com/) - [Red Gate SQL Server Forum](https://forum.red-gate.com/) + - SQL Server Conferences + - [SQL Saturdays](https://sqlsaturday.com/) + - [Pass Sumit](https://www.pass.org/AttendanEvent/Conferences/PASSSummit.aspx) + - [SQLBits](https://sqlbits.com/) + - [Microsoft Ignite](https://www.microsoft.com/en-us/ignite) + - [Microsoft Build](https://www.microsoft.com/en-us/build) + - [Devintersection](https://devintersection.com/) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From 05d5b17d018ed50cd0472368595fb92e2ac1669e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 18 Aug 2020 09:47:41 +0300 Subject: [PATCH 053/553] Add OnlineFilegroupMigration.ps1 and useful info --- PowerShell/OnlineFilegroupMigration.ps1 | 338 ++++++++++++++++++ ... Convention and T-SQL Programming Style.md | 2 +- 2 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 PowerShell/OnlineFilegroupMigration.ps1 diff --git a/PowerShell/OnlineFilegroupMigration.ps1 b/PowerShell/OnlineFilegroupMigration.ps1 new file mode 100644 index 00000000..e82d6827 --- /dev/null +++ b/PowerShell/OnlineFilegroupMigration.ps1 @@ -0,0 +1,338 @@ +# SQL Server Online Filegroup Migration for Powershell +# Author: Bob Pusateri, http://www.bobpusateri.com +# Date: March 2013 +# +# This script is provided "as is" without warranty of any kind, +# either expressed or implied. It is the user's reponsibility +# to read and understand this code before executing on any +# system. Always test in a development environment!! + + +# REQUIRED FIELDS +$serverName = "ServerName"; # name of the instance +$dbName = "DBName"; # name of the database +$sourceFG = "SourceFG"; # filegroup you're moving objects out of +$destFG = "DestFG"; # filegroup you're moving objects into +$logPath = "C:\path\to\fg_move_logs"; # all queries are logged to this folder so you have record of what was run + +# FILTERS - if these are non-null only the objects that match will be migrated +$schemaFilter = $null; # can be $null, a literal "tablename" or a LIKE "%foo%" +$nameFilter = $null; # can be $null, a literal "tablename" or a LIKE "%foo%" +$minSizeFilter = $null; # can be $null or size in MB +$maxSizeFilter = $null; # can be $null or size in MB + +# If an individual query exceeds this timeout value it will be cancelled +$queryTimeoutSeconds = 21600; # 6 hours + +$runQueries = "n"; # "y" will execute the queries. + #"n" will print to screen & log but not execute + +$ErrorActionPreference = 'Stop'; +$dtStart = Get-Date; + +[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null; + +# this just helps for printing errors to console +Function PrintUpdate($str, $printToScreen) { + $s = (Get-Date -format HH:mm:ss) + " $str"; + if($printToScreen) { + if($host.Name -eq "ConsoleHost") { + Write-Host $s; + } else { # no host is present in SQL Agent + Write-Output $s; + } + } + $s | out-file -filepath $logFile -append; +} + +# gets the columns that make up an index. +Function GetIndexColumns($idx, $includedColumns) { + $colStr = ""; + foreach($ic in $idx.IndexedColumns) { + if($ic.IsIncluded -eq $includedColumns) { + $colStr += "[" + $ic.Name + "]"; + if($ic.Descending -eq $true) { + $colStr += " DESC" + } + $colStr += ", "; + } #if + } # foreach + if ($colStr.length -gt 0) { + return $colStr.Substring(0, $colStr.length-2); + } else { + return $colStr; + } +} # GetIndexColumns + +Function RunSQLQuery($queryStr) { + try { + PrintUpdate $queryStr $false; + if($runQueries -eq "y") { + $a = Invoke-Sqlcmd -ServerInstance $serverName -database $dbName -query $queryStr -OutputSQLErrors $true -QueryTimeout $queryTimeoutSeconds; + return $a; + } + } catch { + PrintUpdate $_ $true; + } +} # RunSQLQuery + +$server = New-Object Microsoft.SqlServer.Management.Smo.Server($serverName); + +if (!(Test-Path $logPath)) { + New-Item $logPath -Type Directory +} + +$logFile = "$logPath\" + (Get-Date -UFormat %Y%m%d_%H%M%S) + ".log"; + +if ($server.Edition -eq $null) { + throw "Cannot connect to server $serverName."; +} + +if(!$server.Edition.ToLower().Contains("enterprise") -and !$server.Edition.ToLower().Contains("developer")) { + throw "You need enterprise or developer edition to do online index operations"; +} + +$db = $server.Databases[$dbName]; + +if ($db -eq $null) { + throw "Database [$dbName] does not exist."; +} + +if ($db.FileGroups[$sourceFG] -eq $null) { + throw "Source filegroup [$sourceFG] does not exist."; +} + +if ($db.FileGroups[$destFG] -eq $null) { + throw "Source filegroup [$destFG] does not exist."; +} + +# get all indexes in source FG satisfying schema & name filters +$qry = "SELECT s.name AS SchemaName, + o.name AS ObjName, + o.object_id AS ObjID, + p.index_id AS IndexID, + i.name AS IdxName, + i.is_unique AS IsUnique, + ROUND(CAST(au.data_pages AS FLOAT)/128,2) AS Size_MB, + f.name AS DataFilegroup, + f2.name AS LOBFilegroup +FROM sys.allocation_units au WITH (NOLOCK) + JOIN sys.partitions p WITH (NOLOCK) ON au.container_id = p.partition_id + JOIN sys.objects o WITH (NOLOCK) ON p.object_id = o.object_id + JOIN sys.indexes i WITH (NOLOCK) ON p.index_id = i.index_id AND i.object_id = p.object_id + JOIN sys.schemas s WITH (NOLOCK) ON o.schema_id = s.schema_id + LEFT JOIN sys.tables t WITH (NOLOCK) ON o.object_id = t.object_id + LEFT JOIN sys.filegroups f WITH (NOLOCK) ON au.data_space_id = f.data_space_id + LEFT JOIN sys.filegroups f2 WITH (NOLOCK) ON t.lob_data_space_id = f2.data_space_id +WHERE au.[type] = 1 + AND i.[type] <= 2 -- heap, clustered, nonclustered + AND (f.[name] = '$sourceFG' OR f2.[name] = '$sourceFG')"; + +if ($schemaFilter -ne $null) { + $qry += "`n`tAND s.name LIKE '$schemaFilter'"; +} + +if ($nameFilter -ne $null) { + $qry += "`n`tAND o.name LIKE '$nameFilter'"; +} + +if ($minSizeFilter -ne $null) { + $qry += "`n`tAND au.data_pages > " + ($minSizeFilter * 128); +} + +if ($maxSizeFilter -ne $null) { + $qry += "`n`tAND au.data_pages <= " + ($maxSizeFilter * 128); +} + +$qry += "`nORDER BY SchemaName, ObjName, p.index_id;"; + +$idxList = Invoke-Sqlcmd -ServerInstance $serverName -database $dbName -query $qry + +$totalSize = 0; +$migratedSize = 0; +$foreachIndex = 0; +$foreachSize = $idxList.Length; + +#iterate through each index +foreach ($i in $idxList | sort Size_MB,SchemaName,ObjName) { + $sn = $i.SchemaName; + $on = $i.ObjName; + $iid = $i.IndexID; + $in = $i.IdxName; + $sz = $i.Size_MB; + $oid = $i.ObjID; + $online = "ON"; + + $foreachIndex += 1; + $totalSize += $sz; + + PrintUpdate "[$foreachIndex / $foreachSize] Moving $sn.$on ($iid) [$sz MB]" $true; + # does index contain datatypes that prohibit online operations? + #if($online = "ON") { + if($iid -le 1) { + # if indexID = 0 then look in sys.columns + $qry = "SELECT COUNT(c.OBJECT_ID) AS n + FROM sys.columns c + INNER JOIN sys.objects o ON c.object_id = o.object_id + INNER JOIN sys.schemas s ON o.schema_id = s.schema_id + INNER JOIN sys.types t ON c.user_type_id = t.user_type_id + WHERE s.name = '$sn' + AND o.name = '$on' + AND ( + t.name IN ('text','ntext','image','xml') + OR ( + t.name IN ('varchar','nvarchar','varbinary') + AND + t.max_length = -1 + ) + );"; + } else { + # else look in sys.index_columns + $qry = "SELECT COUNT(ic.object_id) AS n + FROM sys.index_columns ic + INNER JOIN sys.objects o ON ic.object_id = o.object_id + INNER JOIN sys.schemas s ON o.schema_id = s.schema_id + INNER JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id + INNER JOIN sys.types t ON c.user_type_id = t.user_type_id + WHERE s.name = '$sn' + AND o.name = '$on' + AND ic.index_id = $iid + AND ( + t.name IN ('text','ntext','image','xml') + OR ( + t.name IN ('varchar','nvarchar','varbinary') + AND + t.max_length = -1 + ) + );"; + } + + try { + $rs = Invoke-Sqlcmd -ServerInstance $serverName -database $dbName -query $qry; + if($rs[0] -gt 0) { + $online = "OFF"; + } + } catch { + $online = "OFF"; + } + #} + + # if lob filegroup needs to change re-create and swap + if(![System.DBNULL]::Value.Equals($i.LOBFilegroup) -and $i.LOBFilegroup -ne $destFG -and $iid -le 1) { + # skipping because we're not doing offline operations + PrintUpdate " Skipping - LOB filegroup prevents online operations" $true; + continue; + } # + + # if index = 0 then create CL, move, delete CL + if($iid -eq 0) { + if($online -eq "OFF") { + # skipping because it can't be done online + PrintUpdate " Skipping - column(s) prevents online operations" $true; + continue; + } + + # disable all NC indexes + $tbl = $db.Tables.Item($on, $sn); + PrintUpdate " Disabling nonclustered indexes" $true; + foreach($ix in $tbl.Indexes | where {$_.ID -gt 1}) { + $j = $ix.ID; + PrintUpdate " Disabling index $j" $true; + if($runQueries -eq "y") { + $ix.Disable(); + $ix.Refresh(); + } + } # foreach + + # create clustered index on first column, rebuild CL on new filegroup, drop CL and return to heap + $qry = "SELECT QUOTENAME([name]) AS n FROM sys.columns WHERE object_id = $oid AND column_id = 1"; + $firstCol = Invoke-Sqlcmd -ServerInstance $serverName -database $dbName -query $qry; + + $qry = "CREATE CLUSTERED INDEX CL_Blah ON [$sn].[$on] (" + $firstCol.n + ") `nWITH(ONLINE=$online) ON [$destFG];"; + $qry += "`nDROP INDEX CL_Blah ON [$sn].[$on];"; + #Write-Host $qry; + PrintUpdate " Moving heap" $true; + RunSQLQuery($qry); + $migratedSize += $sz; + + # rebuild all NC indexes on new filegroup + PrintUpdate " Re-enabling nonclustered indexes" $true; + foreach($ix in $tbl.Indexes | where {$_.ID -gt 1}) { + $j = $ix.ID; + PrintUpdate " Rebuilding index $j" $true; + $ix.FileGroup = $destFG; + if($runQueries -eq "y") { + $ix.Recreate(); + $ix.Refresh(); + } + $migratedSize += ($ix.SpaceUsed/1MB); + } # foreach + + } elseif($iid -ge 1) { #clustered index + if(![System.DBNULL]::Value.Equals($i.LOBFilegroup) -and $i.LOBFilegroup -ne $destFG) { + # if the LOB filegroup needs to change, it can't be done here + # the table needs to be dropped and everything recreated + PrintUpdate " Skipping - LOB filegroup prevents online operations" $true; + continue; + } + + if($online -eq "OFF") { + # skipping because it can't be done online + PrintUpdate " Skipping - column(s) prevents online operations" $true; + continue; + } + + $tbl = $db.Tables.Item($on, $sn); + + # if index is on a heap, skip because all NC indexes on heaps will be rebuilt when the heap is moved + if(!$tbl.HasClusteredIndex) { + PrintUpdate " Skipping because index is on a heap" $true; + continue; + } + + $idx = $tbl.Indexes[$in]; + + $scr = "CREATE "; + if($idx.IsUnique -eq $true) {$scr += "UNIQUE ";} + if($idx.IsClustered -eq $true) {$scr += "CLUSTERED ";} + $scr += "INDEX [$in] ON [$sn].[$on]("; + $scr += GetIndexColumns $idx $false; + $scr += ") "; + if((GetIndexColumns $idx $true) -ne "") { + $scr += "`nINCLUDE ("; + $scr += GetIndexColumns $idx $true; + $scr += ") "; + } + if($idx.FilterDefinition -ne "") { + $scr += "`nWHERE "; + $scr += $idx.FilterDefinition; + $scr += " "; + } + $scr += "`nWITH (DROP_EXISTING=ON, ONLINE=$online, SORT_IN_TEMPDB="; + if($sz -lt 25000) { + $scr += "ON, " + } else { + $scr += "OFF, " + } + #add partition compression support later + $scr += "DATA_COMPRESSION="; + $scr += $idx.PhysicalPartitions[0].DataCompression; + $scr += ") `nON [$destFG];"; + + RunSQLQuery($scr); + $migratedSize += $sz; + + } + +} #foreach + +Write-Host "Made it to end"; +Write-Host "Total Size: $totalSize MB"; +Write-Host "Migrated Size: $migratedSize MB"; + +$runDuration = New-TimeSpan $dtStart (Get-Date); +$hrs = $runDuration.Hours; +$mins = $runDuration.Minutes; +$secs = $runDuration.Seconds; +write-host "Completed in $hrs hours $mins minutes $secs seconds"; + diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 7403a1b8..2dae904e 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -235,7 +235,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. 3. If you are working with non-global temporary tables beforehand, don’t include any modification of those inside the explicit transaction. 4. In a [loop](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/while-transact-sql), choose whether you want to put the [explicit transaction] around the loop or inside it. In most cases, prefer to put the transaction inside the loop to minimize the amount of time that blocking other users. 5. Outside of a stored procedure use [explicit transactions] if you’re doing something potentially risky. - 6. Watch out for nested transactions. + 6. Watch out for nested transactions. In SQL Server, there’s very little utility in them and their behavior is weird.[Paul Randal explains in great detail just how broken they are](https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/). More details [her](https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/). - Avoid using [Cross-Database Queries](https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/cross-database-queries) because it increase backup/restore complexity (you restore one database, then realise you don’t have log backups to bring the other database to the same point in time). Also Azure SQL Database does not support cross-database queries and you can not migrate into in future. From 443dd4b2007e660a77596ffb7ab827c88f55b3f7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 19 Aug 2020 09:47:18 +0300 Subject: [PATCH 054/553] Add new useful info --- README.md | 6 ++++++ SSMS/README.md | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c9ebb6c1..726678a0 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Module Signing Info](https://modulesigning.info/) - Info and resources related to module signing (i.e. Certificates, Asymmetric Keys, `ADD SIGNATURE`, etc) in T-SQL and SQLCLR - Free Videos - [Youtube Brent Ozar](https://www.youtube.com/user/BrentOzar/videos) + - [Youtube Free SQL Server Statisctics Class](https://www.youtube.com/playlist?list=PLDYqU5RH_aX05ajDAH-6sYXr4i1Mjh9lT) - [SQLPASSTV videos](https://www.youtube.com/user/SQLPASSTV/videos) - [IDERA Resource Center](https://www.idera.com/resourcecentral) - [MSSQLTips SQL Server Webcasts and Videos](https://www.mssqltips.com/sql-server-webcasts/) @@ -289,6 +290,9 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Microsoft Ignite](https://www.microsoft.com/en-us/ignite) - [Microsoft Build](https://www.microsoft.com/en-us/build) - [Devintersection](https://devintersection.com/) + - [SentryOne SQL Server Virtual Conference](https://info.sentryone.com/accelerate-2020) + - [Red Gate SQL Server Online Events](https://www.red-gate.com/hub/events/online-events/) + - [EigthKB Sql Server Internals Conference](https://eightkb.online/) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) @@ -373,6 +377,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Data-Blogger-Resource-Kit - Includes resources for use by bloggers, microbloggers, vloggers, and origami enthusiasts who focus on SQL Server](https://github.com/amtwo/Data-Blogger-Resource-Kit) (by Andy Andy Mallon) - [SQL-Server-Multi-Thread - a framework to do multi-threading in T-SQL using SQL Server Agent jobs.](https://github.com/jobbish-sql/SQL-Server-Multi-Thread) (by ) - [SQL Server and Azure SQL Labs and Workshops](https://microsoft.github.io/sqlworkshops/) (by Microsoft) + - [MsSqlDependencyBrowser - Simple tool to browse between dependent objects on MS SQL Server](https://github.com/usharik/MsSqlDependencyBrowser) (by Aleksej Usharovskij) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) @@ -424,6 +429,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Azure Database Migration Guide](https://datamigration.microsoft.com/) (by Microsoft) - [Hermitage: Testing transaction isolation levels in relation databases](https://github.com/ept/hermitage) (by Martin Kleppmann) - [csv to INSERT online converter - translates your tab-delimited data into a T-SQL INSERT statement](https://table.strd.co/) (by Structured Concepts AB) + - [SQL Server Diagrams](http://www.e-squillace.com/techdiagrams-sqlserver/) (by George Squillace) **[⬆ back to top](#table-of-contents)** diff --git a/SSMS/README.md b/SSMS/README.md index 9b5ab10c..de8a8943 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -5,10 +5,13 @@ It also provides tools to deploy, monitor, and upgrade the data-tier components, ## SSMS Guides -- [40 SSMS Tips](SSMS_Tips.md) -- [36 SSMS Addins](SSMS_Addins.md) +- [40 SSMS Tips](SSMS_Tips.md) (by Konstantin Taranov) +- [36 SSMS Addins](SSMS_Addins.md) (by Konstantin Taranov) - [SSMS Snippets](SSMS_Snippets) -- [SSMS Shortcuts](SSMS_Shortcuts.md) +- [SSMS Shortcuts](SSMS_Shortcuts.md) (by Konstantin Taranov) +- [A month of SSMS tips and tricks](https://blog.waynesheffield.com/wayne/archive/2018/02/ssms-tips-tricks/) (by Wayne Sheffield) +- [SSMS Tricks & Shortcuts](http://www.e-squillace.com/ssms-tricks-shortcuts/) (by George Squillace) +- [SSMS Tricks and Tips Ebook](https://sql-down-under.newzenler.com/f/ssms-tips-tricks-book) (by Greg Low) ### Useful Resources - [Download SQL Server Management Studio (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms) @@ -20,7 +23,6 @@ It also provides tools to deploy, monitor, and upgrade the data-tier components, - [SQL Server Management Studio (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-ssms) - [Microsoft Download Center SSMS](https://www.microsoft.com/en-us/download/search.aspx?q=sql%20server%20management%20studio&p=0&r=10&t=&s=Relevancy~Descending) - [Add Transact-SQL Snippets](https://docs.microsoft.com/en-us/sql/relational-databases/scripting/add-transact-sql-snippets) -- [A month of SSMS tips and tricks](https://blog.waynesheffield.com/wayne/archive/2018/02/ssms-tips-tricks/) ## Supported SQL Server versions From 8718d1cc85f29a57bf62a34172dab517ca6bb4ca Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 20 Aug 2020 04:20:10 +0300 Subject: [PATCH 055/553] Add new useful info --- Articles/README.md | 2 ++ README.md | 1 + 2 files changed, 3 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 29ae738c..2b21e7c0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1187,6 +1187,7 @@ Articles types: | [Who does SQL Server run xp_cmdshell command as?] | Steve Stedman | 2020-04-14 | [DBA][DEV] | | [Transaction Modes in SQL Server] | Kevin Feasel | 2020-08-10 | [DBA][DEV] | | [Working Effectively with Legacy SQL] | Kevin Feasel | 2015-03-15 | [DBA][DEV] | +| [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2348,3 +2349,4 @@ Articles types: [Who does SQL Server run xp_cmdshell command as?]:https://stevestedman.com/2020/04/who-does-sql-server-run-xp_cmdshell-command-as/ [Transaction Modes in SQL Server]:https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/ [Working Effectively with Legacy SQL]:https://www.catallaxyservices.com/presentations/legacy-sql/ +[A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ diff --git a/README.md b/README.md index 726678a0..416c2951 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL-Server-Multi-Thread - a framework to do multi-threading in T-SQL using SQL Server Agent jobs.](https://github.com/jobbish-sql/SQL-Server-Multi-Thread) (by ) - [SQL Server and Azure SQL Labs and Workshops](https://microsoft.github.io/sqlworkshops/) (by Microsoft) - [MsSqlDependencyBrowser - Simple tool to browse between dependent objects on MS SQL Server](https://github.com/usharik/MsSqlDependencyBrowser) (by Aleksej Usharovskij) + - [Projects-MS-SQL-Server-DBA - Utilities and Scripts for SQL Server dba](https://github.com/jobgemws/Projects-MS-SQL-Server-DBA) (by Evgeniy Gribkov) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From db6cdb200a6050d6d3b0156ad225c2853c427b7b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 21 Aug 2020 22:32:59 +0300 Subject: [PATCH 056/553] Add Recover_Deleted_Data_Proc stored procedure --- .../Recover_Deleted_Data_Proc.sql | 708 ++++++++++++++++++ 1 file changed, 708 insertions(+) create mode 100644 Stored_Procedure/Recover_Deleted_Data_Proc.sql diff --git a/Stored_Procedure/Recover_Deleted_Data_Proc.sql b/Stored_Procedure/Recover_Deleted_Data_Proc.sql new file mode 100644 index 00000000..6ca21da0 --- /dev/null +++ b/Stored_Procedure/Recover_Deleted_Data_Proc.sql @@ -0,0 +1,708 @@ +-- Script Name: Recover_Deleted_Data_Proc +-- Script Type : Recovery Procedure +-- Develop By: Muhammad Imran +-- Date Created: 15 Oct 2011 +-- Modify Date: 22 Aug 2012 +-- Version : 3.1 +-- Notes : Included BLOB data types for recovery.& Compatibile with Default , CS collation , Arabic_CI_AS. + +--DROP PROCEDURE Recover_Deleted_Data_Proc +--GO +Create PROCEDURE Recover_Deleted_Data_Proc +@Database_Name NVARCHAR(MAX), +@SchemaName_n_TableName NVARCHAR(Max), +@Date_From DATETIME='1900/01/01', +@Date_To DATETIME ='9999/12/31' +AS + +DECLARE @RowLogContents VARBINARY(8000) +DECLARE @TransactionID NVARCHAR(Max) +DECLARE @AllocUnitID BIGINT +DECLARE @AllocUnitName NVARCHAR(Max) +DECLARE @SQL NVARCHAR(Max) +DECLARE @Compatibility_Level INT + + +SELECT @Compatibility_Level=dtb.compatibility_level +FROM +master.sys.databases AS dtb WHERE dtb.name=@Database_Name + +IF ISNULL(@Compatibility_Level,0)<=80 +BEGIN + RAISERROR('The compatibility level should be equal to or greater SQL SERVER 2005 (90)',16,1) + RETURN +END + +IF (SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE [TABLE_SCHEMA]+'.'+[TABLE_NAME]=@SchemaName_n_TableName)=0 +BEGIN + RAISERROR('Could not found the table in the defined database',16,1) + RETURN +END + +DECLARE @bitTable TABLE +( + [ID] INT, + [Bitvalue] INT +) +--Create table to set the bit position of one byte. + +INSERT INTO @bitTable +SELECT 0,2 UNION ALL +SELECT 1,2 UNION ALL +SELECT 2,4 UNION ALL +SELECT 3,8 UNION ALL +SELECT 4,16 UNION ALL +SELECT 5,32 UNION ALL +SELECT 6,64 UNION ALL +SELECT 7,128 + +--Create table to collect the row data. +DECLARE @DeletedRecords TABLE +( + [Row ID] INT IDENTITY(1,1), + [RowLogContents] VARBINARY(8000), + [AllocUnitID] BIGINT, + [Transaction ID] NVARCHAR(Max), + [FixedLengthData] SMALLINT, + [TotalNoOfCols] SMALLINT, + [NullBitMapLength] SMALLINT, + [NullBytes] VARBINARY(8000), + [TotalNoofVarCols] SMALLINT, + [ColumnOffsetArray] VARBINARY(8000), + [VarColumnStart] SMALLINT, + [Slot ID] INT, + [NullBitMap] VARCHAR(MAX) + +) +--Create a common table expression to get all the row data plus how many bytes we have for each row. +;WITH RowData AS ( +SELECT + +[RowLog Contents 0] AS [RowLogContents] + +,[AllocUnitID] AS [AllocUnitID] + +,[Transaction ID] AS [Transaction ID] + +--[Fixed Length Data] = Substring (RowLog content 0, Status Bit A+ Status Bit B + 1,2 bytes) +,CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) AS [FixedLengthData] --@FixedLengthData + +-- [TotalnoOfCols] = Substring (RowLog content 0, [Fixed Length Data] + 1,2 bytes) +,CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2)))) as [TotalNoOfCols] + +--[NullBitMapLength]=ceiling([Total No of Columns] /8.0) +,CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)) as [NullBitMapLength] + +--[Null Bytes] = Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [NullBitMapLength] ) +,SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 3, +CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0))) as [NullBytes] + +--[TotalNoofVarCols] = Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [Null Bitmap length] + 2 ) +,(CASE WHEN SUBSTRING([RowLog Contents 0], 1, 1) In (0x10,0x30,0x70) THEN +CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], +CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 3 ++ CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)), 2)))) ELSE null END) AS [TotalNoofVarCols] + +--[ColumnOffsetArray]= Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [Null Bitmap length] + 2 , [TotalNoofVarCols]*2 ) +,(CASE WHEN SUBSTRING([RowLog Contents 0], 1, 1) In (0x10,0x30,0x70) THEN +SUBSTRING([RowLog Contents 0] +, CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 3 ++ CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)) + 2 +, (CASE WHEN SUBSTRING([RowLog Contents 0], 1, 1) In (0x10,0x30,0x70) THEN +CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], +CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 3 ++ CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)), 2)))) ELSE null END) +* 2) ELSE null END) AS [ColumnOffsetArray] + +-- Variable column Start = Status Bit A+ Status Bit B + [Fixed Length Data] + [Null Bitmap length] + 2+([TotalNoofVarCols]*2) +,CASE WHEN SUBSTRING([RowLog Contents 0], 1, 1)In (0x10,0x30,0x70) +THEN ( +CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 4 + ++ CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)) + ++ ((CASE WHEN SUBSTRING([RowLog Contents 0], 1, 1) In (0x10,0x30,0x70) THEN +CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], +CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 3 ++ CONVERT(INT, ceiling(CONVERT(INT, CONVERT(BINARY(2), REVERSE(SUBSTRING([RowLog Contents 0], CONVERT(SMALLINT, CONVERT(BINARY(2) +,REVERSE(SUBSTRING([RowLog Contents 0], 2 + 1, 2)))) + 1, 2))))/8.0)), 2)))) ELSE null END) * 2)) + +ELSE null End AS [VarColumnStart] +,[Slot ID] +FROM sys.fn_dblog(NULL, NULL) +WHERE +AllocUnitId IN +(SELECT [Allocation_unit_id] FROM sys.allocation_units allocunits +INNER JOIN sys.partitions partitions ON (allocunits.type IN (1, 3) +AND partitions.hobt_id = allocunits.container_id) OR (allocunits.type = 2 +AND partitions.partition_id = allocunits.container_id) +WHERE object_id=object_ID('' + @SchemaName_n_TableName + '')) + +AND Context IN ('LCX_MARK_AS_GHOST', 'LCX_HEAP') AND Operation in ('LOP_DELETE_ROWS') +And SUBSTRING([RowLog Contents 0], 1, 1)In (0x10,0x30,0x70) + +/*Use this subquery to filter the date*/ +AND [TRANSACTION ID] IN (SELECT DISTINCT [TRANSACTION ID] FROM sys.fn_dblog(NULL, NULL) +WHERE Context IN ('LCX_NULL') AND Operation in ('LOP_BEGIN_XACT') +And [Transaction Name] In ('DELETE','user_transaction') +And CONVERT(NVARCHAR(11),[Begin Time]) BETWEEN @Date_From AND @Date_To)), + +--Use this technique to repeate the row till the no of bytes of the row. +N1 (n) AS (SELECT 1 UNION ALL SELECT 1), +N2 (n) AS (SELECT 1 FROM N1 AS X, N1 AS Y), +N3 (n) AS (SELECT 1 FROM N2 AS X, N2 AS Y), +N4 (n) AS (SELECT ROW_NUMBER() OVER(ORDER BY X.n) + FROM N3 AS X, N3 AS Y) + + + +INSERT INTO @DeletedRecords +SELECT RowLogContents + ,[AllocUnitID] + ,[Transaction ID] + ,[FixedLengthData] + ,[TotalNoOfCols] + ,[NullBitMapLength] + ,[NullBytes] + ,[TotalNoofVarCols] + ,[ColumnOffsetArray] + ,[VarColumnStart] + ,[Slot ID] + ---Get the Null value against each column (1 means null zero means not null) + ,[NullBitMap]=(REPLACE(STUFF((SELECT ',' + + (CASE WHEN [ID]=0 THEN CONVERT(NVARCHAR(1),(SUBSTRING(NullBytes, n, 1) % 2)) ELSE CONVERT(NVARCHAR(1),((SUBSTRING(NullBytes, n, 1) / [Bitvalue]) % 2)) END) --as [nullBitMap] + +FROM +N4 AS Nums +Join RowData AS C ON n<=NullBitMapLength +Cross Join @bitTable WHERE C.[RowLogContents]=D.[RowLogContents] ORDER BY [RowLogContents],n ASC FOR XML PATH('')),1,1,''),',','')) +FROM RowData D + +IF (SELECT COUNT(*) FROM @DeletedRecords)=0 +BEGIN + RAISERROR('There is no data in the log as per the search criteria',16,1) + RETURN +END + +DECLARE @ColumnNameAndData TABLE +( + [Row ID] int, + [Rowlogcontents] varbinary(Max), + [NAME] sysname, + [nullbit] smallint, + [leaf_offset] smallint, + [length] smallint, + [system_type_id] tinyint, + [bitpos] tinyint, + [xprec] tinyint, + [xscale] tinyint, + [is_null] int, + [Column value Size]int, + [Column Length] int, + [hex_Value] varbinary(max), + [Slot ID] int, + [Update] int +) + +--Create common table expression and join it with the rowdata table +-- to get each column details +/*This part is for variable data columns*/ +--@RowLogContents, +--(col.columnOffValue - col.columnLength) + 1, +--col.columnLength +--) +INSERT INTO @ColumnNameAndData +SELECT +[Row ID], +Rowlogcontents, +NAME , +cols.leaf_null_bit AS nullbit, +leaf_offset, +ISNULL(syscolumns.length, cols.max_length) AS [length], +cols.system_type_id, +cols.leaf_bit_position AS bitpos, +ISNULL(syscolumns.xprec, cols.precision) AS xprec, +ISNULL(syscolumns.xscale, cols.scale) AS xscale, +SUBSTRING([nullBitMap], cols.leaf_null_bit, 1) AS is_null, +(CASE WHEN leaf_offset<1 and SUBSTRING([nullBitMap], cols.leaf_null_bit, 1)=0 +THEN +(Case When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 +THEN +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) - POWER(2, 15) +ELSE +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +END) +END) AS [Column value Size], + +(CASE WHEN leaf_offset<1 and SUBSTRING([nullBitMap], cols.leaf_null_bit, 1)=0 THEN +(Case + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 +THEN (Case When [System_type_id]In (35,34,99) Then 16 else 24 end) + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 +THEN (Case When [System_type_id]In (35,34,99) Then 16 else 24 end) --24 + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 +THEN (CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])) + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 + +THEN POWER(2, 15) +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart]) + +END) + +END) AS [Column Length] + +,(CASE WHEN SUBSTRING([nullBitMap], cols.leaf_null_bit, 1)=1 THEN NULL ELSE + SUBSTRING + ( + Rowlogcontents, + ( + +(Case When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 +THEN +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) - POWER(2, 15) +ELSE +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +END) + + - +(Case When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 + +THEN (Case When [System_type_id]In (35,34,99) Then 16 else 24 end) --24 +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 + +THEN (Case When [System_type_id]In (35,34,99) Then 16 else 24 end) --24 +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 + +THEN CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart]) + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 + +THEN POWER(2, 15) +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart]) + +END) + +) + 1, +(Case When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 + +THEN (Case When [System_type_id] In (35,34,99) Then 16 else 24 end) --24 +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) >30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 + +THEN (Case When [System_type_id] In (35,34,99) Then 16 else 24 end) --24 +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])<30000 + +THEN ABS(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])) + +When CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) <30000 And +ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart])>30000 + +THEN POWER(2, 15) +CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * leaf_offset*-1) - 1, 2)))) +- ISNULL(NULLIF(CONVERT(INT, CONVERT(BINARY(2), REVERSE (SUBSTRING ([ColumnOffsetArray], (2 * ((leaf_offset*-1) - 1)) - 1, 2)))), 0), [varColumnStart]) + +END) +) + +END) AS hex_Value +,[Slot ID] +,0 +FROM @DeletedRecords A +Inner Join sys.allocation_units allocunits On A.[AllocUnitId]=allocunits.[Allocation_Unit_Id] +INNER JOIN sys.partitions partitions ON (allocunits.type IN (1, 3) +AND partitions.hobt_id = allocunits.container_id) OR (allocunits.type = 2 AND partitions.partition_id = allocunits.container_id) +INNER JOIN sys.system_internals_partition_columns cols ON cols.partition_id = partitions.partition_id +LEFT OUTER JOIN syscolumns ON syscolumns.id = partitions.object_id AND syscolumns.colid = cols.partition_column_id +WHERE leaf_offset<0 +UNION +/*This part is for fixed data columns*/ +SELECT +[Row ID], +Rowlogcontents, +NAME , +cols.leaf_null_bit AS nullbit, +leaf_offset, +ISNULL(syscolumns.length, cols.max_length) AS [length], +cols.system_type_id, +cols.leaf_bit_position AS bitpos, +ISNULL(syscolumns.xprec, cols.precision) AS xprec, +ISNULL(syscolumns.xscale, cols.scale) AS xscale, +SUBSTRING([nullBitMap], cols.leaf_null_bit, 1) AS is_null, +(SELECT TOP 1 ISNULL(SUM(CASE WHEN C.leaf_offset >1 THEN max_length ELSE 0 END),0) FROM +sys.system_internals_partition_columns C WHERE cols.partition_id =C.partition_id And C.leaf_null_bit1 And C.leaf_bit_position=0 THEN max_length ELSE 0 END),0) FROM +sys.system_internals_partition_columns C where cols.partition_id =C.partition_id And C.leaf_null_bit0 +Order By nullbit + +Declare @BitColumnByte as int +Select @BitColumnByte=CONVERT(INT, ceiling( Count(*)/8.0)) from @ColumnNameAndData Where [System_Type_id]=104 + +;With N1 (n) AS (SELECT 1 UNION ALL SELECT 1), +N2 (n) AS (SELECT 1 FROM N1 AS X, N1 AS Y), +N3 (n) AS (SELECT 1 FROM N2 AS X, N2 AS Y), +N4 (n) AS (SELECT ROW_NUMBER() OVER(ORDER BY X.n) + FROM N3 AS X, N3 AS Y), +CTE As( +Select RowLogContents,[nullbit] + ,[BitMap]=Convert(varbinary(1),Convert(int,Substring((REPLACE(STUFF((SELECT ',' + + (CASE WHEN [ID]=0 THEN CONVERT(NVARCHAR(1),(SUBSTRING(hex_Value, n, 1) % 2)) ELSE CONVERT(NVARCHAR(1),((SUBSTRING(hex_Value, n, 1) / [Bitvalue]) % 2)) END) --as [nullBitMap] + +from N4 AS Nums +Join @ColumnNameAndData AS C ON n<=@BitColumnByte And [System_Type_id]=104 And bitpos=0 +Cross Join @bitTable WHERE C.[RowLogContents]=D.[RowLogContents] ORDER BY [RowLogContents],n ASC FOR XML PATH('')),1,1,''),',','')),bitpos+1,1))) +FROM @ColumnNameAndData D Where [System_Type_id]=104) + +Update A Set [hex_Value]=[BitMap] +from @ColumnNameAndData A +Inner Join CTE B On A.[RowLogContents]=B.[RowLogContents] +And A.[nullbit]=B.[nullbit] + + +/**************Check for BLOB DATA TYPES******************************/ +DECLARE @Fileid INT +DECLARE @Pageid INT +DECLARE @Slotid INT +DECLARE @CurrentLSN INT +DECLARE @LinkID INT +DECLARE @Context VARCHAR(50) +DECLARE @ConsolidatedPageID VARCHAR(MAX) +DECLARE @LCX_TEXT_MIX VARBINARY(MAX) + +declare @temppagedata table +( +[ParentObject] sysname, +[Object] sysname, +[Field] sysname, +[Value] sysname) + +declare @pagedata table +( +[Page ID] sysname, +[File IDS] int, +[Page IDS] int, +[AllocUnitId] bigint, +[ParentObject] sysname, +[Object] sysname, +[Field] sysname, +[Value] sysname) + +DECLARE @ModifiedRawData TABLE +( + [ID] INT IDENTITY(1,1), + [PAGE ID] VARCHAR(MAX), + [FILE IDS] INT, + [PAGE IDS] INT, + [Slot ID] INT, + [AllocUnitId] BIGINT, + [RowLog Contents 0_var] VARCHAR(Max), + [RowLog Length] VARCHAR(50), + [RowLog Len] INT, + [RowLog Contents 0] VARBINARY(Max), + [Link ID] INT default (0), + [Update] INT +) + + DECLARE Page_Data_Cursor CURSOR FOR + /*We need to filter LOP_MODIFY_ROW,LOP_MODIFY_COLUMNS from log for deleted records of BLOB data type& Get its Slot No, Page ID & AllocUnit ID*/ + SELECT LTRIM(RTRIM(Replace([Description],'Deallocated',''))) AS [PAGE ID] + ,[Slot ID],[AllocUnitId],NULL AS [RowLog Contents 0],NULL AS [RowLog Contents 0],Context + FROM sys.fn_dblog(NULL, NULL) + WHERE + AllocUnitId IN + (SELECT [Allocation_unit_id] FROM sys.allocation_units allocunits + INNER JOIN sys.partitions partitions ON (allocunits.type IN (1, 3) + AND partitions.hobt_id = allocunits.container_id) OR (allocunits.type = 2 + AND partitions.partition_id = allocunits.container_id) + WHERE object_id=object_ID('' + @SchemaName_n_TableName + '')) + AND Operation IN ('LOP_MODIFY_ROW') AND [Context] IN ('LCX_PFS') + AND Description Like '%Deallocated%' + /*Use this subquery to filter the date*/ + AND [TRANSACTION ID] IN (SELECT DISTINCT [TRANSACTION ID] FROM sys.fn_dblog(NULL, NULL) + WHERE Context IN ('LCX_NULL') AND Operation in ('LOP_BEGIN_XACT') + AND [Transaction Name]='DELETE' + AND CONVERT(NVARCHAR(11),[Begin Time]) BETWEEN @Date_From AND @Date_To) + GROUP BY [Description],[Slot ID],[AllocUnitId],Context + + UNION + + SELECT [PAGE ID],[Slot ID],[AllocUnitId] + ,Substring([RowLog Contents 0],15,LEN([RowLog Contents 0])) AS [RowLog Contents 0] + ,CONVERT(INT,Substring([RowLog Contents 0],7,2)),Context --,CAST(RIGHT([Current LSN],4) AS INT) AS [Current LSN] + FROM sys.fn_dblog(NULL, NULL) + WHERE + AllocUnitId IN + (SELECT [Allocation_unit_id] FROM sys.allocation_units allocunits + INNER JOIN sys.partitions partitions ON (allocunits.type IN (1, 3) + AND partitions.hobt_id = allocunits.container_id) OR (allocunits.type = 2 + AND partitions.partition_id = allocunits.container_id) + WHERE object_id=object_ID('' + @SchemaName_n_TableName + '')) + AND Context IN ('LCX_TEXT_MIX') AND Operation in ('LOP_DELETE_ROWS') + /*Use this subquery to filter the date*/ + AND [TRANSACTION ID] IN (SELECT DISTINCT [TRANSACTION ID] FROM sys.fn_dblog(NULL, NULL) + WHERE Context IN ('LCX_NULL') AND Operation in ('LOP_BEGIN_XACT') + And [Transaction Name]='DELETE' + And CONVERT(NVARCHAR(11),[Begin Time]) BETWEEN @Date_From AND @Date_To) + + /****************************************/ + + OPEN Page_Data_Cursor + + FETCH NEXT FROM Page_Data_Cursor INTO @ConsolidatedPageID, @Slotid,@AllocUnitID,@LCX_TEXT_MIX,@LinkID,@Context + + WHILE @@FETCH_STATUS = 0 + BEGIN + DECLARE @hex_pageid AS VARCHAR(Max) + /*Page ID contains File Number and page number It looks like 0001:00000130. + In this example 0001 is file Number & 00000130 is Page Number & These numbers are in Hex format*/ + SET @Fileid=SUBSTRING(@ConsolidatedPageID,0,CHARINDEX(':',@ConsolidatedPageID)) -- Seperate File ID from Page ID + + SET @hex_pageid ='0x'+ SUBSTRING(@ConsolidatedPageID,CHARINDEX(':',@ConsolidatedPageID)+1,Len(@ConsolidatedPageID)) ---Seperate the page ID + SELECT @Pageid=Convert(INT,cast('' AS XML).value('xs:hexBinary(substring(sql:variable("@hex_pageid"),sql:column("t.pos")) )', 'varbinary(max)')) -- Convert Page ID from hex to integer + FROM (SELECT CASE substring(@hex_pageid, 1, 2) WHEN '0x' THEN 3 ELSE 0 END) AS t(pos) + + IF @Context='LCX_PFS' + BEGIN + DELETE @temppagedata + INSERT INTO @temppagedata EXEC( 'DBCC PAGE(' + @DataBase_Name + ', ' + @fileid + ', ' + @pageid + ', 1) with tableresults,no_infomsgs;'); + INSERT INTO @pagedata SELECT @ConsolidatedPageID,@fileid,@pageid,@AllocUnitID,[ParentObject],[Object],[Field] ,[Value] FROM @temppagedata + END + ELSE IF @Context='LCX_TEXT_MIX' + BEGIN + INSERT INTO @ModifiedRawData SELECT @ConsolidatedPageID,@fileid,@pageid,@Slotid,@AllocUnitID,NULL,0,CONVERT(INT,CONVERT(VARBINARY,REVERSE(SUBSTRING(@LCX_TEXT_MIX,11,2)))),@LCX_TEXT_MIX,@LinkID,0 + END + FETCH NEXT FROM Page_Data_Cursor INTO @ConsolidatedPageID, @Slotid,@AllocUnitID,@LCX_TEXT_MIX,@LinkID,@Context + END + + CLOSE Page_Data_Cursor + DEALLOCATE Page_Data_Cursor + + DECLARE @Newhexstring VARCHAR(MAX); + + --The data is in multiple rows in the page, so we need to convert it into one row as a single hex value. + --This hex value is in string format + INSERT INTO @ModifiedRawData ([PAGE ID],[FILE IDS],[PAGE IDS],[Slot ID],[AllocUnitId] + ,[RowLog Contents 0_var] + , [RowLog Length]) + SELECT [Page ID],[FILE IDS],[PAGE IDS],Substring([ParentObject],CHARINDEX('Slot', [ParentObject])+4, (CHARINDEX('Offset', [ParentObject])-(CHARINDEX('Slot', [ParentObject])+4))-2 ) as [Slot ID] + ,[AllocUnitId] + ,Substring(( + SELECT + REPLACE(STUFF((SELECT REPLACE(SUBSTRING([Value],CHARINDEX(':',[Value])+1,CHARINDEX('',[Value])-CHARINDEX(':',[Value])),'','') + FROM @pagedata C WHERE B.[Page ID]= C.[Page ID] And Substring(B.[ParentObject],CHARINDEX('Slot', B.[ParentObject])+4, (CHARINDEX('Offset', B.[ParentObject])-(CHARINDEX('Slot', B.[ParentObject])+4)) )=Substring(C.[ParentObject],CHARINDEX('Slot', C.[ParentObject])+4, (CHARINDEX('Offset', C.[ParentObject])-(CHARINDEX('Slot', C.[ParentObject])+4)) ) And + [Object] Like '%Memory Dump%' Order By '0x'+ LEFT([Value],CHARINDEX(':',[Value])-1) + FOR XML PATH('') ),1,1,'') ,' ','') + ),1,20000) AS [Value] + + , + Substring(( + SELECT '0x' +REPLACE(STUFF((SELECT REPLACE(SUBSTRING([Value],CHARINDEX(':',[Value])+1,CHARINDEX('',[Value])-CHARINDEX(':',[Value])),'','') + FROM @pagedata C WHERE B.[Page ID]= C.[Page ID] And Substring(B.[ParentObject],CHARINDEX('Slot', B.[ParentObject])+4, (CHARINDEX('Offset', B.[ParentObject])-(CHARINDEX('Slot', B.[ParentObject])+4)) )=Substring(C.[ParentObject],CHARINDEX('Slot', C.[ParentObject])+4, (CHARINDEX('Offset', C.[ParentObject])-(CHARINDEX('Slot', C.[ParentObject])+4)) ) And + [Object] Like '%Memory Dump%' Order By '0x'+ LEFT([Value],CHARINDEX(':',[Value])-1) + FOR XML PATH('') ),1,1,'') ,' ','') + ),7,4) AS [Length] + + From @pagedata B + Where [Object] Like '%Memory Dump%' + Group By [Page ID],[FILE IDS],[PAGE IDS],[ParentObject],[AllocUnitId]--,[Current LSN] + Order By [Slot ID] + + UPDATE @ModifiedRawData SET [RowLog Len] = CONVERT(VARBINARY(8000),REVERSE(cast('' AS XML).value('xs:hexBinary(substring(sql:column("[RowLog Length]"),0))', 'varbinary(Max)'))) + FROM @ModifiedRawData Where [LINK ID]=0 + + UPDATE @ModifiedRawData SET [RowLog Contents 0] =cast('' AS XML).value('xs:hexBinary(substring(sql:column("[RowLog Contents 0_var]"),0))', 'varbinary(Max)') + FROM @ModifiedRawData Where [LINK ID]=0 + + Update B Set B.[RowLog Contents 0] = + (CASE WHEN A.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NOT NULL THEN A.[RowLog Contents 0]+C.[RowLog Contents 0] + WHEN A.[RowLog Contents 0] IS NULL AND C.[RowLog Contents 0] IS NOT NULL THEN C.[RowLog Contents 0] + WHEN A.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NULL THEN A.[RowLog Contents 0] + END) + ,B.[Update]=ISNULL(B.[Update],0)+1 + from @ModifiedRawData B + LEFT Join @ModifiedRawData A On A.[Page IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],15+14,2)))) + And A.[File IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],19+14,2)))) + And A.[Link ID]=B.[Link ID] + LEFT Join @ModifiedRawData C On C.[Page IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],27+14,2)))) + And C.[File IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],31+14,2)))) + And C.[Link ID]=B.[Link ID] + Where (A.[RowLog Contents 0] IS NOT NULL OR C.[RowLog Contents 0] IS NOT NULL) + + + Update B Set B.[RowLog Contents 0] = + (CASE WHEN A.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NOT NULL THEN A.[RowLog Contents 0]+C.[RowLog Contents 0] + WHEN A.[RowLog Contents 0] IS NULL AND C.[RowLog Contents 0] IS NOT NULL THEN C.[RowLog Contents 0] + WHEN A.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NULL THEN A.[RowLog Contents 0] + END) + --,B.[Update]=ISNULL(B.[Update],0)+1 + from @ModifiedRawData B + LEFT Join @ModifiedRawData A On A.[Page IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],15+14,2)))) + And A.[File IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],19+14,2)))) + And A.[Link ID]<>B.[Link ID] And B.[Update]=0 + LEFT Join @ModifiedRawData C On C.[Page IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],27+14,2)))) + And C.[File IDS]=Convert(int,Convert(Varbinary(Max),Reverse(Substring(B.[RowLog Contents 0],31+14,2)))) + And C.[Link ID]<>B.[Link ID] And B.[Update]=0 + Where (A.[RowLog Contents 0] IS NOT NULL OR C.[RowLog Contents 0] IS NOT NULL) + + UPDATE @ModifiedRawData SET [RowLog Contents 0] = + (Case When [RowLog Len]>=8000 Then + Substring([RowLog Contents 0] ,15,[RowLog Len]) + When [RowLog Len]<8000 Then + SUBSTRING([RowLog Contents 0],15+6,Convert(int,Convert(varbinary(max),REVERSE(Substring([RowLog Contents 0],15,6))))) + End) + FROM @ModifiedRawData Where [LINK ID]=0 + + UPDATE @ColumnNameAndData SET [hex_Value]=[RowLog Contents 0] + --,A.[Update]=A.[Update]+1 + FROM @ColumnNameAndData A + INNER JOIN @ModifiedRawData B ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],17,4))))=[PAGE IDS] + AND Convert(int,Substring([hex_value],9,2)) =B.[Link ID] + Where [System_Type_Id] In (99,167,175,231,239,241,165,98) And [Link ID] <>0 + + UPDATE @ColumnNameAndData SET [hex_Value]= + (CASE WHEN B.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NOT NULL THEN B.[RowLog Contents 0]+C.[RowLog Contents 0] + WHEN B.[RowLog Contents 0] IS NULL AND C.[RowLog Contents 0] IS NOT NULL THEN C.[RowLog Contents 0] + WHEN B.[RowLog Contents 0] IS NOT NULL AND C.[RowLog Contents 0] IS NULL THEN B.[RowLog Contents 0] + END) + --,A.[Update]=A.[Update]+1 + FROM @ColumnNameAndData A + LEFT JOIN @ModifiedRawData B ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],5,4))))=B.[PAGE IDS] And B.[Link ID] =0 + LEFT JOIN @ModifiedRawData C ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],17,4))))=C.[PAGE IDS] And C.[Link ID] =0 + Where [System_Type_Id] In (99,167,175,231,239,241,165,98) And (B.[RowLog Contents 0] IS NOT NULL OR C.[RowLog Contents 0] IS NOT NULL) + + UPDATE @ColumnNameAndData SET [hex_Value]=[RowLog Contents 0] + --,A.[Update]=A.[Update]+1 + FROM @ColumnNameAndData A + INNER JOIN @ModifiedRawData B ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],9,4))))=[PAGE IDS] + And Convert(int,Substring([hex_value],3,2))=[Link ID] + Where [System_Type_Id] In (35,34,99) And [Link ID] <>0 + + UPDATE @ColumnNameAndData SET [hex_Value]=[RowLog Contents 0] + --,A.[Update]=A.[Update]+10 + FROM @ColumnNameAndData A + INNER JOIN @ModifiedRawData B ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],9,4))))=[PAGE IDS] + Where [System_Type_Id] In (35,34,99) And [Link ID] =0 + + UPDATE @ColumnNameAndData SET [hex_Value]=[RowLog Contents 0] + --,A.[Update]=A.[Update]+1 + FROM @ColumnNameAndData A + INNER JOIN @ModifiedRawData B ON + Convert(int,Convert(Varbinary(Max),Reverse(Substring([hex_value],15,4))))=[PAGE IDS] + Where [System_Type_Id] In (35,34,99) And [Link ID] =0 + + Update @ColumnNameAndData set [hex_value]= 0xFFFE + Substring([hex_value],9,LEN([hex_value])) + --,[Update]=[Update]+1 + Where [system_type_id]=241 + +CREATE TABLE [#temp_Data] +( + [FieldName] VARCHAR(MAX), + [FieldValue] NVARCHAR(MAX), + [Rowlogcontents] VARBINARY(8000), + [Row ID] int +) + +INSERT INTO #temp_Data +SELECT NAME, +CASE + WHEN system_type_id IN (231, 239) THEN LTRIM(RTRIM(CONVERT(NVARCHAR(max),hex_Value))) --NVARCHAR ,NCHAR + WHEN system_type_id IN (167,175) THEN LTRIM(RTRIM(CONVERT(VARCHAR(max),hex_Value))) --VARCHAR,CHAR + WHEN system_type_id IN (35) THEN LTRIM(RTRIM(CONVERT(VARCHAR(max),hex_Value))) --Text + WHEN system_type_id IN (99) THEN LTRIM(RTRIM(CONVERT(NVARCHAR(max),hex_Value))) --nText + WHEN system_type_id = 48 THEN CONVERT(VARCHAR(MAX), CONVERT(TINYINT, CONVERT(BINARY(1), REVERSE (hex_Value)))) --TINY INTEGER + WHEN system_type_id = 52 THEN CONVERT(VARCHAR(MAX), CONVERT(SMALLINT, CONVERT(BINARY(2), REVERSE (hex_Value)))) --SMALL INTEGER + WHEN system_type_id = 56 THEN CONVERT(VARCHAR(MAX), CONVERT(INT, CONVERT(BINARY(4), REVERSE(hex_Value)))) -- INTEGER + WHEN system_type_id = 127 THEN CONVERT(VARCHAR(MAX), CONVERT(BIGINT, CONVERT(BINARY(8), REVERSE(hex_Value))))-- BIG INTEGER + WHEN system_type_id = 61 Then CONVERT(VARCHAR(MAX),CONVERT(DATETIME,CONVERT(VARBINARY(8000),REVERSE (hex_Value))),100) --DATETIME + WHEN system_type_id =58 Then CONVERT(VARCHAR(MAX),CONVERT(SMALLDATETIME,CONVERT(VARBINARY(8000),REVERSE(hex_Value))),100) --SMALL DATETIME + WHEN system_type_id = 108 THEN CONVERT(VARCHAR(MAX),CONVERT(NUMERIC(38,20), CONVERT(VARBINARY,CONVERT(VARBINARY(1),xprec)+CONVERT(VARBINARY(1),xscale))+CONVERT(VARBINARY(1),0) + hex_Value)) --- NUMERIC + WHEN system_type_id =106 THEN CONVERT(VARCHAR(MAX), CONVERT(DECIMAL(38,20), CONVERT(VARBINARY,Convert(VARBINARY(1),xprec)+CONVERT(VARBINARY(1),xscale))+CONVERT(VARBINARY(1),0) + hex_Value)) --- DECIMAL + WHEN system_type_id In(60,122) THEN CONVERT(VARCHAR(MAX),Convert(MONEY,Convert(VARBINARY(8000),Reverse(hex_Value))),2) --MONEY,SMALLMONEY + WHEN system_type_id = 104 THEN CONVERT(VARCHAR(MAX),CONVERT (BIT,CONVERT(BINARY(1), hex_Value)%2)) -- BIT + WHEN system_type_id =62 THEN RTRIM(LTRIM(STR(CONVERT(FLOAT,SIGN(CAST(CONVERT(VARBINARY(8000),Reverse(hex_Value)) AS BIGINT)) * (1.0 + (CAST(CONVERT(VARBINARY(8000),Reverse(hex_Value)) AS BIGINT) & 0x000FFFFFFFFFFFFF) * POWER(CAST(2 AS FLOAT), -52)) * POWER(CAST(2 AS FLOAT),((CAST(CONVERT(VARBINARY(8000),Reverse(hex_Value)) AS BIGINT) & 0x7ff0000000000000) / EXP(52 * LOG(2))-1023))),53,LEN(hex_Value)))) --- FLOAT + When system_type_id =59 THEN Left(LTRIM(STR(CAST(SIGN(CAST(Convert(VARBINARY(8000),REVERSE(hex_Value)) AS BIGINT))* (1.0 + (CAST(CONVERT(VARBINARY(8000),Reverse(hex_Value)) AS BIGINT) & 0x007FFFFF) * POWER(CAST(2 AS Real), -23)) * POWER(CAST(2 AS Real),(((CAST(CONVERT(VARBINARY(8000),Reverse(hex_Value)) AS INT) )& 0x7f800000)/ EXP(23 * LOG(2))-127))AS REAL),23,23)),8) --Real + WHEN system_type_id In (165,173) THEN (CASE WHEN CHARINDEX(0x,cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'VARBINARY(8000)')) = 0 THEN '0x' ELSE '' END) +cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'varchar(max)') -- BINARY,VARBINARY + WHEN system_type_id =34 THEN (CASE WHEN CHARINDEX(0x,cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'VARBINARY(8000)')) = 0 THEN '0x' ELSE '' END) +cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'varchar(max)') --IMAGE + WHEN system_type_id =36 THEN CONVERT(VARCHAR(MAX),CONVERT(UNIQUEIDENTIFIER,hex_Value)) --UNIQUEIDENTIFIER + WHEN system_type_id =231 THEN CONVERT(VARCHAR(MAX),CONVERT(sysname,hex_Value)) --SYSNAME + WHEN system_type_id =241 THEN CONVERT(VARCHAR(MAX),CONVERT(xml,hex_Value)) --XML + + WHEN system_type_id =189 THEN (CASE WHEN CHARINDEX(0x,cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'VARBINARY(8000)')) = 0 THEN '0x' ELSE '' END) +cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'varchar(max)') --TIMESTAMP + WHEN system_type_id=98 THEN (CASE + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=56 THEN CONVERT(VARCHAR(MAX), CONVERT(INT, CONVERT(BINARY(4), REVERSE(Substring(hex_Value,3,Len(hex_Value)))))) -- INTEGER + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=108 THEN CONVERT(VARCHAR(MAX),CONVERT(numeric(38,20),CONVERT(VARBINARY(1),Substring(hex_Value,3,1)) +CONVERT(VARBINARY(1),Substring(hex_Value,4,1))+CONVERT(VARBINARY(1),0) + Substring(hex_Value,5,Len(hex_Value)))) --- NUMERIC + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=167 THEN LTRIM(RTRIM(CONVERT(VARCHAR(max),Substring(hex_Value,9,Len(hex_Value))))) --VARCHAR,CHAR + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=36 THEN CONVERT(VARCHAR(MAX),CONVERT(UNIQUEIDENTIFIER,Substring((hex_Value),3,20))) --UNIQUEIDENTIFIER + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=61 THEN CONVERT(VARCHAR(MAX),CONVERT(DATETIME,CONVERT(VARBINARY(8000),REVERSE (Substring(hex_Value,3,LEN(hex_Value)) ))),100) --DATETIME + WHEN CONVERT(INT,SUBSTRING(hex_Value,1,1))=165 THEN '0x'+ SUBSTRING((CASE WHEN CHARINDEX(0x,cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'VARBINARY(8000)')) = 0 THEN '0x' ELSE '' END) +cast('' AS XML).value('xs:hexBinary(sql:column("hex_Value"))', 'varchar(max)'),11,LEN(hex_Value)) -- BINARY,VARBINARY + END) + +END AS FieldValue +,[Rowlogcontents] +,[Row ID] +FROM @ColumnNameAndData ORDER BY nullbit + +--Create the column name in the same order to do pivot table. + +DECLARE @FieldName VARCHAR(max) +SET @FieldName = STUFF( +( + SELECT ',' + CAST(QUOTENAME([Name]) AS VARCHAR(MAX)) FROM syscolumns WHERE id=object_id('' + @SchemaName_n_TableName + '') + FOR XML PATH('')), 1, 1, '') + +--Finally did pivot table and get the data back in the same format. + +SET @sql = 'SELECT ' + @FieldName + ' FROM #temp_Data PIVOT (Min([FieldValue]) FOR FieldName IN (' + @FieldName + ')) AS pvt' +EXEC sp_executesql @sql + +GO +--Execute the procedure like +--Recover_Deleted_Data_Proc 'Database Name','Schema.table name' +--EXAMPLE #1 : FOR ALL DELETED RECORDS +EXEC Recover_Deleted_Data_Proc 'test','dbo.Test_table' +GO +--EXAMPLE #2 : FOR ANY SPECIFIC DATE RANGE +EXEC Recover_Deleted_Data_Proc 'test','dbo.Test_Table' ,'2011/12/01','2012/01/30' +--It will give you the result of all deleted records. \ No newline at end of file From a1e129e12ad7063b843d6f62e75b6574fa3982d1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 22 Aug 2020 13:22:05 +0300 Subject: [PATCH 057/553] Add new useful info --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 416c2951..619ba6f7 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Youtube Pragmatic Works Video](https://www.youtube.com/user/PragmaticWorks) (by Devin Knight and Manuel Quintana) - [TechEd SQL Server Videos](https://channel9.msdn.com/Search?term=sql%20server&lang-en=true) - [Build 2018 conference](http://sqlservercode.blogspot.ru/2018/05/azure-sql-data-warehouse-azure-sql.html) + - [New Stars of Data SQL Server Video](https://www.youtube.com/playlist?list=PLLq_tkpMFDU5ibrnqn6I8CZxZ2-zYWG9m) - Free Database Podcasts - [SQL Server Radio](http://www.sqlserverradio.com/) (by Guy Glantser and Matan Yungman) - [SQL Data Partners](http://sqldatapartners.com/podcast/) (by Carlos L Chacon, César Oviedo and Adrian Miranda) @@ -277,12 +278,13 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [VK.com #sqlcom](https://vk.com/sqlcom) (more than 3600 People, Russian) - [SQL Server User Group Meetings](https://www.mssqltips.com/sql-server-user-groups/) - [Russian SQL Server User Group](https://www.facebook.com/groups/144858492215825/) (900 People, Russian) - - [SQLcom.ru telegram chat](https://t.me/sqlcom) (1110 People, Russian) + - [SQLcom.ru telegram chat](https://t.me/sqlcom) (1900 People, Russian) - [PowerBI telegram chat](https://t.me/PBI_Rus) (295 People, Russian) - [PostgesSQL telegram chat](https://t.me/pgsql) (2823 People, Russian) - [DBA telegram chat](https://t.me/dba_ru) (1389 People, Russian) - [SQLTeam SQL Server Forum](https://forums.sqlteam.com/) - [Red Gate SQL Server Forum](https://forum.red-gate.com/) + - [Microsoft SQL Server on Q&A](https://docs.microsoft.com/en-us/answers/products/sql-server) - SQL Server Conferences - [SQL Saturdays](https://sqlsaturday.com/) - [Pass Sumit](https://www.pass.org/AttendanEvent/Conferences/PASSSummit.aspx) @@ -431,6 +433,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Hermitage: Testing transaction isolation levels in relation databases](https://github.com/ept/hermitage) (by Martin Kleppmann) - [csv to INSERT online converter - translates your tab-delimited data into a T-SQL INSERT statement](https://table.strd.co/) (by Structured Concepts AB) - [SQL Server Diagrams](http://www.e-squillace.com/techdiagrams-sqlserver/) (by George Squillace) + - [New Stars of Data 2020 Presentations](https://github.com/SQLGrillen/NSOD-1) (by SQLGrillen) **[⬆ back to top](#table-of-contents)** From ea423114d68a4e6c53d86554c2dbc1d46aac580b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 23 Aug 2020 15:00:20 +0300 Subject: [PATCH 058/553] Update trace flag 9114 info, add new articles --- Articles/README.md | 6 ++++++ SQL Server Trace Flag.md | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 2b21e7c0..cd2d7d26 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1188,6 +1188,9 @@ Articles types: | [Transaction Modes in SQL Server] | Kevin Feasel | 2020-08-10 | [DBA][DEV] | | [Working Effectively with Legacy SQL] | Kevin Feasel | 2015-03-15 | [DBA][DEV] | | [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | +| [dbatools multithreading commands with PoshRSJob module] | Kin | 2019-01-04 | [DBA][PS] | +| [SQL Server Debugging with WinDbg – an Introduction] | Klaus Aschenbrenner | 2014-05-05 | [DBA][DEV] | +| [Looking deeper into SQL Server using Minidumps] | Thomas Kejser | 2009-09-11 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2350,3 +2353,6 @@ Articles types: [Transaction Modes in SQL Server]:https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/ [Working Effectively with Legacy SQL]:https://www.catallaxyservices.com/presentations/legacy-sql/ [A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ +[dbatools multithreading commands with PoshRSJob module]:https://dbatools.io/multithread/ +[SQL Server Debugging with WinDbg – an Introduction]:https://www.sqlpassion.at/archive/2014/05/05/sql-server-debugging-with-windbg-an-introduction/ +[Looking deeper into SQL Server using Minidumps]:https://docs.microsoft.com/en-gb/archive/blogs/sqlcat/looking-deeper-into-sql-server-using-minidumps diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 0e20aca0..11cf14c6 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -4575,9 +4575,11 @@ Link: https://support.microsoft.com/kb/2483090 #### Trace Flag: 9114 **Undocumented trace flag**
-Function: Implemented a (SELECT 1) = 1 predicate as a join instead of optimizing it away.
+Function: Prevents the optimizer rewriting the apply as a join.
Link: [New Undocumented Trace Flags]
-Scope: ? +Link: https://dba.stackexchange.com/a/274195/107045
+Scope: global or session or query
+Versions: 2008-2019 From ecb6c8b43912f79c9bcdb9f60c3e5c913e49f0b9 Mon Sep 17 00:00:00 2001 From: Lizard Labs Date: Mon, 24 Aug 2020 10:02:48 +0200 Subject: [PATCH 059/553] Update SSMS_Addins.md --- SSMS/SSMS_Addins.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 8a60250d..c936441e 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -39,6 +39,7 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [Michel Max - SSMS Tools](#michel-max) | [Michel Max - SSMS Tools] | 2018-11-16 | 2012-2018 | Michel Max | Yes | No | | [SSMS Schema Folders](#ssms-schema-folders) | [SSMS Schema Folders] | 2018-10-06 | 2012-2018 | Nicholas Ross | Yes | No | | [Statistics Reporter](#statistics-reporter) | [Statistics Reporter] | 2019-04-17 | 2014-2018 | Analytics Bar | Yes | No | +| [SSMS Lizard](#ssms-lizard) | [SSMS Lizard] | 2020-06-15 | 2018-2018 | Lizard Labs Software | Yes | No | @@ -638,6 +639,22 @@ Price: No Statistics Reporter SSMS Extension is a SQL Server Management Studio Add-in for parsing SET STATISTICS IO, TIME ON into a beautiful report. + +## SSMS Lizard +Download page: [SSMS Lizard]
+Release date: 2020-06-15
+Support Version: 2018-2018
+Developer: Lizard Labs Software
+Free version: Yes
+Price: No + +SSMS Lizard extends SQL Server Management Studio with a number of new features not previously seen on its user interfaces: + +- Show query results in advanced data grid (sorting, grouping, searching, filtering, tabs, conditional formatting, formula fields, column chooser, bookmarks, split view, etc...) +- Extend SQL quires with in-line Visual Basic (VB.Net) code. +- Print or export data to Excel, Word, PDF, HTML, TSV, CSV, RTF or TXT documents. +- Quickly attach the query results to an e-mail, FTP or even Google Drive with a single click of a button; and more. + [SSMSBoost]:http://www.ssmsboost.com/ [SqlSmash]:http://www.sqlsmash.com/ @@ -681,3 +698,4 @@ Statistics Reporter SSMS Extension is a SQL Server Management Studio Add-in for [SQL_Search Download]:https://download.red-gate.com/SQL_Search.exe [Apex SQL Search Download]:https://www.apexsql.com/zips/ApexSQLSearch.exe [DbForge Search Download]:https://www.devart.com/dbforge/sql/search/searchsql22std.exe +[SSMS Lizard]:https://www.lizard-labs.com/sql_server_management_studio_ssms_extesnsion_lizard.aspx From 4f2f8f89dbf4a33a982cb3bbad0304f7780a5563 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 25 Aug 2020 06:35:57 +0300 Subject: [PATCH 060/553] Add new awesome articles --- Articles/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index cd2d7d26..ab1bf480 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -148,7 +148,6 @@ Articles types: | [Measuring Query Duration: SSMS vs SQL Sentry Plan Explorer] | Kendra Little | 2016-09-27 | | | [Inside the Statistics Histogram & Density Vector] | Klaus Aschenbrenner | 2014-01-28 | | | [Misconceptions on parameter sniffing] | Hugo Kornelis | 2016-11-03 | | -| [CAST vs. CONVERT] | Aaron Bertrand | 2016-11-02 | | | [What Every Accidental DBA Needs to Know Now: Basics of SQL Security] | Tim Ford | 2016-10-03 | [SEC] | | [SQL Server Perfmon (Performance Monitor) Best Practices] | Brent Ozar | 2006-12-30 | | | [Top 5 Overlooked Index Features] | Erik Darling | 2016-11-10 | [IDX] | @@ -1191,6 +1190,11 @@ Articles types: | [dbatools multithreading commands with PoshRSJob module] | Kin | 2019-01-04 | [DBA][PS] | | [SQL Server Debugging with WinDbg – an Introduction] | Klaus Aschenbrenner | 2014-05-05 | [DBA][DEV] | | [Looking deeper into SQL Server using Minidumps] | Thomas Kejser | 2009-09-11 | [DBA][DEV] | +| [Anatomy of a spool operators in SQL Server execution plans] | Hugo Kornelis | 2020-01-01 | [DBA][DEV] | +| [CAST v/s CONVERT – Is there a difference as far as SQL Server is concerned? Which is better?] | Nakul Vachhrajani | 2011-07-18 | [DBA][DEV] | +| [#BackToBasics: CAST vs. CONVERT] | Aaron Bertrand | 2016-11-02 | [DBA][DEV] | +| [Productivity Hacks: Migrate in Minutes to the Most Current Version of SQL Server] | Chris Lumnah | 2020-07-29 | [DBA] | +| [Database alias in Microsoft SQL Server] | Bohumír Kubík | 2011-01-11 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -1312,7 +1316,6 @@ Articles types: [Measuring Query Duration: SSMS vs SQL Sentry Plan Explorer]:https://www.littlekendra.com/2016/09/27/measuring-query-duration-ssms-vs-sql-sentry-plan-explorer/ [Inside the Statistics Histogram & Density Vector]:http://www.sqlpassion.at/archive/2014/01/28/inside-the-statistics-histogram-density-vector/ [Misconceptions on parameter sniffing]:https://sqlserverfast.com/blog/hugo/2016/11/misconceptions-on-parameter-sniffing/ -[CAST vs. CONVERT]:https://blogs.sentryone.com/aaronbertrand/backtobasics-cast-vs-convert/ [What Every Accidental DBA Needs to Know Now: Basics of SQL Security]:http://sqlmag.com/database-security/what-every-accidental-dba-needs-know-now-basics-sql-security [SQL Server Perfmon (Performance Monitor) Best Practices]:https://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/ [Top 5 Overlooked Index Features]:https://www.brentozar.com/archive/2016/11/top-5-overlooked-index-features/ @@ -2356,3 +2359,8 @@ Articles types: [dbatools multithreading commands with PoshRSJob module]:https://dbatools.io/multithread/ [SQL Server Debugging with WinDbg – an Introduction]:https://www.sqlpassion.at/archive/2014/05/05/sql-server-debugging-with-windbg-an-introduction/ [Looking deeper into SQL Server using Minidumps]:https://docs.microsoft.com/en-gb/archive/blogs/sqlcat/looking-deeper-into-sql-server-using-minidumps +[Anatomy of a spool operators in SQL Server execution plans]:https://sqlserverfast.com/articles/anatomy-of-a-spool/ +[CAST v/s CONVERT – Is there a difference as far as SQL Server is concerned? Which is better?]:https://nakulvachhrajani.com/2011/07/18/cast-vs-convert-is-there-a-difference-as-far-as-sql-server-is-concerned-which-is-better/ +[#BackToBasics: CAST vs. CONVERT]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-cast-vs-convert +[Productivity Hacks: Migrate in Minutes to the Most Current Version of SQL Server]:https://www.rubrik.com/blog/migrate-quickly-current-version-sql-server/ +[Database alias in Microsoft SQL Server]:http://www.baud.cz/blog/database-alias-in-microsoft-sql-server From 3da28b14d3e352be9fdbb0dbb9b8214845ca3b45 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 26 Aug 2020 12:16:28 +0300 Subject: [PATCH 061/553] Add new awesome articles --- Articles/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ab1bf480..9b371683 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1195,6 +1195,15 @@ Articles types: | [#BackToBasics: CAST vs. CONVERT] | Aaron Bertrand | 2016-11-02 | [DBA][DEV] | | [Productivity Hacks: Migrate in Minutes to the Most Current Version of SQL Server] | Chris Lumnah | 2020-07-29 | [DBA] | | [Database alias in Microsoft SQL Server] | Bohumír Kubík | 2011-01-11 | [DBA][DEV] | +| [The Curious Case of… the 8060-byte row size limit] | Paul Randal | 2020-03-11 | [DBA][DEV] | +| [.NET TransactionScope Considered Annoying - Default Isolation Level is Serializable] | Josh Darnell | 2020-07-27 | [DBA][DEV] | +| [Parameter Sniffing, Embedding, and the RECOMPILE Options] | Paul White | 2013-08-28 | [DBA][DEV] | +| [Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)] | Kendra Little | 2020-05-06 | [DBA][DEV] | +| [Yet Another Post About Local Variables] | Erik Darlling | 2020-03-31 | [DBA][DEV] | +| [Cleaning up Backups from Azure Blob Storage] | Niko Neugebauer | 2020-03-30 | [AZ][B] | +| [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | +| [SQL Server Temporary Object Caching] | Paul White | 2017-05-02 | [DBA][DEV] | +| [Dynamic Data Unmasking] | Joe Obbish | 2017-08-24 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2364,3 +2373,12 @@ Articles types: [#BackToBasics: CAST vs. CONVERT]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-cast-vs-convert [Productivity Hacks: Migrate in Minutes to the Most Current Version of SQL Server]:https://www.rubrik.com/blog/migrate-quickly-current-version-sql-server/ [Database alias in Microsoft SQL Server]:http://www.baud.cz/blog/database-alias-in-microsoft-sql-server +[The Curious Case of… the 8060-byte row size limit]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-8060-byte-row-size-limit/ +[.NET TransactionScope Considered Annoying - Default Isolation Level is Serializable]:https://joshthecoder.com/2020/07/27/transactionscope-considered-annoying.html +[Parameter Sniffing, Embedding, and the RECOMPILE Options]:https://sqlperformance.com/2013/08/t-sql-queries/parameter-sniffing-embedding-and-the-recompile-options +[Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)]:https://www.brentozar.com/archive/2014/06/tuning-stored-procedures-local-variables-problems/ +[Yet Another Post About Local Variables]:https://www.erikdarlingdata.com/sql-server/yet-another-post-about-local-variables/ +[Cleaning up Backups from Azure Blob Storage]:http://www.nikoport.com/2020/03/30/cleaning-up-backups-from-azure-blob-storage/ +[Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html +[SQL Server Temporary Object Caching]:https://sqlperformance.com/2017/05/sql-performance/sql-server-temporary-object-caching +[Dynamic Data Unmasking]:https://www.erikdarlingdata.com/sql-server/dynamic-data-unmasking/ From 1fbc627f8d80d014664113fc21eb5053efaf630f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 27 Aug 2020 19:39:07 +0300 Subject: [PATCH 062/553] Add SQL Server Function Recommendations Update using asterisk tip --- ... Convention and T-SQL Programming Style.md | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 2dae904e..b0d1fbc9 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -190,6 +190,28 @@ More details about SQL Server data types and mapping it with another databases a **[⬆ back to top](#table-of-contents)** +## SQL Server Function Recommendations + +This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. + +| Recommended function | Not Recommended | Why | More details | +|----------------------|-----------------|---------------------------------------------------------------------------------------------|--------------| +| [`<>`][12] | [`!=`][12] | `<>` is `ANSI`, `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CAST`][10] | [`CONVERT`][10] | `CAST` is `ANSI` | [14],[15] | +| [`COALCESE`] | [`ISNULL`] | `COALCESE` is `ANSI` and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | + +[12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql +[13]:https://dba.stackexchange.com/a/155670/107045 +[14]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-cast-vs-convert +[15]:https://nakulvachhrajani.com/2011/07/18/cast-vs-convert-is-there-a-difference-as-far-as-sql-server-is-concerned-which-is-better/ +[`COALCESE`]:https://docs.microsoft.com/sql/t-sql/language-elements/coalesce-transact-sql +[`ISNULL`]:https://docs.microsoft.com/sql/t-sql/functions/isnull-transact-sql +[16]:https://www.mssqltips.com/sqlservertip/2689/deciding-between-coalesce-and-isnull-in-sql-server/ +[17]:https://nocolumnname.blog/2017/10/09/a-subtle-difference-between-coalesce-and-isnull/ + +**[⬆ back to top](#table-of-contents)** + + ## T-SQL Programming Style SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. @@ -214,8 +236,26 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query), [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - Delimiters: **spaces** (not tabs) - - Avoid using asterisk in select statements `SELECT *`, use explicit column names. - More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-asterisk-select-list). + - Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names. + Only one exception, see it below. + More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-asterisk-select-list), + [here](https://sqlblog.org/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list), + [here](https://dba.stackexchange.com/q/253873/107045). + - Use asterisk (`*`) only in an archiving situation, where rows are being moved to another table that must have the same structure. + ``sql + INSERT INTO SalesOrderArchive /* Note no column list */ + SELECT * + FROM SalesOrder + WHERE OrderDate < @OneYearAgo; + + DELETE FROM SalesOrder + WHERE OrderDate < @OneYearAgo; + ``` + If a new column is added to `SalesOrder` table in the future, but not to `SalesOrderArchive`, the `INSERT` will fail. + Which sounds bad, but it's actually a really good thing! Because the alternative is much worse. + If all the columns were listed on the `INSERT` and the `SELECT`, then the `INSERT` would succeed, and so would the following DELETE (which is effectively `DELETE *`). + Production code that succeeds doesn't get any attention, and it may be a long time before someone notices that the new column is not being archived, but being silently deleted altogether. + More details [here](https://dba.stackexchange.com/a/253917/107045). - No square brackets `[]` and [reserved words](https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Check_Reserved_Words_For_Object_Names.sql) in object names and alias, use only Latin symbols **`[A-z]`** and numeric **`[0-9]`**. - Prefer [ANSI syntax](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) and functions ([`CAST`][10] instead [`CONVERT`][10], [`COALESE`](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql) instead [`ISNULL`](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), etc.). - All finished expressions should have semicolon `;` at the end. From c9ffff1737ca2a49d1f84ba63a212abbce67d79d Mon Sep 17 00:00:00 2001 From: Sergio Govoni Date: Thu, 27 Aug 2020 23:09:52 +0200 Subject: [PATCH 063/553] Add object name convention for Statistics Add my proposal for object name convention for SQL Server Statistics Add "_" in VIX prefix --- SQL Server Name Convention and T-SQL Programming Style.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 2dae904e..bdfd748a 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -43,13 +43,14 @@ Reasons for using a naming convention (as opposed to allowing programmers to cho | [Table Primary Key] | PK | PascalCase | 128 | No | `PK_` | No | Yes | [A-z][0-9] | `PK_MyTableID` | | [Table Unique (Alternative) Key] | UQ | PascalCase | 128 | No | `AK_` | No | Yes | [A-z][0-9] | `AK_MyTable_MyColumn_AnotherColumn` | | [Table Foreign Key] | F | PascalCase | 128 | No | `FK_` | No | Yes | [A-z][0-9] | `FK_MyTable_ForeignTableID` | -| [Table Clustered Index] | | PascalCase | 128 | No | `IXC` | No | Yes | [A-z][0-9] | `IXC_MyTable_MyColumn_AnotherColumn` | +| [Table Clustered Index] | | PascalCase | 128 | No | `IXC_` | No | Yes | [A-z][0-9] | `IXC_MyTable_MyColumn_AnotherColumn` | | [Table Non Clustered Index] | | PascalCase | 128 | No | `IX_` | No | Yes | [A-z][0-9] | `IX_MyTable_MyColumn_AnotherColumn` | | [DDL Trigger] | TR | PascalCase | 128 | No | `TR_` | `_DDL` | Yes | [A-z][0-9] | `TR_LogicalName_DDL` | | [DML Trigger] | TR | PascalCase | 128 | No | `TR_` | `_DML` | Yes | [A-z][0-9] | `TR_MyTable_LogicalName_DML` | | [Logon Trigger] | TR | PascalCase | 128 | No | `TR_` | `_LOG` | Yes | [A-z][0-9] | `TR_LogicalName_LOG` | | [View] | V | PascalCase | 128 | No | `VI_` | No | No | [A-z][0-9] | `VI_LogicalName` | -| [Indexed View] | V | PascalCase | 128 | No | `VIX_` | No | No | [A-z][0-9] | `VIx_LogicalName` | +| [Indexed View] | V | PascalCase | 128 | No | `VIX_` | No | No | [A-z][0-9] | `VIX_LogicalName` | +| [Statistic] | | PascalCase | 128 | No | `ST_` | No | No | [A-z][0-9] | `ST_MyTable_MyColumn_AnotherColumn` | | [Stored Procedure] | P | PascalCase | 128 | No | `usp_` | No | No | [A-z][0-9] | `usp_LogicalName` | | [Scalar User-Defined Function] | FN | PascalCase | 128 | No | `udf_` | No | No | [A-z][0-9] | `udf_FunctionLogicalName` | | [Table-Valued Function] | FN | PascalCase | 128 | No | `tvf_` | No | No | [A-z][0-9] | `tvf_FunctionLogicalName` | @@ -89,6 +90,7 @@ Reasons for using a naming convention (as opposed to allowing programmers to cho [Logon Trigger]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql [View]:https://docs.microsoft.com/en-us/sql/relational-databases/views/views [Indexed View]:https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views +[Statistic]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-statistics-transact-sql [Stored Procedure]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql [Scalar User-Defined Function]:https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/create-user-defined-functions-database-engine#Scalar [Table-Valued Function]:https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/create-user-defined-functions-database-engine#TVF From 89afe35e3601b4c5f6121ac2895ad614ddb3710b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 28 Aug 2020 16:54:32 +0300 Subject: [PATCH 064/553] Add new useful info --- README.md | 4 +++- SQL Server Name Convention and T-SQL Programming Style.md | 6 ++++-- SQL Server Trace Flag.md | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 619ba6f7..8572db17 100644 --- a/README.md +++ b/README.md @@ -380,7 +380,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL-Server-Multi-Thread - a framework to do multi-threading in T-SQL using SQL Server Agent jobs.](https://github.com/jobbish-sql/SQL-Server-Multi-Thread) (by ) - [SQL Server and Azure SQL Labs and Workshops](https://microsoft.github.io/sqlworkshops/) (by Microsoft) - [MsSqlDependencyBrowser - Simple tool to browse between dependent objects on MS SQL Server](https://github.com/usharik/MsSqlDependencyBrowser) (by Aleksej Usharovskij) - - [Projects-MS-SQL-Server-DBA - Utilities and Scripts for SQL Server dba](https://github.com/jobgemws/Projects-MS-SQL-Server-DBA) (by Evgeniy Gribkov) + - [`Projects-MS-SQL-Server-DBA` - Utilities and Scripts for SQL Server dba](https://github.com/jobgemws/Projects-MS-SQL-Server-DBA) (by Evgeniy Gribkov) + - [`sp_alter_column` stored procedure is able to alter a column with dependencies](https://github.com/segovoni/sp_alter_column) (by Sergio Govoni) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) @@ -581,6 +582,7 @@ SQL Server: - [Snowflake for SQL Server Users Part 1 – Core Concepts](https://sqldownunder.blob.core.windows.net/public/SnowflakeForSQLServerUsers_Part_1_CoreConcepts%20-%20for%20SDU%20Insiders.pdf) (by Dr Greg Low) - [The Fundamental Guide To Sql Query Optimization](https://www.quest.com/whitepapert/the-fundamental-guide-to-sql-query-optimization8143740/) (by Janis Griffin) - [An Expert Guide To Sql Server Performance Tuning](https://www.quest.com/whitepaper/an-expert-guide-to-sql-server-performance-tuning8143874/) (by Brent Ozar, Pinal Dave, Janis Griffin) + - [Microsoft® SQL Server® Notes for Professionals book](https://books.goalkicker.com/MicrosoftSQLServerBook/) (by GoalKicker Books) R: - [BookDown - Write HTML, PDF, ePub, and Kindle books with R Markdown](https://bookdown.org) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index b0d1fbc9..2a1bcbee 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -237,10 +237,12 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - Delimiters: **spaces** (not tabs) - Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names. - Only one exception, see it below. + Main problems are: traffic issues, Memory Grants issues, Index usage issues. + **Only one exception, see it below.** More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-asterisk-select-list), [here](https://sqlblog.org/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list), - [here](https://dba.stackexchange.com/q/253873/107045). + [here](https://dba.stackexchange.com/q/253873/107045), + [here](https://www.erikdarlingdata.com/sql-server/all-the-problems-with-select/). - Use asterisk (`*`) only in an archiving situation, where rows are being moved to another table that must have the same structure. ``sql INSERT INTO SalesOrderArchive /* Note no column list */ diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 11cf14c6..a2cc6158 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1747,7 +1747,7 @@ If trace flag 2389 is set, and a leading statistics column is marked as ascendin Link:
Link: http://blogs.msdn.com/b/ianjo/archive/2006/04/24/582227.aspx
Link: http://www.sqlmag.com/article/tsql3/making-the-most-of-automatic-statistics-updating--96767
-Link: http://sqlperformance.com/2016/07/sql-statistics/trace-flag-2389-new-cardinality-estimator
+Link: https://sqlperformance.com/2016/07/sql-statistics/trace-flag-2389-new-cardinality-estimator
Link: https://www.sswug.org/sswugresearch/community/trace-flag-2389-and-the-new-cardinality-estimator/
Link: [New Features in SQL Server 2016 Service Pack 1]
Link: [Docs Trace Flags]
@@ -1844,7 +1844,7 @@ Scope: global only #### Trace Flag: 2453 Function: Allow a table variable to trigger recompile when enough number of rows are changed with may allow the query optimizer to choose a more efficient plan.
**Note: Please ensure that you thoroughly test this option, before rolling it into a production environment.**
-Link: http://sqlperformance.com/2014/06/t-sql-queries/table-variable-perf-fix
+Link: https://sqlperformance.com/2014/06/t-sql-queries/table-variable-perf-fix
Link: https://support.microsoft.com/kb/2952444
Link: [Docs Trace Flags]
Link: https://www.brentozar.com/archive/2017/02/using-trace-flag-2453-improve-table-variable-performance
@@ -3553,7 +3553,7 @@ This behavior improves the overall concurrency of the update statistics job run ** TF 7471 can increase the possibility of deadlock especially when creation of new statistics and updating of existing statistics are executed simultaneously. So the recommended best practice is to use TF 7471 only as a part of maintenance when update statistics jobs are run in parallel and should be turned off otherwise.** Link: https://support.microsoft.com/kb/3156157
-Link: http://sqlperformance.com/2016/05/sql-performance/parallel-rebuilds
+Link: https://sqlperformance.com/2016/05/sql-performance/parallel-rebuilds
Link: [KB2964518]
Link: https://blogs.msdn.microsoft.com/sql_server_team/boosting-update-statistics-performance-with-sql-2014-sp1cu6/
Scope: global only From 77e19150c8efc457d4986b67313703f35d9f10e8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 29 Aug 2020 14:59:44 +0300 Subject: [PATCH 065/553] Add new awesome articles --- Articles/README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 9b371683..4726fd9e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -883,7 +883,7 @@ Articles types: | [#TSQL2sday: How Much Plan Cache History Do You Have?] | Brent Ozar | 2018-07-10 | [DBA][DEV] | | [Fixing SQL Server Management Studio’s Tab Text] | Brent Ozar | 2011-06-07 | [DBA][DEV] | | [An overview of the SQL table variable] | Rajendra Gupta | 2019-10-16 | [DBA][DEV] | -| [Performance Impact of Small Queries] | Forrest | 2019-06-15 | [DBA][DEV] | +| [Performance Impact of Small Queries] | Forrest McDaniel | 2019-06-15 | [DBA][DEV] | | [How we use SQL Server as a Document Store] | Paul Stovell | 2019-03-24 | [DBA][DEV] | | [Overlooked T-SQL Gems] | Itzik Ben-Gan | 2019-10-09 | [DBA][DEV] | | [Are SQL Server database triggers evil?] | Daniel Calbimonte | 2017-01-25 | [DBA][DEV] | @@ -976,7 +976,7 @@ Articles types: | [Going Serverless with Azure SQL Database] | John Miner | 2019-12-20 | [DBA][DEV] | | [SQLskills SQL101: Why are Statistics so Important?] | Kimberly Tripp | 2020-01-20 | [DBA][DEV] | | [Configuring SQL Server Express edition as SQL witness server in Database Mirroring] | Nisarg Upadhyay | 2020-01-20 | [DBA] | -| [The Half Apply Query] | Forrest | 2020-01-20 | [DBA][DEV] | +| [The Half Apply Query] | Forrest McDaniel | 2020-01-20 | [DBA][DEV] | | [Import JSON data into SQL Server] | Rajendra Gupta | 2020-01-17 | [X] | | [Auditing in AWS RDS SQL Server] | Rajendra Gupta | 2020-01-20 | [DBA] | | [Types of SQL Server Indexes] | Ben Snaidero | 2019-12-24 | [IDX] | @@ -1204,6 +1204,12 @@ Articles types: | [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | | [SQL Server Temporary Object Caching] | Paul White | 2017-05-02 | [DBA][DEV] | | [Dynamic Data Unmasking] | Joe Obbish | 2017-08-24 | [DBA][DEV] | +| [3 Ways to Run DBCC CHECKDB Faster] | Brent Ozar | 2020-08-27 | [DBA][DEV] | +| [Back Up SQL Server 43%-67% Faster by Writing to Multiple Files.] | Brent Ozar | 2020-08-23 | [DBA][DEV] | +| [Bad Habits to Kick : Using SELECT * / omitting the column list] | Aaron Bertrand | 2009-10-10 | [DBA][DEV] | +| [All The Problems With Select *] | Erik Darlling | 2019-12-10 | [DBA][DEV] | +| [When Select * Doesn’t Matter] | Erik Darlling | 2019-11-18 | [DBA][DEV] | +| [HT Waits – Explained and Animated] | Forrest McDaniel | 2020-08-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2382,3 +2388,9 @@ Articles types: [Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html [SQL Server Temporary Object Caching]:https://sqlperformance.com/2017/05/sql-performance/sql-server-temporary-object-caching [Dynamic Data Unmasking]:https://www.erikdarlingdata.com/sql-server/dynamic-data-unmasking/ +[3 Ways to Run DBCC CHECKDB Faster]:https://www.brentozar.com/archive/2020/08/3-ways-to-run-dbcc-checkdb-faster/ +[Back Up SQL Server 43%-67% Faster by Writing to Multiple Files]:https://www.brentozar.com/archive/2020/08/back-up-sql-server-43-67-faster-by-writing-to-multiple-files/ +[Bad Habits to Kick : Using SELECT * / omitting the column list]:https://sqlblog.org/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list +[All The Problems With Select *]:https://www.erikdarlingdata.com/sql-server/all-the-problems-with-select/ +[When Select * Doesn’t Matter]:https://www.erikdarlingdata.com/sql-server/when-select-doesnt-matter/ +[HT Waits – Explained and Animated]:https://forrestmcdaniel.com/2020/08/12/ht-waits-explained-and-animated/ From 3526ccc86aa4649a474c6751280b20462aabe335 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 30 Aug 2020 15:00:39 +0300 Subject: [PATCH 066/553] Update Name Convention naviagation --- ... Convention and T-SQL Programming Style.md | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 1db27012..e2fbb386 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -1,4 +1,5 @@ # SQL Server Name Convention and T-SQL Programming Style + > There are only two hard things in Computer Science: cache invalidation and naming things > -- [Phil Karlton](https://www.karlton.org/2017/12/naming-things-hard/) @@ -11,8 +12,10 @@ Reasons for using a naming convention (as opposed to allowing programmers to cho ## Table of Contents + - [SQL Server Object Name Convention](#sql-server-object-name-convention) - [SQL Server Data Types Recommendation](#data-types-recommendation) +- [SQL Server Function Recommendations](#function-recommendation) - [T-SQL Programming T-SQL Style](#t-sql-programming-style) - [General T-SQL programming style](#general-t-sql-programming-style) - [Stored procedures and functions programming style](#programming-style) @@ -20,8 +23,8 @@ Reasons for using a naming convention (as opposed to allowing programmers to cho - [Reference and useful links](#reference) -## SQL Server Object Name Convention +## SQL Server Object Name Convention | Object | Code | Notation | Length | Plural | Prefix | Suffix | Abbreviation | Char Mask | Example | |------------------------------------------|------| ---------- |-------:|--------|---------|--------|--------------|--------------|--------------------------------------| @@ -108,8 +111,9 @@ Reasons for using a naming convention (as opposed to allowing programmers to cho **[⬆ back to top](#table-of-contents)** -## SQL Server Data Types Recommendation +## SQL Server Data Types Recommendation + More details about SQL Server data types and mapping it with another databases and program languages you can find [here](https://github.com/ktaranov/sqlserver-kit/blob/master/SQL%20Server%20Data%20Types.md) | General Type | Type | ANSI | Recommended | What use instead | Why use or not | @@ -192,8 +196,9 @@ More details about SQL Server data types and mapping it with another databases a **[⬆ back to top](#table-of-contents)** -## SQL Server Function Recommendations +## SQL Server Function Recommendations + This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. | Recommended function | Not Recommended | Why | More details | @@ -214,13 +219,13 @@ This is only recommendations! But it is consistent for choosing only 1 function **[⬆ back to top](#table-of-contents)** -## T-SQL Programming Style +## T-SQL Programming Style SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. -### General programming T-SQL style +### General programming T-SQL style - For database objects names in code use only schema plus object name, do not hardcode server and database names in your code: ``` @@ -497,8 +502,8 @@ ORDER BY t2.Value2; **[⬆ back to top](#table-of-contents)** -### Stored procedures and functions programming style +### Stored procedures and functions programming style Recommendations from Microsoft: [Stored procedure Best practice][11] @@ -590,8 +595,9 @@ GO **[⬆ back to top](#table-of-contents)** -### Dynamic T-SQL Recommendation +### Dynamic T-SQL Recommendation + **Highly recommended to read awesome detailed article about dynamic T-SQL by Erland Sommarskog: [The Curse and Blessings of Dynamic SQL](http://sommarskog.se/dynamic_sql.html)** Dynamic SQL is a programming technique that allows you to construct SQL statements dynamically at runtime. @@ -696,9 +702,12 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure IF @debug = 1 SELECT @tsql AS "tsql" ELSE EXEC sp_executesql @tsql; ``` +**[⬆ back to top](#table-of-contents)** + -## Official Reference and useful links +## Official Reference and useful links + - [Transact-SQL Formatting Standards](https://www.simple-talk.com/sql/t-sql-programming/transact-sql-formatting-standards-%28coding-styles%29/) (by Robert Sheldon) - [Subjectivity: Naming Standards](http://blogs.sqlsentry.com/aaronbertrand/subjectivity-naming-standards/) (by Aaron Bertrand) - [General Database Conventions](http://kejser.org/database-naming-conventions/general-database-conventions/) (by Thomas Kejser) From a2ccc2fdb6137e14742e7a52bebea2e60d5c1170 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 31 Aug 2020 15:09:38 +0300 Subject: [PATCH 067/553] Add AppExecutionTimeout XE --- Extended_Events/AppExecutionTimeout.sql | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Extended_Events/AppExecutionTimeout.sql diff --git a/Extended_Events/AppExecutionTimeout.sql b/Extended_Events/AppExecutionTimeout.sql new file mode 100644 index 00000000..2117eb4d --- /dev/null +++ b/Extended_Events/AppExecutionTimeout.sql @@ -0,0 +1,34 @@ +/* +Original link: http://blog.sqlgrease.com/how-to-detect-query-timeout-errors-with-extended-events/ +Author: Franklin Yamamoto + +SELECT + object_name + , convert(xml, event_data) AS event_data + , file_name + , file_offset +FROM sys.fn_xe_file_target_read_file(N'AppExecutionTimeout*.xel',NULL,NULL,NULL); +GO +*/ + +/* Stop trace if started */ +IF EXISTS (SELECT * FROM sys.dm_xe_sessions WHERE name = 'AppExecutionTimeout') + ALTER EVENT SESSION AppExecutionTimeout ON SERVER STATE = STOP; + +/* Delete trace if exists */ +IF EXISTS (SELECT * FROM sys.server_event_sessions WHERE name = 'AppExecutionTimeout') + DROP EVENT SESSION AppExecutionTimeout ON SERVER; + +/* Create trace */ +CREATE EVENT SESSION AppExecutionTimeout ON SERVER +ADD EVENT sqlserver.attention +(ACTION (sqlserver.session_id, sqlserver.database_id, sqlserver.database_name, +sqlserver.username, sqlserver.sql_text, sqlserver.client_hostname, +sqlserver.client_app_name) +WHERE ([package0].[equal_boolean]([sqlserver].[is_system],(0)))) +ADD TARGET package0.event_file(SET filename=N'AppExecutionTimeout.xel', +max_file_size=(5),max_rollover_files=(2)); +GO + +ALTER EVENT SESSION AppExecutionTimeout ON SERVER STATE = START; +GO From ad9d7d560d6806c36703be0ccacbae8322135b73 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 1 Sep 2020 15:10:22 +0300 Subject: [PATCH 068/553] Update Cloud Diagnostic Information Queries to 2020-09 --- ...atabase Diagnostic Information Queries.sql | 28 +++++++++++-------- ...nstance Diagnostic Information Queries.sql | 16 +++++++---- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Scripts/Azure SQL Database Diagnostic Information Queries.sql b/Scripts/Azure SQL Database Diagnostic Information Queries.sql index 47db653a..ea1cbee6 100644 --- a/Scripts/Azure SQL Database Diagnostic Information Queries.sql +++ b/Scripts/Azure SQL Database Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- Azure SQL Database Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- If you like PowerShell, there is a very useful community solution for running these queries in an automated fashion @@ -89,14 +90,19 @@ ORDER BY avg_io_stall_ms DESC OPTION (RECOMPILE); -- Get I/O utilization by database (Query 5) (IO Usage By Database) WITH Aggregate_IO_Statistics -AS -(SELECT DB_NAME(database_id) AS [Database Name], -CAST(SUM(num_of_bytes_read + num_of_bytes_written)/1048576 AS DECIMAL(12, 2)) AS io_in_mb -FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS [DM_IO_STATS] -GROUP BY database_id) -SELECT ROW_NUMBER() OVER(ORDER BY io_in_mb DESC) AS [I/O Rank], [Database Name], - CAST(io_in_mb/ SUM(io_in_mb) OVER() * 100.0 AS DECIMAL(5,2)) AS [I/O Percent], - io_in_mb AS [Total I/O (MB)] +AS (SELECT DB_NAME(database_id) AS [Database Name], + CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], + CAST(SUM(num_of_bytes_read ) / 1048576 AS DECIMAL(12, 2)) AS [ioReadMB], + CAST(SUM(num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioWriteMB] + FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS [DM_IO_STATS] + GROUP BY database_id) +SELECT ROW_NUMBER() OVER (ORDER BY ioTotalMB DESC) AS [I/O Rank], + [Database Name], ioTotalMB AS [Total I/O (MB)], + CAST(ioTotalMB / SUM(ioTotalMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Total I/O %], + ioReadMB AS [Read I/O (MB)], + CAST(ioReadMB / SUM(ioReadMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Read I/O %], + ioWriteMB AS [Write I/O (MB)], + CAST(ioWriteMB / SUM(ioWriteMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Write I/O %] FROM Aggregate_IO_Statistics ORDER BY [I/O Rank] OPTION (RECOMPILE); ------ diff --git a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql index 6db0503c..d922c0e0 100644 --- a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql +++ b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Managed Instance Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- If you like PowerShell, there is a very useful community solution for running these queries in an automated fashion @@ -1300,7 +1301,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 53) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1312,12 +1313,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ From 2a2dad471a359eca65ad897e3870b1c449c54e0c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 1 Sep 2020 15:11:02 +0300 Subject: [PATCH 069/553] Update Supported versions Diagnostic Information Queries to 2020-09 --- ...er 2014 Diagnostic Information Queries.sql | 197 +++++++++------- ...016 SP1 Diagnostic Information Queries.sql | 211 ++++++++++------- ...016 SP2 Diagnostic Information Queries.sql | 194 +++++++++------- ...er 2017 Diagnostic Information Queries.sql | 219 ++++++++++-------- ...er 2019 Diagnostic Information Queries.sql | 121 ++++++---- 5 files changed, 550 insertions(+), 392 deletions(-) diff --git a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql index faa7f755..7b1254ee 100644 --- a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2014 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server! @@ -250,10 +251,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Database Instant File Initialization'; -- Database Instant File Initialization -- https://bit.ly/2nTX74y --- Misconceptions around instant file initialization --- https://bit.ly/2oBSKgZ - - -- SQL Server Process Address space info (Query 7) (Process Memory) -- (shows whether locked pages is enabled, among other things) @@ -296,11 +293,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -401,8 +403,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -457,7 +459,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 17) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 17) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -502,15 +504,6 @@ FROM sys.dm_os_sys_info WITH (NOLOCK) OPTION (RECOMPILE); -- sys.dm_os_sys_info (Transact-SQL) -- https://bit.ly/2pczOYs --- Soft NUMA configuration was a new column for SQL Server 2016 --- OFF = Soft-NUMA feature is OFF --- ON = SQL Server automatically determines the NUMA node sizes for Soft-NUMA --- MANUAL = Manually configured soft-NUMA - --- Configure SQL Server to Use Soft-NUMA (SQL Server) --- https://bit.ly/2HTpKJt - - -- Get System Manufacturer and model number from SQL Server Error log (Query 19) (System Manufacturer) EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; @@ -522,16 +515,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 20) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - --- Get BIOS date from Windows Registry (Query 21) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 20) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -539,7 +523,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 22) (Processor Description) +-- Get processor description from Windows Registry (Query 21) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -556,7 +540,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 23) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -570,7 +554,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 24) (Suspect Pages) +-- Look at Suspect Pages table (Query 23) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -593,7 +577,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 25) (Tempdb Data Files) +-- Get number of data files in tempdb database (Query 24) (Tempdb Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -603,7 +587,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This will be blank unless you have Service Pack 2 or later --- File names and paths for all user and system databases on instance (Query 26) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -623,7 +607,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Volume info for all LUNS that have database files on the current instance (Query 27) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -643,8 +627,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 28) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 27) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -688,7 +671,7 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- database files on each drive since SQL Server was last started --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 29) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -709,7 +692,7 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- database file since SQL Server was last started --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 30) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -745,7 +728,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 31) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -761,7 +744,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 32) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -799,10 +782,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); --- Missing Indexes for all databases by Index Advantage (Query 33) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -827,7 +809,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); --- Get VLF Counts for all databases on the instance (Query 34) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) -- (adapted from Michelle Ufford) CREATE TABLE #VLFInfo (RecoveryUnitID int, FileID int, FileSize bigint, StartOffset bigint, @@ -867,7 +849,8 @@ DROP TABLE #VLFCountResults; --- Get CPU utilization by database (Query 35) (CPU Usage by Database) + +-- Get CPU utilization by database (Query 34) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -888,7 +871,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 36) (IO Usage By Database) +-- Get I/O utilization by database (Query 35) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -912,7 +895,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 37) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -934,7 +917,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1006,7 +989,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1024,7 +1007,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1045,7 +1028,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 41) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 40) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1074,7 +1057,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1099,7 +1082,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1112,7 +1095,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1127,7 +1110,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1143,7 +1126,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1154,7 +1137,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1176,7 +1159,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1197,7 +1180,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1211,7 +1194,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1225,7 +1208,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1234,7 +1217,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1255,7 +1238,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 49) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1274,7 +1257,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- Make sure the transaction log is not full!! --- Log space usage for current database (Query 51) (Log Space Usage) +-- Log space usage for current database (Query 50) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1289,8 +1272,11 @@ OPTION (RECOMPILE); -- Look at log file size and usage, along with the log reuse wait description for the current database +-- sys.dm_db_log_space_usage (Transact-SQL) +-- https://bit.ly/2H4MQw9 + --- I/O Statistics by file for the current database (Query 52) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 51) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1313,7 +1299,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 53) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 52) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1321,7 +1307,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1332,15 +1318,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 54 through 59 are the "Bad Man List" for stored procedures +-- Queries 53 through 59 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 55) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 53) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1355,15 +1341,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 56) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 54) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1381,12 +1368,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 57) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 55) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1403,12 +1390,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 58) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 56) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1425,11 +1412,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 59) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 57) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1447,13 +1434,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 60) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 58) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1471,7 +1458,32 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure --- Lists the top statements by average input/output usage for the current database (Query 61) (Top IO Statements) + +-- Cached SPs Missing Indexes by Execution Count (Query 59) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + +-- Lists the top statements by average input/output usage for the current database (Query 60) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], SUBSTRING(qt.[text],qs.statement_start_offset/2, @@ -1490,7 +1502,7 @@ ORDER BY [Avg IO] DESC OPTION (RECOMPILE); --- Possible Bad NC Indexes (writes > reads) (Query 62) (Bad NC Indexes) +-- Possible Bad NC Indexes (writes > reads) (Query 61) (Bad NC Indexes) SELECT SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(s.[object_id]) AS [Table Name], i.name AS [Index Name], i.index_id, @@ -1516,7 +1528,7 @@ ORDER BY [Difference] DESC, [Total Writes] DESC, [Total Reads] ASC OPTION (RECOM -- Investigate further before dropping an index! --- Missing Indexes for current database by Index Advantage (Query 63) (Missing Indexes) +-- Missing Indexes for current database by Index Advantage (Query 62) (Missing Indexes) SELECT DISTINCT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], migs.last_user_seek, mid.[statement] AS [Database.Schema.Table], mid.equality_columns, mid.inequality_columns, mid.included_columns, @@ -1540,8 +1552,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Hkan Winther has given me some great suggestions for this query - --- Find missing index warnings for cached plans in the current database (Query 64) (Missing Index Warnings) +-- Find missing index warnings for cached plans in the current database (Query 63) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan @@ -1558,7 +1569,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 64) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1570,12 +1581,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1656,6 +1672,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); + -- Look at most frequently modified indexes and statistics (Query 68) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, diff --git a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql index 4e46c138..167f5047 100644 --- a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2016 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -92,6 +93,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5598.27 SP2 CU11 12/9/2019 -- 13.0.5698.0 SP2 CU12 2/25/2020 -- 13.0.5820.21 SP2 CU13 5/28/2020 +-- 13.0.5830.85 SP2 CU14 8/6/2020 -- How to determine the version, edition and update level of SQL Server and its components -- https://bit.ly/2oAjKgW @@ -194,6 +196,10 @@ ORDER BY name OPTION (RECOMPILE); -- priority boost (should be zero) -- remote admin connections (should be 1) + +-- sys.configurations (Transact-SQL) +-- https://bit.ly/2HsyDZI + -- New configuration options for SQL Server 2016 -- allow polybase export (Allow INSERT into a Hadoop external table) -- automatic soft-NUMA disabled (Automatic soft-NUMA is enabled by default) @@ -271,7 +277,7 @@ FROM sys.dm_os_process_memory WITH (NOLOCK) OPTION (RECOMPILE); -- SQL Server Services information (Query 7) (SQL Server Services Info) SELECT servicename, process_id, startup_type_desc, status_desc, last_startup_time, service_account, is_clustered, cluster_nodename, [filename], -instant_file_initialization_enabled -- New in SQL Server 2016 SP1 +instant_file_initialization_enabled FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -288,11 +294,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -332,7 +343,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -395,8 +405,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -451,7 +461,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -524,17 +534,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -542,7 +542,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -559,7 +559,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -573,7 +573,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -596,7 +596,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -605,7 +605,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -625,7 +625,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 25) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -645,8 +645,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 26) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -690,7 +689,7 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- database files on each drive since SQL Server was last started --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 27) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -711,7 +710,7 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- database file since SQL Server was last started --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 28) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -747,7 +746,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 29) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -763,7 +762,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 30) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -773,7 +772,7 @@ db.[compatibility_level] AS [DB Compatibility Level], db.is_mixed_page_allocation_on, db.page_verify_option_desc AS [Page Verify Option], db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_async_on, db.is_parameterization_forced, db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, -db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.is_encrypted, +db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, db.is_query_store_on, db.is_sync_with_backup, @@ -814,10 +813,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 31) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -842,7 +840,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); --- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 32) (VLF Counts) -- (adapted from Michelle Ufford) CREATE TABLE #VLFInfo (RecoveryUnitID int, FileID int, FileSize bigint, StartOffset bigint, @@ -883,7 +881,7 @@ DROP TABLE #VLFCountResults; --- Get CPU utilization by database (Query 34) (CPU Usage by Database) +-- Get CPU utilization by database (Query 33) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -904,7 +902,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 35) (IO Usage By Database) +-- Get I/O utilization by database (Query 34) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -928,7 +926,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 35) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -950,7 +948,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 36) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1033,7 +1031,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 37) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1051,7 +1049,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 38) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1072,7 +1070,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 40) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 39) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1101,7 +1099,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 40) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1126,7 +1124,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 41) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1139,7 +1137,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1154,7 +1152,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 42) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1170,7 +1168,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 43) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1181,7 +1179,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 44) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1201,9 +1199,12 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); -- CACHESTORE_OBJCP Object Plans -- These are compiled plans for stored procedures, functions and triggers +-- sys.dm_os_memory_clerks (Transact-SQL) +-- https://bit.ly/2H31xDR --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) + +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 45) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1224,7 +1225,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 46) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1238,7 +1239,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1252,7 +1253,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 47) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1261,7 +1262,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1274,12 +1275,12 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 49) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 48) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, total_elapsed_time/execution_count AS [avg_elapsed_time], - last_elapsed_time, last_execution_time, cached_time + last_elapsed_time, last_execution_time, cached_time, [type_desc] FROM sys.dm_exec_function_stats WITH (NOLOCK) ORDER BY total_worker_time DESC OPTION (RECOMPILE); ------ @@ -1290,14 +1291,13 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- Showplan Enhancements for UDFs -- https://bit.ly/2LVqiQ1 - -- Database specific queries ***************************************************************** -- **** Please switch to a user database that you are interested in! ***** --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 49) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1322,7 +1322,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 51) (Log Space Usage) +-- Log space usage for current database (Query 50) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1337,9 +1337,11 @@ OPTION (RECOMPILE); -- Look at log file size and usage, along with the log reuse wait description for the current database +-- sys.dm_db_log_space_usage (Transact-SQL) +-- https://bit.ly/2H4MQw9 --- Get database scoped configuration values for current database (Query 52) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 51) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1353,7 +1355,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 53) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 52) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1376,7 +1378,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 54) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 53) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1384,7 +1386,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1395,15 +1397,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 55 through 60 are the "Bad Man List" for stored procedures +-- Queries 54 through 60 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 55) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 54) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1418,15 +1420,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 56) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 55) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1444,12 +1447,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 57) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 56) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1466,12 +1469,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 58) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 57) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1488,11 +1491,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 59) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 58) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1510,13 +1513,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 60) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 59) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1534,6 +1537,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 60) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 61) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1620,7 +1648,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 65) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1632,12 +1660,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1686,7 +1719,7 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); -- Gives you some good information about your tables -- is_memory_optimized and durability_desc were new in SQL Server 2014 --- temporal_type_desc, is_remote_data_archive_enabled, is_external are new in SQL Server 2016 +-- temporal_type_desc, is_remote_data_archive_enabled, is_external were new in SQL Server 2016 -- sys.tables (Transact-SQL) -- https://bit.ly/2Gk7998 @@ -1723,6 +1756,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); + -- Look at most frequently modified indexes and statistics (Query 69) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, @@ -1817,6 +1851,7 @@ ORDER BY OBJECT_NAME(i.[object_id]) OPTION (RECOMPILE); -- https://bit.ly/2GCP8lF + -- Look at Columnstore index physical statistics (Query 74) (Columnstore Index Physical Stat) SELECT OBJECT_NAME(ps.object_id) AS [TableName], i.[name] AS [IndexName], ps.index_id, ps.partition_number, @@ -1835,6 +1870,7 @@ ORDER BY ps.object_id, ps.partition_number, ps.row_group_id OPTION (RECOMPILE); -- https://bit.ly/2q276XQ + -- Get lock waits for current database (Query 75) (Lock Waits) SELECT o.name AS [table_name], i.name AS [index_name], ios.index_id, ios.partition_number, SUM(ios.row_lock_wait_count) AS [total_row_lock_waits], @@ -1876,7 +1912,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- https://bit.ly/2q1Q6BM --- Get Query Store Options for this database (Query 77) (QueryStore Options) +-- Get QueryStore Options for this database (Query 77) (QueryStore Options) SELECT actual_state_desc, desired_state_desc, [interval_length_minutes], current_storage_size_mb, [max_storage_size_mb], query_capture_mode_desc, size_based_cleanup_mode_desc @@ -1886,6 +1922,9 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- New for SQL Server 2016 -- Requires that Query Store is enabled for this database +-- Make sure that the actual_state_desc is the same as desired_state_desc +-- Make sure that the current_storage_size_mb is less than the max_storage_size_mb + -- Tuning Workload Performance with Query Store -- https://bit.ly/1kHSl7w @@ -1893,13 +1932,14 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- Get input buffer information for the current database (Query 78) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], -es.login_time, es.cpu_time, es.logical_reads, -es.[status], ib.event_info AS [Input Buffer] + es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, + es.[status], ib.event_info AS [Input Buffer] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) CROSS APPLY sys.dm_exec_input_buffer(es.session_id, NULL) AS ib WHERE es.database_id = DB_ID() AND es.session_id > 50 AND es.session_id <> @@SPID OPTION (RECOMPILE); +------ -- Gives you input buffer information from all non-system sessions for the current database -- Replaces DBCC INPUTBUFFER @@ -1907,6 +1947,9 @@ AND es.session_id <> @@SPID OPTION (RECOMPILE); -- New DMF for retrieving input buffer in SQL Server -- https://bit.ly/2uHKMbz +-- sys.dm_exec_input_buffer (Transact-SQL) +-- https://bit.ly/2J5Hf9q + -- Look at recent Full backups for the current database (Query 79) (Recent Full Backups) diff --git a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql index b6e0f83e..427e7b09 100644 --- a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2016 SP2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -76,6 +77,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5622.0 SP2 CU11 + Security Update 2/11/2010 https://support.microsoft.com/en-us/help/4535706/description-of-the-security-update-for-sql-server-2016-sp2-cu11-februa -- 13.0.5698.0 SP2 CU12 2/25/2020 https://support.microsoft.com/en-us/help/4536648/cumulative-update-12-for-sql-server-2016-sp2 -- 13.0.5820.21 SP2 CU13 5/38/2020 https://support.microsoft.com/en-us/help/4549825/cumulative-update-13-for-sql-server-2016-sp2 +-- 13.0.5830.85 SP2 CU14 8/6/2020 https://support.microsoft.com/en-us/help/4564903/cumulative-update-14-for-sql-server-2016-sp2 @@ -265,11 +267,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -309,7 +316,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -366,14 +372,14 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- Gives you some useful information about the composition and relative load on your NUMA nodes -- You want to see an equal number of schedulers on each NUMA node --- Watch out if SQL Server 2017 Standard Edition has been installed +-- Watch out if SQL Server 2016 Standard Edition has been installed -- on a physical or virtual machine with more than four sockets or more than 24 physical cores -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -428,7 +434,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -499,17 +505,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -517,7 +513,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -534,7 +530,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -548,7 +544,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -571,7 +567,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -580,7 +576,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -601,7 +597,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); --- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 25) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -621,8 +617,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 26) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -666,7 +661,7 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- database files on each drive since SQL Server was last started --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 27) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -687,7 +682,7 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- database file since SQL Server was last started --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 28) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -723,8 +718,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 - --- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 29) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -740,7 +734,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 30) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -791,10 +785,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 31) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -819,7 +812,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); --- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 32) (VLF Counts) SELECT [name] AS [Database Name], [VLF Count] FROM sys.databases AS db WITH (NOLOCK) CROSS APPLY (SELECT file_id, COUNT(*) AS [VLF Count] @@ -840,7 +833,7 @@ ORDER BY [VLF Count] DESC OPTION (RECOMPILE); --- Get CPU utilization by database (Query 34) (CPU Usage by Database) +-- Get CPU utilization by database (Query 33) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -861,7 +854,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 35) (IO Usage By Database) +-- Get I/O utilization by database (Query 34) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -885,7 +878,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 35) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -904,7 +897,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- is being used by each database on the instance --- Get tempdb version store space usage by database (Query 37) (Version Store Space Usage) +-- Get tempdb version store space usage by database (Query 36) (Version Store Space Usage) SELECT DB_NAME(database_id) AS [Database Name], reserved_page_count AS [Version Store Reserved Page Count], reserved_space_kb/1024 AS [Version Store Reserved Space (MB)] @@ -921,7 +914,7 @@ ORDER BY reserved_space_kb/1024 DESC OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1004,7 +997,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1022,7 +1015,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1043,7 +1036,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 41) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 40) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1072,7 +1065,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1097,7 +1090,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1110,7 +1103,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1125,7 +1118,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1141,7 +1134,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1152,7 +1145,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1177,7 +1170,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1198,7 +1191,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1212,7 +1205,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1226,7 +1219,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1235,7 +1228,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1248,7 +1241,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 50) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 49) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, @@ -1261,7 +1254,8 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- sys.dm_exec_function_stats (Transact-SQL) -- https://bit.ly/2q1Q6BM - +-- Showplan Enhancements for UDFs +-- https://bit.ly/2LVqiQ1 -- Database specific queries ***************************************************************** @@ -1269,7 +1263,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 51) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1288,13 +1282,13 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- Look at how large and how full the files are and where they are located -- Make sure the transaction log is not full!! --- is_autogrow_all_files was new for SQL Server 2016. Equivalent to TF 1117 for user databases +-- is_autogrow_all_files is new for SQL Server 2016. Equivalent to TF 1117 for user databases -- SQL Server 2016: Changes in default behavior for autogrow and allocations for tempdb and user databases -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 52) (Log Space Usage) +-- Log space usage for current database (Query 51) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1313,7 +1307,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2H4MQw9 --- Status of last VLF for current database (Query 53) (Last VLF Status) +-- Status of last VLF for current database (Query 52) (Last VLF Status) SELECT TOP(1) DB_NAME(li.database_id) AS [Database Name], li.[file_id], li.vlf_size_mb, li.vlf_sequence_number, li.vlf_active, li.vlf_status FROM sys.dm_db_log_info(DB_ID()) AS li @@ -1332,7 +1326,7 @@ ORDER BY vlf_sequence_number DESC OPTION (RECOMPILE); --- Get database scoped configuration values for current database (Query 54) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 53) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1346,7 +1340,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 55) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 54) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1369,7 +1363,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 56) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 55) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1377,7 +1371,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1388,15 +1382,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 57 through 62 are the "Bad Man List" for stored procedures +-- Queries 56 through 62 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 56) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1411,15 +1405,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 58) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 57) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1437,12 +1432,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 59) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 58) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1459,12 +1454,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 60) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 59) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1481,11 +1476,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 61) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 60) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1503,13 +1498,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 62) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 61) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1527,6 +1522,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 62) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 63) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1613,7 +1633,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 67) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1625,12 +1645,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1882,13 +1907,14 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- New for SQL Server 2016 -- Requires that Query Store is enabled for this database +-- Make sure that the actual_state_desc is the same as desired_state_desc +-- Make sure that the current_storage_size_mb is less than the max_storage_size_mb + -- Tuning Workload Performance with Query Store -- https://bit.ly/1kHSl7w - - -- Get input buffer information for the current database (Query 80) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, diff --git a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql index dd3b2de7..73010911 100644 --- a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2017 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 2, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -86,7 +87,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 14.0.3238.1 CU17 10/8/2019 https://support.microsoft.com/en-us/help/4515579/cumulative-update-17-for-sql-server-2017 -- 14.0.3257.3 CU18 12/9/2019 https://support.microsoft.com/en-us/help/4527377/cumulative-update-18-for-sql-server-2017 -- 14.0.3281.6 CU19 2/5/2020 https://support.microsoft.com/en-us/help/4535007/cumulative-update-19-for-sql-server-2017 --- 14.0.3294.2 CU20 4/7/2020 https://support.microsoft.com/en-us/help/4541283/cumulative-update-20-for-sql-server-2017 +-- 14.0.3294.2 CU20 4/7/2020 https://support.microsoft.com/en-us/help/4541283/cumulative-update-20-for-sql-server-2017 +-- 14.0.3335.7 CU21 7/1/2020 https://support.microsoft.com/en-us/help/4557397/cumulative-update-21-for-sql-server-2017 -- How to determine the version, edition and update level of SQL Server and its components @@ -164,8 +166,8 @@ SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], -SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], -- New for SQL Server 2016 -SERVERPROPERTY('IsAdvancedAnalyticsInstalled') AS [IsRServicesInstalled]; -- New for SQL Server 2016 +SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], +SERVERPROPERTY('IsAdvancedAnalyticsInstalled') AS [IsRServicesInstalled]; ------ -- This gives you a lot of useful information about your instance of SQL Server, @@ -284,11 +286,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -321,7 +328,7 @@ ORDER BY sj.name OPTION (RECOMPILE); -- MSDN sysjobs documentation -- https://bit.ly/2paDEOP --- SQL Server Maintenance Solution +-- SQL Server Maintenance Solution (Ola Hallengren) -- https://bit.ly/1pgchQu -- You can use this script to add default schedules to the standard Ola Hallengren Maintenance Solution jobs @@ -387,8 +394,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -443,7 +450,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -514,18 +521,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 --- Does not work on Linux - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -534,7 +530,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Does not work on Linux --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -552,7 +548,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -566,7 +562,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -589,7 +585,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -598,7 +594,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -618,17 +614,21 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Drive information for all fixed drives visible to the operating system (Query 26) (Fixed Drives) +-- Drive information for all fixed drives visible to the operating system (Query 25) (Fixed Drives) SELECT fixed_drive_path, drive_type_desc, CONVERT(DECIMAL(18,2), free_space_in_bytes/1073741824.0) AS [Available Space (GB)] FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); ------ --- This shows all of your fixed drives, not just LUNs with SQL Server database files +-- This shows all of your drives, not just LUNs with SQL Server database files +-- New in SQL Server 2017 +-- sys.dm_os_enumerate_fixed_drives (Transact-SQL) +-- https://bit.ly/2EZoHLj --- Volume info for all LUNS that have database files on the current instance (Query 27) (Volume Info) + +-- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -648,8 +648,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 28) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 27) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -693,7 +692,7 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- database files on each drive since SQL Server was last started --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 29) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -714,7 +713,7 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- database file since SQL Server was last started --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 30) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -750,7 +749,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 31) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -766,7 +765,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 32) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -817,12 +816,11 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 33) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], -COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], +COUNT(1) OVER(PARTITION BY mid.[statement], mid.equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, CONVERT(decimal(18,2), migs.avg_total_user_cost) AS [avg_total_user_cost], migs.avg_user_impact FROM sys.dm_db_missing_index_group_stats AS migs WITH (NOLOCK) @@ -845,7 +843,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); --- Get VLF Counts for all databases on the instance (Query 34) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) SELECT [name] AS [Database Name], [VLF Count] FROM sys.databases AS db WITH (NOLOCK) CROSS APPLY (SELECT file_id, COUNT(*) AS [VLF Count] @@ -866,7 +864,7 @@ ORDER BY [VLF Count] DESC OPTION (RECOMPILE); --- Get CPU utilization by database (Query 35) (CPU Usage by Database) +-- Get CPU utilization by database (Query 34) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -887,7 +885,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 36) (IO Usage By Database) +-- Get I/O utilization by database (Query 35) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -911,7 +909,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 37) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -930,7 +928,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- is being used by each database on the instance --- Get tempdb version store space usage by database (Query 38) (Version Store Space Usage) +-- Get tempdb version store space usage by database (Query 37) (Version Store Space Usage) SELECT DB_NAME(database_id) AS [Database Name], reserved_page_count AS [Version Store Reserved Page Count], reserved_space_kb/1024 AS [Version Store Reserved Space (MB)] @@ -947,7 +945,7 @@ ORDER BY reserved_space_kb/1024 DESC OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 39) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1030,7 +1028,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 40) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1048,7 +1046,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 41) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1069,7 +1067,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 42) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 41) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1098,22 +1096,22 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 43) (CPU Utilization History) -DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +DECLARE @ts_now bigint = (SELECT ms_ticks FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], SystemIdle AS [System Idle Process], 100 - SystemIdle - SQLProcessUtilization AS [Other Process CPU Utilization], DATEADD(ms, -1 * (@ts_now - [timestamp]), GETDATE()) AS [Event Time] FROM (SELECT record.value('(./Record/@id)[1]', 'int') AS record_id, - record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') - AS [SystemIdle], - record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') - AS [SQLProcessUtilization], [timestamp] - FROM (SELECT [timestamp], CONVERT(xml, record) AS [record] - FROM sys.dm_os_ring_buffers WITH (NOLOCK) - WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' - AND record LIKE N'%%') AS x) AS y + record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') + AS [SystemIdle], + record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') + AS [SQLProcessUtilization], [timestamp] + FROM (SELECT [timestamp], CONVERT(xml, record) AS [record] + FROM sys.dm_os_ring_buffers WITH (NOLOCK) + WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' + AND record LIKE N'%%') AS x) AS y ORDER BY record_id DESC OPTION (RECOMPILE); ------ @@ -1123,7 +1121,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 44) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1136,7 +1134,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1151,7 +1149,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 45) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1167,7 +1165,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 46) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1178,7 +1176,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 47) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1203,7 +1201,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 48) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1224,7 +1222,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 49) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1238,7 +1236,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1252,7 +1250,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 50) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1261,7 +1259,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1274,7 +1272,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 51) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 50) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, @@ -1297,7 +1295,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 52) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 51) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1322,7 +1320,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 53) (Log Space Usage) +-- Log space usage for current database (Query 52) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1341,7 +1339,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2H4MQw9 --- Status of last VLF for current database (Query 54) (Last VLF Status) +-- Status of last VLF for current database (Query 53) (Last VLF Status) SELECT TOP(1) DB_NAME(li.database_id) AS [Database Name], li.[file_id], li.vlf_size_mb, li.vlf_sequence_number, li.vlf_active, li.vlf_status FROM sys.dm_db_log_info(DB_ID()) AS li @@ -1360,7 +1358,7 @@ ORDER BY vlf_sequence_number DESC OPTION (RECOMPILE); --- Get database scoped configuration values for current database (Query 55) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 54) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1374,7 +1372,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 56) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 55) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1397,7 +1395,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 57) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 56) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1405,7 +1403,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1416,15 +1414,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 58 through 63 are the "Bad Man List" for stored procedures +-- Queries 57 through 63 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 58) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1439,15 +1437,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 59) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 58) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1465,12 +1464,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 60) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 59) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1487,15 +1486,15 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 61) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 60) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan FROM sys.procedures AS p WITH (NOLOCK) INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) ON p.[object_id] = qs.[object_id] @@ -1509,11 +1508,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 62) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 61) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1531,13 +1530,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 63) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 62) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1555,6 +1554,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 63) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 64) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1641,7 +1665,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 68) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1653,12 +1677,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ diff --git a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql index db5a0eb4..a9517eed 100644 --- a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2019 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 2, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -69,8 +70,10 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 15.0.4003.23 CU1 1/7/2020 https://support.microsoft.com/en-us/help/4527376/cumulative-update-1-for-sql-server-2019 -- 15.0.4013.40 CU2 2/13/2020 https://support.microsoft.com/en-us/help/4536075/cumulative-update-2-for-sql-server-2019 -- 15.0.4023.6 CU3 3/12/2020 https://support.microsoft.com/en-us/help/4538853/cumulative-update-3-for-sql-server-2019 --- 15.0.4033.1 CU4 3/31/2020 https://support.microsoft.com/en-us/help/4548597/cumulative-update-4-for-sql-server-2019 - +-- 15.0.4033.1 CU4 3/31/2020 https://support.microsoft.com/en-us/help/4548597/cumulative-update-4-for-sql-server-2019 +-- 15.0.4043.16 CU5 6/22/2020 https://support.microsoft.com/en-us/help/4552255/cumulative-update-5-for-sql-server-2019 +-- 15.0.4053.23 CU6 8/4/2020 https://support.microsoft.com/en-us/help/4563110/cumulative-update-6-for-sql-server-2019 +-- 15.0.4063.15 CU7 9/2/2020 https://support.microsoft.com/en-us/help/4570012/cumulative-update-7-for-sql-server-2019 @@ -221,6 +224,9 @@ FROM sys.dm_os_process_memory WITH (NOLOCK) OPTION (RECOMPILE); -- This indicates that you are not under internal memory pressure -- If locked_page_allocations_kb > 0, then LPIM is enabled +-- sys.dm_os_process_memory (Transact-SQL) +-- https://bit.ly/3iUgQgC + -- How to enable the "locked pages" feature in SQL Server 2012 -- https://bit.ly/2F5UjOA @@ -249,11 +255,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -293,7 +304,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -353,8 +363,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -481,7 +491,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started - -- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -581,7 +590,11 @@ CONVERT(DECIMAL(18,2), free_space_in_bytes/1073741824.0) AS [Available Space (GB FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); ------ --- This shows all of your fixed drives, not just LUNs with SQL Server database files +-- This shows all of your drives, not just LUNs with SQL Server database files +-- New in SQL Server 2017 + +-- sys.dm_os_enumerate_fixed_drives (Transact-SQL) +-- https://bit.ly/2EZoHLj @@ -706,7 +719,6 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 - -- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, @@ -1382,7 +1394,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- It also helps you find possible caching opportunities --- Queries 57 through 62 are the "Bad Man List" for stored procedures +-- Queries 57 through 63 are the "Bad Man List" for stored procedures -- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], @@ -1522,7 +1534,32 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure --- Lists the top statements by average input/output usage for the current database (Query 63) (Top IO Statements) + +-- Cached SPs Missing Indexes by Execution Count (Query 63) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + +-- Lists the top statements by average input/output usage for the current database (Query 64) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], SUBSTRING(qt.[text],qs.statement_start_offset/2, @@ -1541,7 +1578,7 @@ ORDER BY [Avg IO] DESC OPTION (RECOMPILE); --- Possible Bad NC Indexes (writes > reads) (Query 64) (Bad NC Indexes) +-- Possible Bad NC Indexes (writes > reads) (Query 65) (Bad NC Indexes) SELECT SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(s.[object_id]) AS [Table Name], i.name AS [Index Name], i.index_id, @@ -1567,7 +1604,7 @@ ORDER BY [Difference] DESC, [Total Writes] DESC, [Total Reads] ASC OPTION (RECOM -- Investigate further before dropping an index! --- Missing Indexes for current database by Index Advantage (Query 65) (Missing Indexes) +-- Missing Indexes for current database by Index Advantage (Query 66) (Missing Indexes) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], @@ -1595,7 +1632,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Hkan Winther has given me some great suggestions for this query --- Find missing index warnings for cached plans in the current database (Query 66) (Missing Index Warnings) +-- Find missing index warnings for cached plans in the current database (Query 67) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan @@ -1610,9 +1647,9 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- This can help you decide whether to add them or not --- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 67) (Buffer Usage) +-- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 68) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1624,12 +1661,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1637,7 +1679,7 @@ ORDER BY [BufferCount] DESC OPTION (RECOMPILE); -- It can help identify possible candidates for data compression --- Get Table names, row counts, and compression status for clustered index or heap (Query 68) (Table Sizes) +-- Get Table names, row counts, and compression status for clustered index or heap (Query 69) (Table Sizes) SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.object_id) AS [ObjectName], SUM(p.Rows) AS [RowCount], p.data_compression_desc AS [Compression Type] FROM sys.partitions AS p WITH (NOLOCK) @@ -1662,7 +1704,7 @@ ORDER BY SUM(p.Rows) DESC OPTION (RECOMPILE); --- Get some key table properties (Query 69) (Table Properties) +-- Get some key table properties (Query 70) (Table Properties) SELECT OBJECT_NAME(t.[object_id]) AS [ObjectName], p.[rows] AS [Table Rows], p.index_id, p.data_compression_desc AS [Index Data Compression], t.create_date, t.lock_on_bulk_load, t.is_replicated, t.has_replication_filter, @@ -1685,7 +1727,7 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); --- When were Statistics last updated on all indexes? (Query 70) (Statistics Update) +-- When were Statistics last updated on all indexes? (Query 71) (Statistics Update) SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.[NAME] AS [Object Name], o.[type_desc] AS [Object Type], i.[name] AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], s.auto_created, s.no_recompute, s.user_created, s.is_incremental, s.is_temporary, @@ -1716,7 +1758,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); --- Look at most frequently modified indexes and statistics (Query 71) (Volatile Indexes) +-- Look at most frequently modified indexes and statistics (Query 72) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, sp.modification_counter, sp.[rows], sp.rows_sampled, sp.last_updated @@ -1734,7 +1776,7 @@ ORDER BY sp.modification_counter DESC, o.name OPTION (RECOMPILE); --- Get fragmentation info for all indexes above a certain size in the current database (Query 72) (Index Fragmentation) +-- Get fragmentation info for all indexes above a certain size in the current database (Query 73) (Index Fragmentation) -- Note: This query could take some time on a very large database SELECT DB_NAME(ps.database_id) AS [Database Name], SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(ps.OBJECT_ID) AS [Object Name], i.[name] AS [Index Name], ps.index_id, @@ -1756,7 +1798,7 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); -- and how effective your index maintenance strategy is ---- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 73) (Overall Index Usage - Reads) +--- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 74) (Overall Index Usage - Reads) SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], @@ -1775,7 +1817,7 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - -- Show which indexes in the current database are most active for Reads ---- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 74) (Overall Index Usage - Writes) +--- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 75) (Overall Index Usage - Writes) SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, @@ -1792,7 +1834,7 @@ ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes -- Show which indexes in the current database are most active for Writes --- Get in-memory OLTP index usage (Query 75) (XTP Index Usage) +-- Get in-memory OLTP index usage (Query 76) (XTP Index Usage) SELECT OBJECT_NAME(i.[object_id]) AS [Object Name], i.index_id, i.[name] AS [Index Name], i.[type_desc], xis.scans_started, xis.scans_retries, xis.rows_touched, xis.rows_returned @@ -1811,7 +1853,7 @@ ORDER BY OBJECT_NAME(i.[object_id]) OPTION (RECOMPILE); --- Look at Columnstore index physical statistics (Query 76) (Columnstore Index Physical Stat) +-- Look at Columnstore index physical statistics (Query 77) (Columnstore Index Physical Stat) SELECT OBJECT_NAME(ps.object_id) AS [TableName], i.[name] AS [IndexName], ps.index_id, ps.partition_number, ps.delta_store_hobt_id, ps.state_desc, ps.total_rows, ps.size_in_bytes, @@ -1830,7 +1872,7 @@ ORDER BY ps.object_id, ps.partition_number, ps.row_group_id OPTION (RECOMPILE); --- Get lock waits for current database (Query 77) (Lock Waits) +-- Get lock waits for current database (Query 78) (Lock Waits) SELECT o.name AS [table_name], i.name AS [index_name], ios.index_id, ios.partition_number, SUM(ios.row_lock_wait_count) AS [total_row_lock_waits], SUM(ios.row_lock_wait_in_ms) AS [total_row_lock_wait_in_ms], @@ -1853,7 +1895,7 @@ ORDER BY total_lock_wait_in_ms DESC OPTION (RECOMPILE); --- Look at UDF execution statistics (Query 78) (UDF Statistics) +-- Look at UDF execution statistics (Query 79) (UDF Statistics) SELECT OBJECT_NAME(object_id) AS [Function Name], execution_count, total_worker_time, total_logical_reads, total_physical_reads, total_elapsed_time, total_elapsed_time/execution_count AS [avg_elapsed_time], @@ -1871,7 +1913,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- https://bit.ly/2q1Q6BM --- Determine which scalar UDFs are in-lineable (Query 79) (Inlineable UDFs) +-- Determine which scalar UDFs are in-lineable (Query 80) (Inlineable UDFs) SELECT OBJECT_NAME(m.object_id) AS [Function Name], is_inlineable, inline_type FROM sys.sql_modules AS m WITH (NOLOCK) LEFT OUTER JOIN sys.dm_exec_function_stats AS efs WITH (NOLOCK) @@ -1887,7 +1929,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2Qt216S --- Get QueryStore Options for this database (Query 80) (QueryStore Options) +-- Get QueryStore Options for this database (Query 81) (QueryStore Options) SELECT actual_state_desc, desired_state_desc, [interval_length_minutes], current_storage_size_mb, [max_storage_size_mb], query_capture_mode_desc, size_based_cleanup_mode_desc @@ -1905,7 +1947,7 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); --- Get input buffer information for the current database (Query 81) (Input Buffer) +-- Get input buffer information for the current database (Query 82) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, es.[status], ib.event_info AS [Input Buffer] @@ -1927,9 +1969,10 @@ AND es.session_id <> @@SPID OPTION (RECOMPILE); --- Get any resumable index rebuild operation information (Query 82) (Resumable Index Rebuild) +-- Get any resumable index rebuild operation information (Query 83) (Resumable Index Rebuild) SELECT OBJECT_NAME(iro.object_id) AS [Object Name], iro.index_id, iro.name AS [Index Name], - iro.sql_text, iro.last_max_dop_used, iro.partition_number, iro.state_desc, iro.start_time, iro.percent_complete + iro.sql_text, iro.last_max_dop_used, iro.partition_number, iro.state_desc, + iro.start_time, iro.percent_complete FROM sys.index_resumable_operations AS iro WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1938,7 +1981,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2pYSWqq --- Get database automatic tuning options (Query 83) (Automatic Tuning Options) +-- Get database automatic tuning options (Query 84) (Automatic Tuning Options) SELECT [name], desired_state_desc, actual_state_desc, reason_desc FROM sys.database_automatic_tuning_options WITH (NOLOCK) OPTION (RECOMPILE); @@ -1949,7 +1992,7 @@ OPTION (RECOMPILE); --- Look at recent Full backups for the current database (Query 84) (Recent Full Backups) +-- Look at recent Full backups for the current database (Query 85) (Recent Full Backups) SELECT TOP (30) bs.machine_name, bs.server_name, bs.database_name AS [Database Name], bs.recovery_model, CONVERT (BIGINT, bs.backup_size / 1048576 ) AS [Uncompressed Backup Size (MB)], CONVERT (BIGINT, bs.compressed_backup_size / 1048576 ) AS [Compressed Backup Size (MB)], From 77ed250ee26b9a6c05169b745336652483a56623 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 2 Sep 2020 15:11:36 +0300 Subject: [PATCH 070/553] Update non supported Diagnostic Information Queries to 2020-09 --- ...er 2005 Diagnostic Information Queries.sql | 29 +---- ...er 2008 Diagnostic Information Queries.sql | 7 +- ...2008 R2 Diagnostic Information Queries.sql | 16 ++- ...er 2012 Diagnostic Information Queries.sql | 115 +++++++++++------- 4 files changed, 90 insertions(+), 77 deletions(-) diff --git a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql index caab0703..a921ee2d 100644 --- a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2005 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -1149,28 +1150,6 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi diff --git a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql index 7b8e5ec4..e1c64fbb 100644 --- a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2008 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server diff --git a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql index fe4c973c..ab53596b 100644 --- a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2008 R2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -1144,7 +1145,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 54) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1156,12 +1157,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ diff --git a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql index d8a51652..25cccf3c 100644 --- a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql @@ -1,13 +1,14 @@ -- SQL Server 2012 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -160,7 +161,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'detected', N'socket'; -- New in SQL Server 2012 SP4 - -- Get selected server properties (Query 3) (Server Properties) SELECT SERVERPROPERTY('MachineName') AS [MachineName], SERVERPROPERTY('ServerName') AS [ServerName], @@ -261,15 +261,12 @@ EXEC sys.xp_readerrorlog 0, 1, N'Database Instant File Initialization'; -- Lets you determine whether Instant File Initialization (IFI) is enabled for the instance -- This should be enabled in the vast majority of cases +-- Note: This query won't return any results if the SQL Server error log has been recycled -- (Added in SQL Server 2012 SP4) -- Database Instant File Initialization -- https://bit.ly/2nTX74y --- Misconceptions around instant file initialization --- https://bit.ly/2oBSKgZ - - -- SQL Server Process Address space info (Query 7) (Process Memory) -- (shows whether locked pages is enabled, among other things) @@ -312,11 +309,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -363,7 +365,8 @@ FROM msdb.dbo.sysalerts WITH (NOLOCK) ORDER BY name OPTION (RECOMPILE); ------ --- Gives you some basic information about your SQL Server Agent Alerts (which are different from SQL Server Agent jobs) +-- Gives you some basic information about your SQL Server Agent Alerts +-- (which are different from SQL Server Agent jobs) -- Read more about Agent Alerts here: https://bit.ly/2v5YR37 @@ -416,8 +419,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -472,8 +475,29 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs +-- Good overview of AG health and status (Query 17) (AG Status) +SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], + drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, + drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, + drs.last_sent_time, drs.last_received_lsn, drs.last_received_time, drs.last_hardened_lsn, + drs.last_hardened_time, drs.last_redone_lsn, drs.last_redone_time, drs.log_send_queue_size, + drs.log_send_rate, drs.redo_queue_size, drs.redo_rate, drs.filestream_send_rate, + drs.end_of_log_lsn, drs.last_commit_lsn, drs.last_commit_time, drs.database_state_desc +FROM sys.dm_hadr_database_replica_states AS drs WITH (NOLOCK) +INNER JOIN sys.availability_databases_cluster AS adc WITH (NOLOCK) +ON drs.group_id = adc.group_id +AND drs.group_database_id = adc.group_database_id +INNER JOIN sys.availability_groups AS ag WITH (NOLOCK) +ON ag.group_id = drs.group_id +INNER JOIN sys.availability_replicas AS ar WITH (NOLOCK) +ON drs.group_id = ar.group_id +AND drs.replica_id = ar.replica_id +ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE); + +-- You will see no results if your instance is not using AlwaysOn AGs + --- Hardware information from SQL Server 2012 (Query 17) (Hardware Info) +-- Hardware information from SQL Server 2012 (Query 18) (Hardware Info) SELECT cpu_count AS [Logical CPU Count], scheduler_count, hyperthread_ratio AS [Hyperthread Ratio], cpu_count/hyperthread_ratio AS [Physical CPU Count], @@ -497,7 +521,7 @@ FROM sys.dm_os_sys_info WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2pczOYs --- Get System Manufacturer and model number from SQL Server Error log (Query 18) (System Manufacturer) +-- Get System Manufacturer and model number from SQL Server Error log (Query 19) (System Manufacturer) EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; ------ @@ -507,16 +531,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - -- Get BIOS date from Windows Registry (Query 20) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -541,6 +555,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste + -- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) @@ -629,7 +644,6 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); -- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -782,8 +796,7 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -840,6 +853,8 @@ DROP TABLE #VLFCountResults; -- and they can make full database restores and crash recovery take much longer -- Try to keep your VLF counts under 200 in most cases (depending on log file size) +-- SQL Server Transaction Log Architecture and Management Guide +-- https://bit.ly/2JjmQRZ -- Get CPU utilization by database (Query 34) (CPU Usage by Database) @@ -1086,7 +1101,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1168,7 +1183,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- Enabling forced parameterization for the database can help, but test first! -- Plan cache, adhoc workloads and clearing the single-use plan cache bloat --- https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/ +-- https://bit.ly/2EfYOkl -- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) @@ -1185,7 +1200,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1208,7 +1223,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1279,7 +1294,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1290,14 +1305,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 50 through 55 are the "Bad Man List" for stored procedures +-- Queries 52 through 57 are the "Bad Man List" for stored procedures + -- Top Cached SPs By Execution Count (Query 52) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1312,6 +1328,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities -- Top Cached SPs By Avg Elapsed Time (Query 53) (SP Avg Elapsed Time) @@ -1320,6 +1337,7 @@ qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_c ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1342,7 +1360,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1364,7 +1382,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1385,7 +1403,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1409,7 +1427,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrit qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1499,7 +1517,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Find missing index warnings for cached plans in the current database (Query 61) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], - cp.objtype, cp.usecounts, cp.size_in_bytes, query_plan + cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan FROM sys.dm_exec_cached_plans AS cp WITH (NOLOCK) CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) AS qp WHERE CAST(query_plan AS NVARCHAR(MAX)) LIKE N'%MissingIndex%' @@ -1513,7 +1531,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 62) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1525,12 +1543,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1580,8 +1603,8 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); -- When were Statistics last updated on all indexes? (Query 65) (Statistics Update) -SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.NAME AS [Object Name], o.type_desc AS [Object Type], - i.name AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], +SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.[NAME] AS [Object Name], o.[type_desc] AS [Object Type], + i.[name] AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], s.auto_created, s.no_recompute, s.user_created, s.is_temporary, st.row_count, st.used_page_count FROM sys.objects AS o WITH (NOLOCK) @@ -1604,6 +1627,10 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); -- sys.stats (Transact-SQL) -- https://msdn.microsoft.com/en-us/library/ms177623.aspx +-- UPDATEs to Statistics (Erin Stellato) +-- https://bit.ly/2vhrYQy + + -- Look at most frequently modified indexes and statistics (Query 66) (Volatile Indexes) From 07d2cdd15d567bbf517709cc4bd1ad4c2cdc77ca Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 3 Sep 2020 23:50:19 +0300 Subject: [PATCH 071/553] Add SQL Server 2019 CU7 info --- SQL Server Version.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index f4afbc05..b6c87ea8 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -129,7 +129,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| -| 2019 | [Install 2019 RTM] then [CU6 KB4563110] | 15.0.2070.41
15.0.4053.23 | 2019-11-04
2020-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | +| 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | @@ -138,7 +138,7 @@ Profits: | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install -[CU6 KB4563110]:https://support.microsoft.com/help/4563110 +[CU7 KB4570012]:https://support.microsoft.com/help/4570012 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU21 KB4557397]:https://support.microsoft.com/help/4557397 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 @@ -177,7 +177,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | Direct x64 Download Link | File Name | Release Date | Build Number | Size, MB | SHA1 | |:--------------------------------|:------------------------------------------------------------------|:-------------|--------------:|---------:|------------------------------------------| | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | -| [SQL Server 2019 CU6] | SQLServer2019-KB4563110-x64.exe | 2020-08-04 | 15.0.4053.23 | 604 | 505c6d0a8773909e87a0456978ffb43449a92309 | +| [SQL Server 2019 CU7] | SQLServer2019-KB4570012-x64.exe | 2020-09-02 | 15.0.4053.23 | 604 | f77dcdcf86f73088437466ae9c5a99da55b093dc | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | @@ -197,7 +197,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ **For downloading distributive for SQL Server 2008 R2 and SQL Server 2008 you must have MSDN subscription, see [SQL Server 2008 R2] and [SQL Server 2008] links.** [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 -[SQL Server 2019 CU6]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4563110-x64.exe +[SQL Server 2019 CU7]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4570012-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 [SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso @@ -405,27 +405,25 @@ For details about how to assess the performance differences of your most importa More additional information about latest vNext SQL Server release you can find in this articles: - [What's new in SQL Server 2019](https://docs.microsoft.com/sql/sql-server/what-s-new-in-sql-server-ver15?view=sql-server-ver15#utf-8-support) - - [What's New in the First Public CTP of SQL Server 2019](https://www.mssqltips.com/sqlservertip/5710/whats-new-in-the-first-public-ctp-of-sql-server-2019/) - - [Froid: How SQL Server vNext Might Fix the Scalar Functions Problem](https://www.brentozar.com/archive/2018/01/froid-sql-server-vnext-might-fix-scalar-functions-problem/) - [What’s New in SQL Server 2019 System Tables](https://www.brentozar.com/archive/2018/09/whats-new-in-sql-server-2019-system-tables/) - [What’s New in SQL Server 2019’s sys.messages: More Unannounced Features](https://www.brentozar.com/archive/2018/09/whats-new-in-sql-server-2019s-sys-messages-more-unannounced-features/) - [What’s New in SQL Server 2019: Faster Table Variables (And New Parameter Sniffing Issues)](https://www.brentozar.com/archive/2018/09/sql-server-2019-faster-table-variables-and-new-parameter-sniffing-issues/) - [What’s New in SQL Server 2019: Adaptive Memory Grants](https://www.brentozar.com/archive/2018/09/whats-new-in-sql-server-2019-adaptive-memory-grants/) - [Leaked: SQL Server 2019 Big Data Clusters Introduction Video](https://www.brentozar.com/archive/2018/09/leaked-sql-server-2019-big-data-clusters-introduction-video/) - - [Native UTF-8 Support in SQL Server 2019: Savior, False Prophet, or Both?](https://sqlquantumleap.com/2018/09/28/native-utf-8-support-in-sql-server-2019-savior-false-prophet-or-both/) Here is the latest output from `SELECT @@VERSION` for SQL Server 2019 CTP Developer Edition: ``` -Microsoft SQL Server 2019 (RTM-CU6) (KB4563110) - 15.0.4053.23 (X64) - Jul 25 2020 11:26:55 +Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) + Aug 15 2020 10:48:11 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | **Latest** | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | +| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Latest** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | +| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | | 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | | 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | | 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | @@ -445,6 +443,7 @@ Microsoft SQL Server 2019 (RTM-CU6) (KB4563110) - 15.0.4053.23 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +[Cumulative Update 7 for SQL Server 2019]:https://support.microsoft.com/help/4570012 [Cumulative Update 6 for SQL Server 2019]:https://support.microsoft.com/help/4563110 [Cumulative Update 5 for SQL Server 2019]:https://support.microsoft.com/help/4552255 [Cumulative Update 4 for SQL Server 2019]:https://support.microsoft.com/help/4548597 From 8ecc35d3a8e62863053b65762d5fca9296e9b726 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 4 Sep 2020 15:11:52 +0300 Subject: [PATCH 072/553] Add new articles --- Articles/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 4726fd9e..73941990 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1082,7 +1082,7 @@ Articles types: | [Negative identity values don’t suck] | Randolph West | 2020-05-06 | [DBA][DEV] | | [How SQL Server stores data types: integers and decimals] | Randolph West | 2020-05-13 | [DBA][DEV] | | [How SQL Server stores data types: DATETIME, DATE, TIME, and DATETIME2] | Randolph West | 2020-04-22 | [DBA][DEV] | -| [Cross Database Transactions on One Server] | Michael J. Swart | 2020-05-15 | [DBA][DEV] | +| [Cross Database Transactions on One Server] | Michael J Swart | 2020-05-15 | [DBA][DEV] | | [Your Views Aren’t The Problem. Your Code Is.] | Brent Ozar | 2020-05-06 | [DBA][DEV] | | [Can I Offload DBCC CHECKDB To Another Server?] | Brent Ozar | 2020-05-19 | [DBA] | | [Negative (-) is an operator and will affect the order of operations.] | Kenneth Fisher | 2020-05-18 | [DBA][DEV] | @@ -1107,7 +1107,7 @@ Articles types: | [Automated Backup Tuning] | Nicholas Cain | 2012-12-13 | [B] | | [Optimizing Database Restores] | Nicholas Cain | 2011-09-26 | [DBA] | | [AVAILABILITY_REPLICA - The Deception of the Log Reuse Wait Type] | Nicholas Cain | 2020-05-19 | [DBA] | -| [Changing an INT to a BIGINT with no downtime] | Michael Swart | 2020-06-19 | [DBA] | +| [Changing an INT to a BIGINT with no downtime] | Michael J Swart | 2020-06-19 | [DBA] | | [New Metadata-Only Column Changes in SQL Server 2016] | Paul White | 2020-04-17 | [DBA][DEV] | | [Bandwidth-friendly Query Profiling for Azure SQL Database] | Greg Gonzalez | 2020-04-15 | [AZ][XE] | | [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-10 | [DBA][DEV] | @@ -1210,6 +1210,8 @@ Articles types: | [All The Problems With Select *] | Erik Darlling | 2019-12-10 | [DBA][DEV] | | [When Select * Doesn’t Matter] | Erik Darlling | 2019-11-18 | [DBA][DEV] | | [HT Waits – Explained and Animated] | Forrest McDaniel | 2020-08-12 | [DBA][DEV] | +| [SQL Server 100% Online Deployments] | Michael J Swart | 2018-01-05 | [DBA] | +| [When Measuring Timespans, try DATEADD instead of DATEDIFF] | Michael J Swart | 2017-12-20 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2394,3 +2396,5 @@ Articles types: [All The Problems With Select *]:https://www.erikdarlingdata.com/sql-server/all-the-problems-with-select/ [When Select * Doesn’t Matter]:https://www.erikdarlingdata.com/sql-server/when-select-doesnt-matter/ [HT Waits – Explained and Animated]:https://forrestmcdaniel.com/2020/08/12/ht-waits-explained-and-animated/ +[SQL Server 100% Online Deployments]:https://michaeljswart.com/2018/01/100-online-deployments/ +[When Measuring Timespans, try DATEADD instead of DATEDIFF]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ From 26ba67de4c2e808478812f534999c9e6f4886614 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 5 Sep 2020 15:12:21 +0300 Subject: [PATCH 073/553] Add useful info --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8572db17..609906aa 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Kevin Chant Blog](https://www.kevinrchant.com/) - [SQLBlog.org](https://sqlblog.org) - [Idera SQL Server Blog](https://community.idera.com/tags/SQL%2bServer) + - [SQL Server Science Blog](https://www.sqlserverscience.com/) (by Max Vernon) - Security (great thanks to [Troy Hunt](https://www.troyhunt.com/troys-ultimate-list-of-security-links/)) - SQL injection - [sqlmap](http://sqlmap.org/) – The tool for mounting SQL injection attacks tests against a running site @@ -539,7 +540,7 @@ SQL Server: - SQL Developers - [Defensive Database Programming](https://assets.red-gate.com/community/books/defensive-database-programming.pdf) (by Alex Kuznetsov) - [Inside the SQL Server Query Optimizer](https://assets.red-gate.com/community/books/inside-the-sql-server-query-optimizer.pdf) (by Benjamin Nevarez) - - [SQL Server Execution Plans, 2nd Edition](https://assets.red-gate.com/community/books/sql-server-execution-plans-book.zip) (by Grant Fritchey) + - [SQL Server Execution Plans, 3rd Edition](https://www.red-gate.com/products/dba/sql-monitor/entrypage/execution-plans) (by Grant Fritchey) - [SQL Server Source Control Basics](https://www.red-gate.com/products/sql-development/sql-source-control/entrypage/sql-server-source-control-basics) (by Robert Sheldon, Rob Richardson & Tony Davis) - [The Art of XSD](https://assets.red-gate.com/community/books/the-art-of-xsd.pdf) (by Jacob Sebastian) - [The Redgate Guide to SQL Server Team-based Development](https://assets.red-gate.com/products/sql-development/sql-source-control/entrypage/assets/RG_Guide_to_SQL_Server_Dev.pdf) (by Phil Factor, Grant Fritchey, Alex Kuznetsov, and Mladen Prajdić) From 5f3ba5a59239083f36688791baf653056056a6eb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 6 Sep 2020 15:13:04 +0300 Subject: [PATCH 074/553] Improve name convention --- ...ame Convention and T-SQL Programming Style.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index e2fbb386..a95010d1 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -205,16 +205,22 @@ This is only recommendations! But it is consistent for choosing only 1 function |----------------------|-----------------|---------------------------------------------------------------------------------------------|--------------| | [`<>`][12] | [`!=`][12] | `<>` is `ANSI`, `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | | [`CAST`][10] | [`CONVERT`][10] | `CAST` is `ANSI` | [14],[15] | -| [`COALCESE`] | [`ISNULL`] | `COALCESE` is `ANSI` and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | +| [`COALECSE`] | [`ISNULL`] | `COALECSE` is `ANSI` and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | +| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 [14]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-cast-vs-convert [15]:https://nakulvachhrajani.com/2011/07/18/cast-vs-convert-is-there-a-difference-as-far-as-sql-server-is-concerned-which-is-better/ -[`COALCESE`]:https://docs.microsoft.com/sql/t-sql/language-elements/coalesce-transact-sql +[`COALECSE`]:https://docs.microsoft.com/sql/t-sql/language-elements/coalesce-transact-sql [`ISNULL`]:https://docs.microsoft.com/sql/t-sql/functions/isnull-transact-sql [16]:https://www.mssqltips.com/sqlservertip/2689/deciding-between-coalesce-and-isnull-in-sql-server/ [17]:https://nocolumnname.blog/2017/10/09/a-subtle-difference-between-coalesce-and-isnull/ +[`DATEADD`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/dateadd-transact-sql +[`DATEDIFF`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql +[`SARGable`]:https://www.sqlshack.com/how-to-use-sargable-expressions-in-t-sql-queries-performance-advantages-and-examples/ +[18]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ +[19]:https://dba.stackexchange.com/q/132437/107045 **[⬆ back to top](#table-of-contents)** @@ -251,7 +257,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://dba.stackexchange.com/q/253873/107045), [here](https://www.erikdarlingdata.com/sql-server/all-the-problems-with-select/). - Use asterisk (`*`) only in an archiving situation, where rows are being moved to another table that must have the same structure. - ``sql + ```sql INSERT INTO SalesOrderArchive /* Note no column list */ SELECT * FROM SalesOrder @@ -273,8 +279,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/) and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). - - All script files should end with `GO` and line break. - - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. + - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. + - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. More details [here](https://www.sentryone.com/blog/aaronbertrand/backtobasics-lower-case-data-types). - All system database and tables must be in **lowercase** for properly working for Case Sensitive instance: `master, sys.tables …`. From 3edea56a96a9f40d24a6a26239b89c1dfe8642a8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 7 Sep 2020 15:22:36 +0300 Subject: [PATCH 075/553] Add MaxDop_2016_and_higher script --- Scripts/MaxDop_2016_and_higher.sql | 116 +++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Scripts/MaxDop_2016_and_higher.sql diff --git a/Scripts/MaxDop_2016_and_higher.sql b/Scripts/MaxDop_2016_and_higher.sql new file mode 100644 index 00000000..00570a01 --- /dev/null +++ b/Scripts/MaxDop_2016_and_higher.sql @@ -0,0 +1,116 @@ +/* + + Calculate recommended MAXDOP value for your server. + 1 data set with information about current runnig jobs. + 2020-02-18 by John Welch + 2020-09-07 by Konstantin Taranov + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/MaxDop_2016_and_higher.sql + https://www.sentryone.com/blog/is-maxdop-configured-correctly + +*/ + + +DECLARE @ProductVersion NVARCHAR(50); +DECLARE @Major INT; +DECLARE @NumaNodeCount INT; +DECLARE @LogicalProcessorPerNumaNodeCount INT; +DECLARE @EffectiveMaxDop INT; +DECLARE @LogicalProcessorThreshold INT; +DECLARE @ResultMessage NVARCHAR(255); + +SET @ProductVersion = CAST(SERVERPROPERTY('ProductVersion') AS NVARCHAR(50)); +SET @Major = CAST(LEFT(@ProductVersion, CHARINDEX('.', @ProductVersion)-1) AS INT); + +IF @Major < 13 +BEGIN + RAISERROR('This script is intended for SQL Server 2016 or higher. It will not work on version [%s].', 11, 1, @ProductVersion); +END + +/* Get the MAXDOP setting */ +SELECT + @EffectiveMaxDop = CAST(value_in_use AS INT) +FROM + sys.configurations +WHERE + [name] = N'max degree of parallelism'; + +IF @EffectiveMaxDop = 0 +BEGIN + SELECT + @EffectiveMaxDop = COUNT(*) + FROM + sys.dm_os_schedulers + WHERE + scheduler_id <= 1048575 + AND is_online = 1; +END + +-- Get the NUMA node count +-- Get the logical processors per numa node +SELECT + @NumaNodeCount = COUNT(*), @LogicalProcessorPerNumaNodeCount = MAX(online_scheduler_count) +FROM + sys.dm_os_nodes +WHERE node_id <> 64; --Excluded DAC node + +IF @NumaNodeCount < 1 OR @LogicalProcessorPerNumaNodeCount < 1 +BEGIN + RAISERROR('Could not capture NUMA node or logical processor count. Reported values - NUMA: [%d], Logical Processor: [%d]', + 11,1, @NumaNodeCount, @LogicalProcessorPerNumaNodeCount); +END + +SET @LogicalProcessorThreshold = IIF(@NumaNodeCount = 1, 8, 16); + +--If NUMA = 1 and LogiProcs <= 8 THEN ASSERT(MaxDop <= LogiProcs) +--If NUMA > 1 and LogiProcs <= 16 THEN ASSERT(MaxDop <= LogiProcs) +IF @LogicalProcessorPerNumaNodeCount <= @LogicalProcessorThreshold + AND @EffectiveMaxDop > @LogicalProcessorPerNumaNodeCount +BEGIN + SET @ResultMessage = N'MAXDOP should be less than or equal to the Logical Processor count per NUMA node.'; +END +ELSE +BEGIN + -- If NUMA = 1 and LogiProcs > 8 THEN ASSERT(MaxDop == 8) + IF @NumaNodeCount = 1 + AND @LogicalProcessorPerNumaNodeCount > @LogicalProcessorThreshold + AND @EffectiveMaxDop <> @LogicalProcessorThreshold + BEGIN + SET @ResultMessage = N'MAXDOP should be equal to 8.'; + END + -- If NUMA > 1 and LogiProcs > 16 THEN ASSERT(MaxDop <= 16 & MaxDop <= (LogiProcs / 2)) + ELSE + BEGIN + IF @LogicalProcessorPerNumaNodeCount > @LogicalProcessorThreshold + AND @EffectiveMaxDop > @LogicalProcessorThreshold + BEGIN + SET @ResultMessage = N'MAXDOP should not exceed a value of 16.'; + --RAISERROR('MAXDOP is not set based on recommendations in KB2806535. MAXDOP should not exceed a value of 16 . Reported values - NUMA: [%d], Logical Processor: [%d], MAXDOP: [%d]', + -- 15,1, @NumaNodeCount, @LogicalProcessorPerNumaNodeCount, @EffectiveMaxDop); + END + ELSE IF @LogicalProcessorPerNumaNodeCount > @LogicalProcessorThreshold + AND (@LogicalProcessorPerNumaNodeCount / 2) <= @LogicalProcessorThreshold + AND @EffectiveMaxDop <> (@LogicalProcessorPerNumaNodeCount / 2) + BEGIN + SET @ResultMessage = N'MAXDOP should be set at half the number of logical processors per NUMA node with a MAX value of 16.'; + --RAISERROR('MAXDOP is not set based on recommendations in KB2806535. MAXDOP should be set at half the number of logical processors per NUMA node with a MAX value of 16 . Reported values - NUMA: [%d], Logical Processor: [%d], MAXDOP: [%d]', + -- 15,1, @NumaNodeCount, @LogicalProcessorPerNumaNodeCount, @EffectiveMaxDop); + END + END +END +IF @EffectiveMaxDop = 1 +BEGIN + RAISERROR('MAXDOP is set to 1, which supresses parallel plan generation.', 0, 1); +END + +IF @ResultMessage IS NULL +BEGIN + RAISERROR('MAXDOP setting is in the recommended range. Reported values - NUMA: [%d], Logical Processor: [%d], MAXDOP: [%d]', + 0, 1, @NumaNodeCount, @LogicalProcessorPerNumaNodeCount, @EffectiveMaxDop); +END +ELSE +BEGIN + RAISERROR('MAXDOP is not set based on recommendations in KB2806535. %s Reported values - NUMA: [%d], Logical Processor: [%d], MAXDOP: [%d]', + 11, 1, @ResultMessage, @NumaNodeCount, @LogicalProcessorPerNumaNodeCount, @EffectiveMaxDop); +END +GO From 9b72ae1ca5185176b56c3486c26db7f95a1f5d53 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 8 Sep 2020 14:03:45 +0300 Subject: [PATCH 076/553] Add useful info --- SQL Server Data Types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Data Types.md b/SQL Server Data Types.md index e6cfd107..b2b3a3ed 100644 --- a/SQL Server Data Types.md +++ b/SQL Server Data Types.md @@ -316,8 +316,8 @@ FROM sys.fn_helpdatatypemap ( - [Java and SQL Server supported data types](https://docs.microsoft.com/en-us/sql/language-extensions/how-to/java-to-sql-data-types) -- [Data type mappings between Python and SQL Server](https://docs.microsoft.com/en-us/sql/advanced-analytics/python/python-libraries-and-data-types) -- [Data type mappings between R and SQL Server](https://docs.microsoft.com/en-us/sql/advanced-analytics/r/r-libraries-and-data-types) +- [Data type mappings between Python and SQL Server](https://docs.microsoft.com/en-us/sql/machine-learning/python/python-libraries-and-data-types) +- [Data type mappings between R and SQL Server](https://docs.microsoft.com/en-us/sql/machine-learning/r/r-libraries-and-data-types) | General Type | Type | ANSI | Java | Python | R | |:----------------------|:-------------------|:-----|:---------------------|:--------|:----------| @@ -362,7 +362,7 @@ FROM sys.fn_helpdatatypemap ( | Spatial Data Types | [geography] | No | ? | ? | - | (\* *These data types will be removed in a future version of SQL Server. Avoid using these data types in new projects, and try to change them in current projects*) -(\*\* Only UTF8 Strings supported) +(\*\* *Only UTF8 Strings supported*) **[⬆ back to top](#table-of-contents)** From c5e82cc06575b8018b1938c03ead0ab4c2495bf9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 9 Sep 2020 07:08:28 +0300 Subject: [PATCH 077/553] Add new articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 73941990..ef5e783d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1212,6 +1212,9 @@ Articles types: | [HT Waits – Explained and Animated] | Forrest McDaniel | 2020-08-12 | [DBA][DEV] | | [SQL Server 100% Online Deployments] | Michael J Swart | 2018-01-05 | [DBA] | | [When Measuring Timespans, try DATEADD instead of DATEDIFF] | Michael J Swart | 2017-12-20 | [DBA][DEV] | +| [The Curious Case of… setting up a server for DBCC CHECKDB] | Paul Randal | 2020-08-24 | [DBA] | +| [When should a primary key be declared non-clustered?] | Paul White | 2012-12-01 | [IDX] | +| [Guid vs INT - Which is better as a primary key?] | Sandeep Kumar M | 2011-01-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2398,3 +2401,6 @@ Articles types: [HT Waits – Explained and Animated]:https://forrestmcdaniel.com/2020/08/12/ht-waits-explained-and-animated/ [SQL Server 100% Online Deployments]:https://michaeljswart.com/2018/01/100-online-deployments/ [When Measuring Timespans, try DATEADD instead of DATEDIFF]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ +[The Curious Case of… setting up a server for DBCC CHECKDB]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-setting-up-a-server-for-dbcc-checkdb/ +[When should a primary key be declared non-clustered?]:https://dba.stackexchange.com/q/7741/107045 +[Guid vs INT - Which is better as a primary key?]:https://dba.stackexchange.com/q/264/107045 From 0c6e17172e45bd1ca7b83361f272736babf536bb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 10 Sep 2020 11:57:52 +0300 Subject: [PATCH 078/553] Add new useful ope source projects --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 609906aa..5b193354 100644 --- a/README.md +++ b/README.md @@ -383,6 +383,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [MsSqlDependencyBrowser - Simple tool to browse between dependent objects on MS SQL Server](https://github.com/usharik/MsSqlDependencyBrowser) (by Aleksej Usharovskij) - [`Projects-MS-SQL-Server-DBA` - Utilities and Scripts for SQL Server dba](https://github.com/jobgemws/Projects-MS-SQL-Server-DBA) (by Evgeniy Gribkov) - [`sp_alter_column` stored procedure is able to alter a column with dependencies](https://github.com/segovoni/sp_alter_column) (by Sergio Govoni) + - [Toolbox repository for Madeira's consultant team](https://github.com/MadeiraData/MadeiraToolbox) (by Madeira) + - [`mssql-jobs-hadr` - maintain scheduled jobs on SQL Servers with either Availability Groups or Database Mirroring](https://github.com/MadeiraData/mssql-jobs-hadr) (by Eitan Blumin) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From a50f6d1ef00bceea24d027875eb7e9b6938fa4b8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 11 Sep 2020 11:58:41 +0300 Subject: [PATCH 079/553] Add new articles --- Articles/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index ef5e783d..b7325667 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1214,7 +1214,9 @@ Articles types: | [When Measuring Timespans, try DATEADD instead of DATEDIFF] | Michael J Swart | 2017-12-20 | [DBA][DEV] | | [The Curious Case of… setting up a server for DBCC CHECKDB] | Paul Randal | 2020-08-24 | [DBA] | | [When should a primary key be declared non-clustered?] | Paul White | 2012-12-01 | [IDX] | -| [Guid vs INT - Which is better as a primary key?] | Sandeep Kumar M | 2011-01-05 | [DBA][DEV] | +| [Guid vs INT - Which is better as a primary key?] | Sandeep Kumar M | 2011-01-05 | [DBA][DEV] | +| [Control SQL Jobs based on HADR Role – Taking it to the Next Level] | Eitan Blumin | 2020-05-26 | [DBA][J] | +| [SQL Friday #16: Eitan Blumin on “How to HADR Your SQL Jobs”] | Eitan Blumin | 2020-07-31 | [DBA][J] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2404,3 +2406,5 @@ Articles types: [The Curious Case of… setting up a server for DBCC CHECKDB]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-setting-up-a-server-for-dbcc-checkdb/ [When should a primary key be declared non-clustered?]:https://dba.stackexchange.com/q/7741/107045 [Guid vs INT - Which is better as a primary key?]:https://dba.stackexchange.com/q/264/107045 +[Control SQL Jobs based on HADR Role – Taking it to the Next Level]:https://eitanblumin.com/2020/05/26/sql-jobs-based-on-hadr-role-next-level/ +[SQL Friday #16: Eitan Blumin on “How to HADR Your SQL Jobs”]:https://sqlfriday.net/past-sql-friday-sessions/sql-friday-16-eitan-blumin-on-how-to-hadr-your-sql-jobs/ From c4ac4616952181b3c1de25d5460e37e558637393 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 12 Sep 2020 11:45:11 +0300 Subject: [PATCH 080/553] Add DataWeekender conference --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5b193354..57fd05f0 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SentryOne SQL Server Virtual Conference](https://info.sentryone.com/accelerate-2020) - [Red Gate SQL Server Online Events](https://www.red-gate.com/hub/events/online-events/) - [EigthKB Sql Server Internals Conference](https://eightkb.online/) + - [DataWeekender](https://www.dataweekender.com/schedule) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From aa79272a11285eb4095fc06ad89000808691c4ad Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 13 Sep 2020 11:46:03 +0300 Subject: [PATCH 081/553] Add Convert_trc_to_2008r2 script --- PowerShell/Convert_trc_to_2008r2.ps1 | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 PowerShell/Convert_trc_to_2008r2.ps1 diff --git a/PowerShell/Convert_trc_to_2008r2.ps1 b/PowerShell/Convert_trc_to_2008r2.ps1 new file mode 100644 index 00000000..b60c20a3 --- /dev/null +++ b/PowerShell/Convert_trc_to_2008r2.ps1 @@ -0,0 +1,33 @@ +#requires -version 2.0 + +<# +.SYNOPSIS + Changes the version information in the header of a SQL Server trace + +.DESCRIPTION + Author: Gianluca Sartori - @spaghettidba + Create date: 2012-11-07 + https://spaghettidba.com/2012/11/08/more-on-converting-trace-files/ + +.PARAMETER fileName + Trace file name +#> + +## ============================================= +## Author: Gianluca Sartori - @spaghettidba +## Create date: 2012-11-07 +## Description: Changes the version information +## in the header of a SQL Server trace +## ============================================= +$fileName = "somefile.trc" + +# The version information we want to write: 0x0A = 10 = SQLServer 2008 +[Byte[]] $versionData = 0x0A +# The offset of the version information in the file +$offset = 390 + +[System.IO.FileMode] $open = [System.IO.FileMode]::OpenOrCreate +$stream = New-Object System.IO.FileStream -ArgumentList $fileName, $open +$stream.Seek($offset, [System.IO.SeekOrigin]::Begin); +$stream.Write($versionData, 0, $versionData.Length); +$stream.Close() From 1a2dab87a7c6cce80fcb0ba9083d0256950bb143 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 14 Sep 2020 15:55:30 +0300 Subject: [PATCH 082/553] Add Mixed Extents podcast --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 57fd05f0..20bb6e90 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Dear SQL DBA](https://sqlworkbooks.com/dear-sql-dba/) (by Kendra Little) - [SQL Server Pain Relief: Office Hours](https://www.stitcher.com/podcast/sql-server-pain-relief-office-hours-with-brent-ozar-unlimitedr) (by Brent Ozar) - [Azure DevOps Podcast](http://azuredevopspodcast.clear-measure.com/) (by Microsoft) + - [Mixed Extents](https://youtu.be/hBgMadT9fuU) (by EightKB) - Courses - Free - [Learning Extended Events in 60 Days](https://jasonbrimhall.info/2015/09/08/learning-extended-events-in-60-days/) and new [link](http://sqlxevents.com/) (by Jason Brimhall) From 557bf784e99ff154d1e206fc0c0f13e72f0d7ddc Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Mon, 14 Sep 2020 16:15:59 +0300 Subject: [PATCH 083/553] Add 28 new SQL Server Tools --- Utilities/README.md | 491 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 480 insertions(+), 11 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 59f0737b..6dcaacf0 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,8 +1,8 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **346** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **374** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {7} + - **[B]**: Backup solutions {11} - **[BI]**: Business Intelligence Solutions {4} - **[D]**: Documentation solutions {8} - **[DA]**: Database Architecture {20} @@ -12,16 +12,16 @@ Utility types (main purpose), in braces `{}` current counts: - **[IDX]**: Index manager {3} - **[G]**: Data generation {4} - **[J]**: Job managers {4} - - **[M]**: Monitoring and alerting Tools {26} - - **[MG]**: Migration tool {29} - - **[MS]**: Management Studio (alternative for SSMS) {31} + - **[M]**: Monitoring and alerting Tools {27} + - **[MG]**: Migration tool {30} + - **[MS]**: Management Studio (alternative for SSMS) {32} - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {4} + - **[S]**: Search tools {5} - **[SEC]**: Security tools {7} - **[SC]**: Structure compare {21} - **[ST]**: Statistics utilities {3} - - **[T]**: Testing tools {5} - - **[?]**: Not yet classified {127} + - **[T]**: Testing tools {6} + - **[?]**: Not yet classified {146} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-------------------------|------------|----------------|------:| @@ -66,6 +66,8 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | | [SQL Server 2008 R2 Best Practices Analyzer](#bpa-2008) | No | No | [?] | [BPA 2008] | 2010-06-18 | Microsoft | | Yes | No | | [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | +| [Elastic database tools](#elastic-database-tools) | No | No | [?] | [Elastic database tools] | ? | Microsoft | | Yes | No | +| [Microsoft Sync Framework](#microsoft-sync-framework) | No | No | [?] | [Microsoft Sync Framework] | 2020-04-22 | Microsoft | | Yes | No | | [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | | [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | | [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | @@ -132,6 +134,8 @@ Utility types (main purpose), in braces `{}` current counts: | [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | | [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | | [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | +| [dbForge Complete](#dbforge-complete) | No | No | [?] | [dbForge Complete] | 2020-09-01 | Devart | Shareware | No | $199 | +| [dbForge SQL Azure Backup](#dbforge-sql-azure-backup) | No | No | [B] | [dbForge SQL Azure Backup] | 2013-04-18 | Devart | Freeware | Yes | No | | [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | | [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | | [SQL Server Compression Estimator](#compression-estimator) | No | No | [?] | [SQL Server Compression Estimator] | 2011-06-02 | Bob Tavlor | | Yes | No | @@ -174,6 +178,8 @@ Utility types (main purpose), in braces `{}` current counts: | [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | | [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | | [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | +| [ApexSQL Search](#apexsql-search) | No | No | [S] | [ApexSQL Search] | 2020-07-30 | ApexSQL | | Yes | No | +| [ApexSQL Source Control](#apexsql-source-control) | No | No | [?] | [ApexSQL Source Control] | 2020-01-20 | ApexSQL | | No | $299 | | [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | | [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | | [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | @@ -354,7 +360,7 @@ Utility types (main purpose), in braces `{}` current counts: | [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | | [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | | [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | -| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell | | Yes | No | +| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell | | Yes | No | | [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | | [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | | [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | @@ -365,12 +371,34 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | | [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | | [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | -| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions | | Yes | No | +| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions | | Yes | No | | [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | | [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | | [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | | [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | -| [POPSQL](#popsql) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [POPSQL] | 2020-08-01 | PopSQL | | Yes | 10$ | +| [POPSQL](#popsql) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [POPSQL] | 2020-08-01 | PopSQL | | Yes | $10 | +| [Azure Blob Studio 2011](#azure-blob-studio-2011) | No | No | [?] | [Azure Blob Studio 2011] | 2010-12-25 | Alessandro Del Sole | | Yes | No | +| [Azure Explorer](#azure-explorer) | No | No | [?] | [Azure Explorer] | ? | Monza Cloud | | Yes | No | +| [Azure SQL Agent](#azure-sql-agent) | No | No | [?] | [Azure SQL Agent] | ? | ? | [MIT] | Open Source | No | +| [Azure SQL Database DTU Calculator](#azure-sql-dtu-calculator) | No | No | [?] | [Azure SQL Database DTU Calculator] | ? | Justin Henriksen | [MIT] | Open Source | No | +| [Azure SQL Database Stress Test Tool](#azure-sql-stress-test) | No | No | [T] | [Azure SQL Database Stress Test Tool] | ? | Kiyoaki Tsurutani | [MIT] | Open Source | No | +| [Azure SQL Dev Cloner](#azure-sql-dev-cloner) | No | No | [?] | [Azure SQL Dev Cloner] | ? | ? | [MIT] | Open Source | No | +| [Azure User Management Console](#azure-user-management-console) | No | No | [?] | [Azure User Management Console] | ? | ? | [Apache] | Open Source | No | +| [CloudMonix SQL Azure Database Management](#cloudmonix-azure-man)| No | No | [?] | [CloudMonix SQL Azure Database Management] | ? | CloudMonix | | No | $15 | +| [DB Ghost Change Manager Professional](#db-ghost-change-manager) | No | No | [?] | [DB Ghost Change Manager Professional] | ? | Innovartis Ltd | | No | £430 | +| [MSSQL-Maestro](#mssql-maestro) | No | No | [MS] | [MSSQL-Maestro] | 2017-06-29 | SQL Maestro Group | | No | $229 | +| [MSSQLMerge](#mssqlmerge) | No | No | [?] | [MSSQLMerge] | ? | Konstantin Semenenkov | | Yes | $50 | +| [SQL Backup and FTP](#sql-backup-and-ftp) | MySQL,PostgreSQL | Linux | [B] | [SQL Backup and FTP] | ? | Pranas.NET | | Yes | $129 | +| [SQL Bak](#sql-bak) | MySQL,PostgreSQL | Linux | [B] | [SQL Bak] | ? | Pranas.NET | | Yes | $9 | +| [SQL Bulk Tools](#sql-bulk-tools) | No | No | [?] | [SQL Bulk Tools] | ? | Greg Taylor | [MIT] | Open Source | No | +| [SQL Data Examiner](#sql-data-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Data Examiner] | ? | Intelligent Database Solutions | | No | $400 | +| [SQL Examiner](#sql-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Examiner] | ? | Intelligent Database Solutions | | No | $400 | +| [SQL Database Backup](#sql-database-backup) | No | No | [B] | [SQL Database Backup] | ? | Richard Astbury | [MIT] | Open Source | No | +| [SQL Database Copy](#sql-database-copy) | No | No | [MG] | [SQL Database Copy] | 2017-07-25 | ryanovic | [MIT] | Open Source | No | +| [SQL Delta Duo for SQL Server](#sql-delta-duo-for-sql-server) | No | No | [?] | [SQL Delta Duo for SQL Server] | ? | The Australian Software Company | | No | $370 | +| [SQL Trace Replay](#sql-trace-replay) | No | No | [?] | [SQL Trace Replay] | ? | Mikhail Shilkov | [MIT] | Open Source | No | +| [SQL Workload Profiler](#sql-workload-profiler) | No | No | [?] | [SQL Workload Profiler] | 2014-10-01 | Chris Bailiss | | Yes | No | +| [SQLDBdiff](#sqldbdiff) | No | Linux | [?] | [SQLDBdiff] | ? | SQLDBtools | | Yes | $60 | ## SSMS @@ -5400,6 +5428,421 @@ Collaborative SQL editor for your team. Write queries, visualize data, and share your results. +## ApexSQL Search + +Download page: [ApexSQL Search]
+Release date: 2020-07-30
+Support Version: SQL Server 2005 and higher
+Author: ApexSQL
+Free version: Yes
+Price: No + + - Search for SQL objects + - Quickly find data in SQL tables + - Edit extended properties + - Easily navigate to result objects + - Rename SQL objects safely + - Export results to HTML, CSV and Excel + + +## ApexSQL Source Control + +Download page: [ApexSQL Source Control]
+Release date: 2020-01-20
+Support Version: SQL Server 2005 and higher
+Author: ApexSQL
+Free version: No
+Price: $299 + + - Integrate SQL source control directly into SSMS + - Use dedicated or shared development models + - View conflicts and resolve directly in the UI + - View a detailed history of changes + - Lock objects to prevent overwrites + - Set team policies for check outs and locks + - Apply changes with dependency aware scripts + - Create and apply labels from source control + - Create branch or merge branches directly from SSMS + - Associate a changeset with a TFS work item + + +## Azure Blob Studio 2011 + +Download page: [Azure Blob Studio 2011]
+Release date: 2010-12-25
+Support Version: ?
+Author: Alessandro Del Sole
+Free version: Yes
+Price: No + +Azure Blob Studio is a tool for managing files in the Windows Azure's Blob Storage +You can: + - Work with both the developer and on-line accounts + - Create containers (folders) + - Upload multiple blobs (files) + - Remove containers + - Remove multiple blobs + - Retrieve URI for each blob + - Copy the blob's URI to the clipboard right-clicking the Blob's name + - Retrieve metadata + - Open blobs via URI + + +## Azure Explorer + +Download page: [Azure Explorer]
+Release date: ?
+Support Version: ?
+Author: Monza Cloud
+Free version: Yes
+Price: No + + - Manage Azure blobs like local files + - Support for common blob operations + - Built for users with thousands of blob containers + - Designed for Microsoft Azure + + +## Azure SQL Agent + +Download page: [Azure SQL Agent]
+Release date: ?
+Support Version: ?
+Author: ?
+Free version: Yes
+Price: No + +Command line agent to automatically add your current public IP address to the Azure SQL firewall + + +## Azure SQL Database DTU Calculator + +Download page: [Azure SQL Database DTU Calculator]
+Release date: ?
+Support Version: ?
+Author: Justin Henriksen
+Free version: Yes
+Price: No + +This calculator will help you determine the number of DTUs for your existing SQL Server database(s) as well as a recommendation of the minimum performance level and service tier that you need before you migrate to Azure SQL Database. + + +## Azure SQL Database Stress Test Tool + +Download page: [Azure SQL Database Stress Test Tool]
+Release date: ?
+Support Version: ?
+Author: Kiyoaki Tsurutani
+Free version: Yes
+Price: No + +Azure SQL Database Stress Test Tool + + +## Azure SQL Dev Cloner + +Download page: [Azure SQL Dev Cloner]
+Release date: ?
+Support Version: ?
+Author: ?
+Free version: Yes
+Price: No + +Command line tool for cloning an Azure SQL Database from website instance to another. It optionally allows the target to be a Deployment Slot. + + +## Azure User Management Console + +Download page: [Azure User Management Console]
+Release date: ?
+Support Version: ?
+Author: ?
+Free version: Yes
+Price: No + +AUMC is a User Graphic Interface (GUI) that manages the users and logins of an Azure SQL database. The tool is simply convertin + + +## CloudMonix SQL Azure Database Management + +Download page: [CloudMonix SQL Azure Database Management]
+Release date: ?
+Support Version: ?
+Author: CloudMonix
+Free version: No
+Price: $15 + +CloudMonix monitors Azure SQL Databases by tracking their key performance indicators retrieved from Azure Management API and Dynamic Management Views. In addition, CloudMonix allows to automate maintenance tasks and automatically scale the database performance tier according to load. + +## DB Ghost Change Manager Professional + +Download page: [DB Ghost Change Manager Professional]
+Release date: ?
+Support Version: 2000-2019, Azure
+Author: Innovartis Ltd
+Free version: No
+Price: £430 + + - Scripts all object types into individual DROP/CREATE scripts, ready for check in to source control. + - Scripts data into boilerplate INSERT scripts. + - Builds databases from individual object scripts. + - Highlights syntax, dependency and data errors. + - Creates a single script for the database build that can be reused. + - Can synchronize two databases making them match precisely. + - Can synchronize an existing database to a set of base schema creation scripts in your Source Management System. This means that your Source Management System itself provides a complete audit trail. + - Can insert custom scripts at the end of the build, before and after the synch process. + - Creates a script of the differences between two databases or base schema scripts and a target database. + - Handles all types of database object and all complex interactions. + - Intuitive, straightforward wizard based interface. + - SessionSave facility lets you save your wizard answers for later reuse. + + +## dbForge Complete + +Download page: [dbForge Complete]
+Release date: 2020-09-01
+Support Version: 2000-2019, Azure
+Author: Devart
+Free version: No
+Price: $199 + + - Speed up SQL query writing with IntelliSense-style SQL code completion + - Beautify T-SQL code and unify code standards with smart SQL Formatter + - Get the essential information on DB objects while you are writing a code + - Format your SQL query right in Management Studio or Visual Studio + - Use rich SQL code snippet collection, manage and modify the existing snippets or create your own templates + - Navigate through the SQL document easily and synchronize it with the code + - Rename tables, columns, procedures, and functions safely with automatic correction of references to the renamed objects + - Boost your productivity significantly with convenient tabs and windows, as well as intuitive SQL statements management + + +## dbForge SQL Azure Backup + +Download page: [dbForge SQL Azure Backup]
+Release date: 2013-04-18
+Support Version: ?
+Author: Devart
+Free version: Yes
+Price: No + + - Create a copy of your SQL Azure database on local SQL Server + - Make an archive copy on your local hard drive + - Restore SQL Azure database from archive + - Schedule periodic backups to your Azure Blob storage + + +## Elastic database tools + +Download page: [Elastic database tools]
+Release date: ?
+Support Version: Azure
+Author: Microsoft
+Free version: Yes
+Price: No + +The elastic database client library helping you run a sample app. The sample app creates a simple sharded application and explores key capabilities of the Elastic Database Tools feature of Azure SQL Database. It focuses on use cases for shard map management, data-dependent routing, and multi-shard querying. The client library is available for .NET as well as Java. + + +## Microsoft Sync Framework + +Download page: [Microsoft Sync Framework]
+Release date: 2020-04-22
+Support Version: Azure
+Author: Microsoft
+Free version: Yes
+Price: No + +Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline scenarios for applications, services, and devices. +Sync Framework 2.1 introduces new features that let you synchronize a SQL Server or SQL Server Compact database on your computer with a SQL Azure database. This release also introduces parameter-based filtering, the ability to remove synchronization scopes and templates from a database, and performance enhancements to make synchronization faster and easier. + + +## MSSQL-Maestro + +Download page: [MSSQL-Maestro]
+Release date: 2017-06-29
+Support Version: from 7.0 to 2019, Azure 11 and 12
+Author: SQL Maestro Group
+Free version: No
+Price: $229 + +Complete and powerful database management, admin and development tool for Microsoft SQL Server and Microsoft Azure SQL Database. + + +## MSSQLMerge + +Download page: [MSSQLMerge]
+Release date: ?
+Support Version: 2008-2019, Azure
+Author: Konstantin Semenenkov
+Free version: Yes
+Price: $50 + +MssqlMerge is an easy to use diff & merge tool for Microsoft SQL Server databases. This tool allows users to compare and import/export the most common database programming objects and the data between any two databases. + + +## SQL Backup and FTP + +Download page: [SQL Backup and FTP]
+Release date: ?
+Support Version: ?
+Author: Pranas.NET
+Free version: Yes
+Price: $129 + +SQLBackupAndFTP is SQL Server, MySQL and PostgreSQL backup software that runs scheduled backups (full, differential or transaction log) of SQL Server or SQL Server Express databases (any version), runs file/folder backup, zips and encrypts the backups, stores them on a network or on an FTP server or in the cloud (Amazon S3 and others we're constantly adding more), removes old backups, and sends an e-mail confirmation on the job's success or failure. + + +## SQL Bak + +Download page: [SQL Bak]
+Release date: ?
+Support Version: ?
+Author: Pranas.NET
+Free version: Yes
+Price: $9 + + - Schedule and restore sql backup from any web browser on any device + - Send backups to a folder, FTP, Dropbox, Google Drive, OneDrive, Amazon S3 and more + - Monitor database performance and receive email alerts + - Install our app on Windows or Linux, connect to sqlbak.com, then manage backups via the web + + +## SQL Bulk Tools + +Download page: [SQL Bulk Tools]
+Release date: ?
+Support Version: ?
+Author: Greg Taylor
+Free version: Yes
+Price: No + +## SQL Data Examiner + +Download page: [SQL Data Examiner]
+Release date: ?
+Support Version: ?
+Author: Intelligent Database Solutions
+Free version: No
+Price: $400 + + - Migrate data between database servers + - Verify data migration success + - Consolidate data from slave databases to a master database + - Perform one-way master-slave or slave-master replication + + +## SQL Examiner + +Download page: [SQL Examiner]
+Release date: ?
+Support Version: ?
+Author: Intelligent Database Solutions
+Free version: No
+Price: $400 + + - Speed up the deployment of schema updates + - Eliminate a chance of a human error + - Quickly compare databases and find all the differences + - Work with MSSQL, Oracle, PostgreSQL, MySQL + - Keep your database schema under Source Control + - Set up a scheduled comparison and synchronization + - Performs cross-platform comparison and synchronization + + + +## SQL Database Backup + +Download page: [SQL Database Backup]
+Release date: ?
+Support Version: ?
+Author: Richard Astbury
+Free version: Yes
+Price: No + +Windows Azure SQL Database Backup Utility. +This utility will take a copy of your SQL Database, and once the copy has completed, will make a backup of the database to blob storage using the bacpac format. + + +## SQL Database Copy + +Download page: [SQL Database Copy]
+Release date: 2017-07-25
+Support Version: ?
+Author: ryanovic
+Free version: Yes
+Price: No + +Simple console tool uses SMO scripting capabilities and SqlBulkCopy for schema and data migration between different instances. +Available options: + - SQL Server database to Azure SQL database + - SQL Server database to SQL Server database + + +## SQL Delta Duo for SQL Server + +Download page: [SQL Delta Duo for SQL Server]
+Release date: ?
+Support Version: ?
+Author: The Australian Software Company
+Free version: No
+Price: $370 + +Compare and Sync Schema and Data for SQL Server databases. + + +## SQL Trace Replay + +Download page: [SQL Trace Replay]
+Release date: ?
+Support Version: ?
+Author: Mikhail Shilkov
+Free version: Yes
+Price: No + +Tool to capture and replay traces between SQL Server instances (and to Azure SQL Database in particular) + + +## SQL Workload Profiler + +Download page: [SQL Workload Profiler]
+Release date: 2014-10-01
+Support Version: 2008+, Azure
+Author: Chris Bailiss
+Free version: Yes
+Price: No + +SQL Workload Profiler is a free tool for capturing and logging workload performance information from SQL Server. Performance statistics can be captured minute-by-minute (or more frequently if you want, up to every ten seconds, depending on the type/size of workload). Data can be analysed as it is being collected and/or saved for later analysis. Workload Profiler supports both (on-premise) SQL Server and Azure SQL Database. + + +## SQLDBdiff + +Download page: [SQLDBdiff]
+Release date: ?
+Support Version: 2005-2019, Azure
+Author: SQLDBtools
+Free version: No
+Price: $60 + + - Tables and columns (with the possibility to respect or not columns order); + - Views (including their indexes and triggers); + - Stored procedures; + - User defined functions; + - Triggers; + - PK and Indexes (with the possibility to include or not statistic indexes); + - Relationships (FK); + - CHECK Constraints; + - Default Constraints; + - User Defined Data Type & User Defined Table Type + - DDL Triggers; + - Synonyms; + - In-Memory table + - System versioning (Temporal type) + - Permissions; + - User and Roles; + - Database properties; + - SQL Server properties. + + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -5749,6 +6192,32 @@ Write queries, visualize data, and share your results. [SysKit Pulse]:https://www.syskit.com/products/insights-lite [WhatsUp SQL Server Monitor]:https://www.ipswitch.com/resources/free-tools/whatsup-sql-server-monitor [POPSQL]:https://popsql.com/ +[ApexSQL Search]:https://www.apexsql.com/sql-tools-search.aspx +[ApexSQL Source Control]:https://www.apexsql.com/sql-tools-source-control.aspx +[Azure Blob Studio 2011]:https://marketplace.visualstudio.com/items?itemName=AlessandroDelSoleMVP.AzureBlobStudio2011 +[Azure Explorer]:https://monzacloud.com/azure-cloud-explorer +[Azure SQL Agent]:https://www.npmjs.com/package/azure-sql-agent +[Azure SQL Database DTU Calculator]:https://dtucalculator.azurewebsites.net +[Azure SQL Database Stress Test Tool]:https://github.com/kiyoaki/AzurePerformanceTesting +[Azure SQL Dev Cloner]:https://github.com/cleanchoice/azure-sql-dev-cloner +[Azure User Management Console]:https://www.openhub.net/p/aumc +[CloudMonix SQL Azure Database Management]:https://cloudmonix.com/features/azure-management/sql-azure-database-monitoring +[DB Ghost Change Manager Professional]:http://www.dbghost.com/products/ChangeManager.aspx +[dbForge Complete]:https://www.devart.com/dbforge/sql/sqlcomplete +[dbForge SQL Azure Backup]:https://www.devart.com/dbforge/sql/sqlazurebackup +[Elastic database tools]:https://docs.microsoft.com/en-us/azure/azure-sql/database/elastic-scale-get-started +[Microsoft Sync Framework]:https://www.microsoft.com/en-us/download/details.aspx?id=23217 +[MSSQL-Maestro]:https://www.sqlmaestro.com/products/mssql/maestro/about +[MSSQLMerge]:https://db-merge-tools.net/microsoft-sql-server-diff-merge-overview.html +[SQL Backup and FTP]:https://sqlbackupandftp.com +[SQL Bak]:https://sqlbak.com +[SQL Bulk Tools]:https://github.com/olegil/SqlBulkTools +[SQL Data Examiner]:https://www.sqlaccessories.com/sql-data-examiner +[SQL Examiner]:https://www.sqlaccessories.com/sql-examiner +[SQL Database Backup]:https://github.com/richorama/SQLDatabaseBackup +[SQL Database Copy]:https://github.com/ryanovic/SqlDatabaseCopy +[SQL Delta Duo for SQL Server]:https://sqldelta.com/products +[SQL Trace Replay]:https://github.com/mikhailshilkov/sql-trace-replay [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 77650b869147f8384d2bf9ac5e5ff03c6599015f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 15 Sep 2020 16:53:43 +0300 Subject: [PATCH 084/553] Add new article --- Articles/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Articles/README.md b/Articles/README.md index b7325667..0cf8bb53 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -2408,3 +2408,4 @@ Articles types: [Guid vs INT - Which is better as a primary key?]:https://dba.stackexchange.com/q/264/107045 [Control SQL Jobs based on HADR Role – Taking it to the Next Level]:https://eitanblumin.com/2020/05/26/sql-jobs-based-on-hadr-role-next-level/ [SQL Friday #16: Eitan Blumin on “How to HADR Your SQL Jobs”]:https://sqlfriday.net/past-sql-friday-sessions/sql-friday-16-eitan-blumin-on-how-to-hadr-your-sql-jobs/ +[Choosing the Correct Azure VM Size for Your Workload]:https://www.sentryone.com/blog/choosing-the-correct-azure-vm-size-for-your-workload From 8ee83fde806657e01e5bddb2b8fa942b6d24e69a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 16 Sep 2020 16:54:20 +0300 Subject: [PATCH 085/553] Add SQL Database Projects extension ADS extension --- ADS/README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/ADS/README.md b/ADS/README.md index 3ad921c5..fc138499 100644 --- a/ADS/README.md +++ b/ADS/README.md @@ -22,21 +22,22 @@ ## Azure Data Studio extensions -| Extension | Repository Link | Release Date | Version | .vsix download link | Description | -|---------------------------------------|-----------------|--------------|----------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| -| [SQL Server Import] | [Github][1] | 2020-05-15 | 0.15.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2131183) | Streamlines the data import process by providing a wizard that simplifies copying flat files (`.csv`, `.txt`, `.json`) into a SQL Server table | -| [PostgreSQL extension (preview)] | [Github][2] | 2020-03-26 | 0.2.6 | [GO](https://go.microsoft.com/fwlink/?linkid=2099772) | Enables users to connect, query, and manage Postgres databases with Azure Data Studio | -| [Query Editor Boost][3] | [Github][3] | 2020-02-17 | 0.4.1 | [Github][https://github.com/dzsquared/query-editor-boost/releases/latest] | This extension adds several features helpful with query writing in Azure Data Studio | -| [SQL Server Dacpac] | [Github][1] | 2020-06-04 | 1.5.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099885) | Provides an easy-to-use wizarding experience to deploy and extract [`.dacpac`] files and import and export `.bacpac` files | -| [SQL Server Profiler] | [Github][1] | 2019-12-18 | 0.11.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099574) | Provides a simple SQL Server tracing solution similar to SSMS Profiler, allowing users to create and manage traces and analyze and replay trace results | -| [SQL Server Agent] | [Github][1] | 2020-04-16 | 0.47.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099884) | Helps manage and troubleshoot SQL Server Agent jobs and configuration (early preview) | -| SQL Server Admin Pack | [Github][1] | 2019-03-14 | 0.0.2 | [GO](https://go.microsoft.com/fwlink/?linkid=2099889) | A collection of popular database administration extensions to help manage SQL Server | -| [SQL Server Schema Compare] | [Github][1] | 2020-06-17 | 1.5.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099886) | Provides an easy-to-use experience to compare the schemas from [`.dacpac`] files and databases and apply the changes from source to target | -| [PowerShell Extension] | [Github][6] | 2020-04-15 | 2020.4.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099773) | Provides rich PowerShell language support for Azure Data Studio | -| [SandDance for Azure Data Studio] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix](https://github.com/microsoft/SandDance/releases/latest) | Provides interactive visualizations that help users explore, understand, and present their data | -| [SandDance for VSCode][8] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix][8] | Provides interactive visualizations that help users explore, understand, and present their data for `.csv` or `.tsv` files | -| [Server Reports][1] | [Github][1] | 2020-04-27 | 0.2.2 | [GO][https://go.microsoft.com/fwlink/?linkid=2099768] | Provides useful information about the server's performance, such as: DB Space Usage, DB Buffer Usage, CPU Utilization, Backup Growth Trend | -| [whoisactive][1] | [Github][1] | 2020-04-27 | 0.1.4 | [GO][https://go.microsoft.com/fwlink/?linkid=2099774] | Displays insights from sp_whoisactive, a useful tool for activity monitoring and troubleshooting, as graphs and tasks inside an Azure Data Studio | +| Extension | Repository Link | Release Date | Version | .vsix download link | Description | +|---------------------------------------|-----------------|--------------|----------|---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| [SQL Server Import] | [Github][1] | 2020-05-15 | 0.15.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2131183) | Streamlines the data import process by providing a wizard that simplifies copying flat files (`.csv`, `.txt`, `.json`) into a SQL Server table | +| [PostgreSQL extension (preview)] | [Github][2] | 2020-03-26 | 0.2.6 | [GO](https://go.microsoft.com/fwlink/?linkid=2099772) | Enables users to connect, query, and manage Postgres databases with Azure Data Studio | +| [Query Editor Boost][3] | [Github][3] | 2020-02-17 | 0.4.1 | [Github][https://github.com/dzsquared/query-editor-boost/releases/] | This extension adds several features helpful with query writing in Azure Data Studio | +| [SQL Server Dacpac] | [Github][1] | 2020-06-04 | 1.5.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099885) | Provides an easy-to-use wizarding experience to deploy and extract [`.dacpac`] files and import and export `.bacpac` files | +| [SQL Server Profiler] | [Github][1] | 2019-12-18 | 0.11.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099574) | Provides a simple SQL Server tracing solution similar to SSMS Profiler, allowing users to create and manage traces and analyze and replay trace results | +| [SQL Server Agent] | [Github][1] | 2020-04-16 | 0.47.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099884) | Helps manage and troubleshoot SQL Server Agent jobs and configuration (early preview) | +| SQL Server Admin Pack | [Github][1] | 2019-03-14 | 0.0.2 | [GO](https://go.microsoft.com/fwlink/?linkid=2099889) | A collection of popular database administration extensions to help manage SQL Server | +| [SQL Server Schema Compare] | [Github][1] | 2020-06-17 | 1.5.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099886) | Provides an easy-to-use experience to compare the schemas from [`.dacpac`] files and databases and apply the changes from source to target | +| [PowerShell Extension] | [Github][6] | 2020-04-15 | 2020.4.0 | [GO](https://go.microsoft.com/fwlink/?linkid=2099773) | Provides rich PowerShell language support for Azure Data Studio | +| [SandDance for Azure Data Studio] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix](https://github.com/microsoft/SandDance/releases/latest) | Provides interactive visualizations that help users explore, understand, and present their data | +| [SandDance for VSCode][8] | [Github][7] | 2020-06-24 | 3.0.0 | [Vsix][8] | Provides interactive visualizations that help users explore, understand, and present their data for `.csv` or `.tsv` files | +| [Server Reports][1] | [Github][1] | 2020-04-27 | 0.2.2 | [GO][https://go.microsoft.com/fwlink/?linkid=2099768] | Provides useful information about the server's performance, such as: DB Space Usage, DB Buffer Usage, CPU Utilization, Backup Growth Trend | +| [whoisactive][1] | [Github][1] | 2020-04-27 | 0.1.4 | [GO][https://go.microsoft.com/fwlink/?linkid=2099774] | Displays insights from sp_whoisactive, a useful tool for activity monitoring and troubleshooting, as graphs and tasks inside an Azure Data Studio | +| [SQL Database Projects extension] | [Github][1] | 2020-04-27 | 0.3.0 | [GO][https://go.microsoft.com/fwlink/?linkid=2143820] | Extension for developing SQL databases in a project-based development environment | ## Azure Data Studio Articles @@ -64,6 +65,7 @@ [SQL Server Compare]:https://docs.microsoft.com/en-us/sql/azure-data-studio/schema-compare-extension [PowerShell Extension]:https://docs.microsoft.com/en-us/sql/azure-data-studio/powershell-extension [SandDance for Azure Data Studio]:https://docs.microsoft.com/en-us/sql/azure-data-studio/sanddance-extension +[SQL Database Projects extension]:https://docs.microsoft.com/en-gb/sql/azure-data-studio/extensions/sql-database-project-extension [Integrating Azure Data Studio with Git and GitHub]:https://www.sqlshack.com/integrating-azure-data-studio-with-git-and-github/ [Working with Git components in Azure Data Studio]:https://www.sqlshack.com/working-with-git-components-in-azure-data-studio/ From 3562fb60f858a855b52d7653ada0d4080b2a3c11 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 17 Sep 2020 13:46:09 +0300 Subject: [PATCH 086/553] Add new articles --- Articles/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0cf8bb53..fb028883 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1217,6 +1217,9 @@ Articles types: | [Guid vs INT - Which is better as a primary key?] | Sandeep Kumar M | 2011-01-05 | [DBA][DEV] | | [Control SQL Jobs based on HADR Role – Taking it to the Next Level] | Eitan Blumin | 2020-05-26 | [DBA][J] | | [SQL Friday #16: Eitan Blumin on “How to HADR Your SQL Jobs”] | Eitan Blumin | 2020-07-31 | [DBA][J] | +| [Choosing the Correct Azure VM Size for Your Workload] | Eric Smith | 2020-09-09 | [AZ][DBA] | +| [Table Partitioning in SQL Server – The Basics] | Cathrine Wilhelmsen | 2015-04-12 | [AZ][DBA] | +| [Table Partitioning in SQL Server – Partition Switching] | Cathrine Wilhelmsen | 2015-04-19 | [AZ][DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2409,3 +2412,5 @@ Articles types: [Control SQL Jobs based on HADR Role – Taking it to the Next Level]:https://eitanblumin.com/2020/05/26/sql-jobs-based-on-hadr-role-next-level/ [SQL Friday #16: Eitan Blumin on “How to HADR Your SQL Jobs”]:https://sqlfriday.net/past-sql-friday-sessions/sql-friday-16-eitan-blumin-on-how-to-hadr-your-sql-jobs/ [Choosing the Correct Azure VM Size for Your Workload]:https://www.sentryone.com/blog/choosing-the-correct-azure-vm-size-for-your-workload +[Table Partitioning in SQL Server – The Basics]:https://www.cathrinewilhelmsen.net/2015/04/12/table-partitioning-in-sql-server/ +[Table Partitioning in SQL Server – Partition Switching]:https://www.cathrinewilhelmsen.net/2015/04/19/table-partitioning-in-sql-server-partition-switching/ From a6cbe415f98de7b0bd84b7029e2bd3ff9a0106e1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 18 Sep 2020 13:52:41 +0300 Subject: [PATCH 087/553] Add ColumnScore link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 20bb6e90..ced279f6 100644 --- a/README.md +++ b/README.md @@ -440,6 +440,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [csv to INSERT online converter - translates your tab-delimited data into a T-SQL INSERT statement](https://table.strd.co/) (by Structured Concepts AB) - [SQL Server Diagrams](http://www.e-squillace.com/techdiagrams-sqlserver/) (by George Squillace) - [New Stars of Data 2020 Presentations](https://github.com/SQLGrillen/NSOD-1) (by SQLGrillen) + - [Get Your ColumnScore](https://columnscore.com) (by ColumnScore) **[⬆ back to top](#table-of-contents)** From 2aa5108ae6f4f9ea8c313be617ec229e2dd12e8a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 19 Sep 2020 13:56:41 +0300 Subject: [PATCH 088/553] Add new awesome tempdb article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fb028883..ed3a2cd9 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1220,6 +1220,7 @@ Articles types: | [Choosing the Correct Azure VM Size for Your Workload] | Eric Smith | 2020-09-09 | [AZ][DBA] | | [Table Partitioning in SQL Server – The Basics] | Cathrine Wilhelmsen | 2015-04-12 | [AZ][DBA] | | [Table Partitioning in SQL Server – Partition Switching] | Cathrine Wilhelmsen | 2015-04-19 | [AZ][DBA] | +| [TempDB in SQL Server] | SentryOne | 2020-09-15 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2414,3 +2415,4 @@ Articles types: [Choosing the Correct Azure VM Size for Your Workload]:https://www.sentryone.com/blog/choosing-the-correct-azure-vm-size-for-your-workload [Table Partitioning in SQL Server – The Basics]:https://www.cathrinewilhelmsen.net/2015/04/12/table-partitioning-in-sql-server/ [Table Partitioning in SQL Server – Partition Switching]:https://www.cathrinewilhelmsen.net/2015/04/19/table-partitioning-in-sql-server-partition-switching/ +[TempDB in SQL Server]:https://www.sentryone.com/tempdb-in-sql-server From a62e537800122f5e7d019f51fb98691226da65d0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 20 Sep 2020 14:34:21 +0300 Subject: [PATCH 089/553] Add awesome Error and Transaction Handling articles --- Articles/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index ed3a2cd9..0b226a4e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -44,7 +44,9 @@ Articles types: | [How to share data between stored procedures] | Erland Sommarskog | 2013-11-02 | | | [Arrays and Lists in SQL Server 2008] | Erland Sommarskog | 2016-08-21 | | | [Giving Permissions through Stored Procedures] | Erland Sommarskog | 2011-12-31 | | -| [Error and Transaction Handling in SQL Server] | Erland Sommarskog | 2015-05-03 | | +| [Error and Transaction Handling in SQL Server Part One – Jumpstart Error Handling] | Erland Sommarskog | 2015-05-03 | [DBA][DEV] | +| [Error and Transaction Handling in SQL Server Part Two – Commands and Mechanisms] | Erland Sommarskog | 2019-09-03 | [DBA][DEV] | +| [Error and Transaction Handling in SQL Server Part Three – Implementation] | Erland Sommarskog | 2017-05-03 | [DBA][DEV] | | [Using the Bulk-Load Tools in SQL Server] | Erland Sommarskog | 2016-12-08 | | | [Using Table-Valued Parameters in SQL Server and .NET] | Erland Sommarskog | 2016-12-08 | | | [SQL Server Columnstore Articles] | Niko Neugebauer | 2016-05-09 | | @@ -1238,7 +1240,9 @@ Articles types: [How to share data between stored procedures]:http://www.sommarskog.se/share_data.html [Arrays and Lists in SQL Server 2008]:http://www.sommarskog.se/arrays-in-sql-2008.html [Giving Permissions through Stored Procedures]:http://www.sommarskog.se/grantperm.html -[Error and Transaction Handling in SQL Server]:http://www.sommarskog.se/error_handling/Part1.html +[Error and Transaction Handling in SQL Server Part One – Jumpstart Error Handling]:http://www.sommarskog.se/error_handling/Part1.html +[Error and Transaction Handling in SQL Server Part Two – Commands and Mechanisms]:http://www.sommarskog.se/error_handling/Part2.html +[Error and Transaction Handling in SQL Server Part Three – Implementation]:http://www.sommarskog.se/error_handling/Part3.html [Using the Bulk-Load Tools in SQL Server]:http://www.sommarskog.se/bulkload.html [Using Table-Valued Parameters in SQL Server and .NET]:http://www.sommarskog.se/arrays-in-sql-2008.html [SQL Server Columnstore Articles]:http://www.nikoport.com/columnstore/ From 259450f9cdd23740bacd8c0945065f8e0f546469 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 21 Sep 2020 16:06:25 +0300 Subject: [PATCH 090/553] Fix wrong article name --- Articles/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 0b226a4e..970eddf6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -43,7 +43,7 @@ Articles types: | [Slow in the Application, Fast in SSMS] | Erland Sommarskog | 2013-12-18 | | | [How to share data between stored procedures] | Erland Sommarskog | 2013-11-02 | | | [Arrays and Lists in SQL Server 2008] | Erland Sommarskog | 2016-08-21 | | -| [Giving Permissions through Stored Procedures] | Erland Sommarskog | 2011-12-31 | | +| [Packaging Permissions in Stored Procedures] | Erland Sommarskog | 2011-12-31 | | | [Error and Transaction Handling in SQL Server Part One – Jumpstart Error Handling] | Erland Sommarskog | 2015-05-03 | [DBA][DEV] | | [Error and Transaction Handling in SQL Server Part Two – Commands and Mechanisms] | Erland Sommarskog | 2019-09-03 | [DBA][DEV] | | [Error and Transaction Handling in SQL Server Part Three – Implementation] | Erland Sommarskog | 2017-05-03 | [DBA][DEV] | @@ -1239,7 +1239,7 @@ Articles types: [Slow in the Application, Fast in SSMS]:http://www.sommarskog.se/query-plan-mysteries.html [How to share data between stored procedures]:http://www.sommarskog.se/share_data.html [Arrays and Lists in SQL Server 2008]:http://www.sommarskog.se/arrays-in-sql-2008.html -[Giving Permissions through Stored Procedures]:http://www.sommarskog.se/grantperm.html +[Packaging Permissions in Stored Procedures]:http://www.sommarskog.se/grantperm.html [Error and Transaction Handling in SQL Server Part One – Jumpstart Error Handling]:http://www.sommarskog.se/error_handling/Part1.html [Error and Transaction Handling in SQL Server Part Two – Commands and Mechanisms]:http://www.sommarskog.se/error_handling/Part2.html [Error and Transaction Handling in SQL Server Part Three – Implementation]:http://www.sommarskog.se/error_handling/Part3.html From 512f4bce761814c084b78aa6fe3c4c636b3822ae Mon Sep 17 00:00:00 2001 From: MikeyBronowski Date: Mon, 21 Sep 2020 21:02:37 +0100 Subject: [PATCH 091/553] DMVs update for 2020-09 --- ...atabase Diagnostic Information Queries.sql | 42 +-- ...nstance Diagnostic Information Queries.sql | 29 +- ...er 2005 Diagnostic Information Queries.sql | 36 +-- ...er 2008 Diagnostic Information Queries.sql | 18 +- ...2008 R2 Diagnostic Information Queries.sql | 25 +- ...er 2012 Diagnostic Information Queries.sql | 141 ++++++---- ...er 2014 Diagnostic Information Queries.sql | 222 +++++++++------- ...016 SP1 Diagnostic Information Queries.sql | 241 ++++++++++------- ...016 SP2 Diagnostic Information Queries.sql | 222 +++++++++------- ...er 2017 Diagnostic Information Queries.sql | 248 ++++++++++-------- ...er 2019 Diagnostic Information Queries.sql | 148 +++++++---- 11 files changed, 796 insertions(+), 576 deletions(-) diff --git a/Scripts/Azure SQL Database Diagnostic Information Queries.sql b/Scripts/Azure SQL Database Diagnostic Information Queries.sql index 47db653a..c04f7cd8 100644 --- a/Scripts/Azure SQL Database Diagnostic Information Queries.sql +++ b/Scripts/Azure SQL Database Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- Azure SQL Database Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- If you like PowerShell, there is a very useful community solution for running these queries in an automated fashion @@ -89,14 +89,19 @@ ORDER BY avg_io_stall_ms DESC OPTION (RECOMPILE); -- Get I/O utilization by database (Query 5) (IO Usage By Database) WITH Aggregate_IO_Statistics -AS -(SELECT DB_NAME(database_id) AS [Database Name], -CAST(SUM(num_of_bytes_read + num_of_bytes_written)/1048576 AS DECIMAL(12, 2)) AS io_in_mb -FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS [DM_IO_STATS] -GROUP BY database_id) -SELECT ROW_NUMBER() OVER(ORDER BY io_in_mb DESC) AS [I/O Rank], [Database Name], - CAST(io_in_mb/ SUM(io_in_mb) OVER() * 100.0 AS DECIMAL(5,2)) AS [I/O Percent], - io_in_mb AS [Total I/O (MB)] +AS (SELECT DB_NAME(database_id) AS [Database Name], + CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], + CAST(SUM(num_of_bytes_read ) / 1048576 AS DECIMAL(12, 2)) AS [ioReadMB], + CAST(SUM(num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioWriteMB] + FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS [DM_IO_STATS] + GROUP BY database_id) +SELECT ROW_NUMBER() OVER (ORDER BY ioTotalMB DESC) AS [I/O Rank], + [Database Name], ioTotalMB AS [Total I/O (MB)], + CAST(ioTotalMB / SUM(ioTotalMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Total I/O %], + ioReadMB AS [Read I/O (MB)], + CAST(ioReadMB / SUM(ioReadMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Read I/O %], + ioWriteMB AS [Write I/O (MB)], + CAST(ioWriteMB / SUM(ioWriteMB) OVER () * 100.0 AS DECIMAL(5, 2)) AS [Write I/O %] FROM Aggregate_IO_Statistics ORDER BY [I/O Rank] OPTION (RECOMPILE); ------ @@ -203,7 +208,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isn’t what you think… -- https://bit.ly/2EgynLa @@ -1238,13 +1243,13 @@ SELECT DATABASEPROPERTYEX (DB_NAME(DB_ID()), 'Edition') AS [Database Edition], -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries – Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries – Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries – Part 3 -- https://bit.ly/2FIlCPb @@ -1253,7 +1258,4 @@ SELECT DATABASEPROPERTYEX (DB_NAME(DB_ID()), 'Edition') AS [Database Edition], -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn --- https://bit.ly/2O0Hacc - - - +-- https://bit.ly/2O0Hacc \ No newline at end of file diff --git a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql index 6db0503c..62e8a0a0 100644 --- a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql +++ b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Managed Instance Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- If you like PowerShell, there is a very useful community solution for running these queries in an automated fashion @@ -826,7 +826,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1300,7 +1300,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 53) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1312,12 +1312,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1660,13 +1665,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1675,6 +1680,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn --- https://bit.ly/2O0Hacc - - +-- https://bit.ly/2O0Hacc \ No newline at end of file diff --git a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql index caab0703..bfa8b17e 100644 --- a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2005 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -668,7 +668,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1149,28 +1149,6 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi @@ -1178,6 +1156,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX - - +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql index 7b8e5ec4..7a8f828f 100644 --- a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2008 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -770,7 +770,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- http://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1301,13 +1301,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1319,4 +1319,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql index fe4c973c..2bbc218b 100644 --- a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2008 R2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: February 26, 2020 +-- Last Modified: September 1, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Many of these queries will not work if you have databases in 80 compatibility mode -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -833,7 +833,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1144,7 +1144,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 54) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1156,12 +1156,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1383,13 +1388,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb diff --git a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql index d8a51652..93327ae8 100644 --- a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2012 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 13, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -160,7 +160,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'detected', N'socket'; -- New in SQL Server 2012 SP4 - -- Get selected server properties (Query 3) (Server Properties) SELECT SERVERPROPERTY('MachineName') AS [MachineName], SERVERPROPERTY('ServerName') AS [ServerName], @@ -261,15 +260,12 @@ EXEC sys.xp_readerrorlog 0, 1, N'Database Instant File Initialization'; -- Lets you determine whether Instant File Initialization (IFI) is enabled for the instance -- This should be enabled in the vast majority of cases +-- Note: This query won't return any results if the SQL Server error log has been recycled -- (Added in SQL Server 2012 SP4) -- Database Instant File Initialization -- https://bit.ly/2nTX74y --- Misconceptions around instant file initialization --- https://bit.ly/2oBSKgZ - - -- SQL Server Process Address space info (Query 7) (Process Memory) -- (shows whether locked pages is enabled, among other things) @@ -312,11 +308,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -363,7 +364,8 @@ FROM msdb.dbo.sysalerts WITH (NOLOCK) ORDER BY name OPTION (RECOMPILE); ------ --- Gives you some basic information about your SQL Server Agent Alerts (which are different from SQL Server Agent jobs) +-- Gives you some basic information about your SQL Server Agent Alerts +-- (which are different from SQL Server Agent jobs) -- Read more about Agent Alerts here: https://bit.ly/2v5YR37 @@ -416,8 +418,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -472,8 +474,29 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs +-- Good overview of AG health and status (Query 17) (AG Status) +SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], + drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, + drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, + drs.last_sent_time, drs.last_received_lsn, drs.last_received_time, drs.last_hardened_lsn, + drs.last_hardened_time, drs.last_redone_lsn, drs.last_redone_time, drs.log_send_queue_size, + drs.log_send_rate, drs.redo_queue_size, drs.redo_rate, drs.filestream_send_rate, + drs.end_of_log_lsn, drs.last_commit_lsn, drs.last_commit_time, drs.database_state_desc +FROM sys.dm_hadr_database_replica_states AS drs WITH (NOLOCK) +INNER JOIN sys.availability_databases_cluster AS adc WITH (NOLOCK) +ON drs.group_id = adc.group_id +AND drs.group_database_id = adc.group_database_id +INNER JOIN sys.availability_groups AS ag WITH (NOLOCK) +ON ag.group_id = drs.group_id +INNER JOIN sys.availability_replicas AS ar WITH (NOLOCK) +ON drs.group_id = ar.group_id +AND drs.replica_id = ar.replica_id +ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE); + +-- You will see no results if your instance is not using AlwaysOn AGs + --- Hardware information from SQL Server 2012 (Query 17) (Hardware Info) +-- Hardware information from SQL Server 2012 (Query 18) (Hardware Info) SELECT cpu_count AS [Logical CPU Count], scheduler_count, hyperthread_ratio AS [Hyperthread Ratio], cpu_count/hyperthread_ratio AS [Physical CPU Count], @@ -497,7 +520,7 @@ FROM sys.dm_os_sys_info WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2pczOYs --- Get System Manufacturer and model number from SQL Server Error log (Query 18) (System Manufacturer) +-- Get System Manufacturer and model number from SQL Server Error log (Query 19) (System Manufacturer) EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; ------ @@ -507,16 +530,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - -- Get BIOS date from Windows Registry (Query 20) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -541,6 +554,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste + -- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) @@ -629,7 +643,6 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); -- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -672,6 +685,13 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + + -- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], @@ -692,6 +712,10 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + + -- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); @@ -782,8 +806,7 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -801,7 +824,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -840,6 +863,8 @@ DROP TABLE #VLFCountResults; -- and they can make full database restores and crash recovery take much longer -- Try to keep your VLF counts under 200 in most cases (depending on log file size) +-- SQL Server Transaction Log Architecture and Management Guide +-- https://bit.ly/2JjmQRZ -- Get CPU utilization by database (Query 34) (CPU Usage by Database) @@ -1086,7 +1111,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1113,7 +1138,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1168,7 +1193,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- Enabling forced parameterization for the database can help, but test first! -- Plan cache, adhoc workloads and clearing the single-use plan cache bloat --- https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/ +-- https://bit.ly/2EfYOkl -- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) @@ -1185,7 +1210,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1208,7 +1233,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1279,7 +1304,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1290,14 +1315,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 50 through 55 are the "Bad Man List" for stored procedures +-- Queries 52 through 57 are the "Bad Man List" for stored procedures + -- Top Cached SPs By Execution Count (Query 52) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1312,6 +1338,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities -- Top Cached SPs By Avg Elapsed Time (Query 53) (SP Avg Elapsed Time) @@ -1320,6 +1347,7 @@ qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_c ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1342,7 +1370,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1364,7 +1392,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1385,7 +1413,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1409,7 +1437,7 @@ SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrit qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1493,13 +1521,13 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 61) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], - cp.objtype, cp.usecounts, cp.size_in_bytes, query_plan + cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan FROM sys.dm_exec_cached_plans AS cp WITH (NOLOCK) CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) AS qp WHERE CAST(query_plan AS NVARCHAR(MAX)) LIKE N'%MissingIndex%' @@ -1513,7 +1541,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 62) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1525,12 +1553,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1580,8 +1613,8 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); -- When were Statistics last updated on all indexes? (Query 65) (Statistics Update) -SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.NAME AS [Object Name], o.type_desc AS [Object Type], - i.name AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], +SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.[NAME] AS [Object Name], o.[type_desc] AS [Object Type], + i.[name] AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], s.auto_created, s.no_recompute, s.user_created, s.is_temporary, st.row_count, st.used_page_count FROM sys.objects AS o WITH (NOLOCK) @@ -1604,6 +1637,10 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); -- sys.stats (Transact-SQL) -- https://msdn.microsoft.com/en-us/library/ms177623.aspx +-- UPDATEs to Statistics (Erin Stellato) +-- https://bit.ly/2vhrYQy + + -- Look at most frequently modified indexes and statistics (Query 66) (Volatile Indexes) @@ -1738,13 +1775,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1756,4 +1793,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql index faa7f755..61408164 100644 --- a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2014 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 13, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server! @@ -250,10 +250,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Database Instant File Initialization'; -- Database Instant File Initialization -- https://bit.ly/2nTX74y --- Misconceptions around instant file initialization --- https://bit.ly/2oBSKgZ - - -- SQL Server Process Address space info (Query 7) (Process Memory) -- (shows whether locked pages is enabled, among other things) @@ -296,11 +292,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -401,8 +402,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -457,7 +458,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 17) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 17) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -502,15 +503,6 @@ FROM sys.dm_os_sys_info WITH (NOLOCK) OPTION (RECOMPILE); -- sys.dm_os_sys_info (Transact-SQL) -- https://bit.ly/2pczOYs --- Soft NUMA configuration was a new column for SQL Server 2016 --- OFF = Soft-NUMA feature is OFF --- ON = SQL Server automatically determines the NUMA node sizes for Soft-NUMA --- MANUAL = Manually configured soft-NUMA - --- Configure SQL Server to Use Soft-NUMA (SQL Server) --- https://bit.ly/2HTpKJt - - -- Get System Manufacturer and model number from SQL Server Error log (Query 19) (System Manufacturer) EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; @@ -522,16 +514,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 20) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - --- Get BIOS date from Windows Registry (Query 21) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 20) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -539,7 +522,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 22) (Processor Description) +-- Get processor description from Windows Registry (Query 21) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -556,7 +539,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 23) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -570,7 +553,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 24) (Suspect Pages) +-- Look at Suspect Pages table (Query 23) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -593,7 +576,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 25) (Tempdb Data Files) +-- Get number of data files in tempdb database (Query 24) (Tempdb Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -603,7 +586,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This will be blank unless you have Service Pack 2 or later --- File names and paths for all user and system databases on instance (Query 26) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -623,7 +606,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Volume info for all LUNS that have database files on the current instance (Query 27) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -643,8 +626,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 28) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 27) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -687,8 +669,15 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 29) (IO Latency by File) +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + + + +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -708,8 +697,11 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 30) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -745,7 +737,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 31) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -761,7 +753,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 32) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -799,10 +791,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); --- Missing Indexes for all databases by Index Advantage (Query 33) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -820,14 +811,14 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N --- Get VLF Counts for all databases on the instance (Query 34) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) -- (adapted from Michelle Ufford) CREATE TABLE #VLFInfo (RecoveryUnitID int, FileID int, FileSize bigint, StartOffset bigint, @@ -867,7 +858,8 @@ DROP TABLE #VLFCountResults; --- Get CPU utilization by database (Query 35) (CPU Usage by Database) + +-- Get CPU utilization by database (Query 34) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -888,7 +880,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 36) (IO Usage By Database) +-- Get I/O utilization by database (Query 35) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -912,7 +904,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 37) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -934,7 +926,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1006,7 +998,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1024,7 +1016,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1045,7 +1037,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 41) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 40) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1074,7 +1066,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1099,7 +1091,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1112,7 +1104,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1127,7 +1119,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1139,11 +1131,11 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1154,7 +1146,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1176,7 +1168,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1197,7 +1189,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1211,7 +1203,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1225,7 +1217,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1234,7 +1226,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1255,7 +1247,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 49) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1274,7 +1266,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- Make sure the transaction log is not full!! --- Log space usage for current database (Query 51) (Log Space Usage) +-- Log space usage for current database (Query 50) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1289,8 +1281,11 @@ OPTION (RECOMPILE); -- Look at log file size and usage, along with the log reuse wait description for the current database +-- sys.dm_db_log_space_usage (Transact-SQL) +-- https://bit.ly/2H4MQw9 + --- I/O Statistics by file for the current database (Query 52) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 51) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1313,7 +1308,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 53) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 52) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1321,7 +1316,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1332,15 +1327,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 54 through 59 are the "Bad Man List" for stored procedures +-- Queries 53 through 59 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 55) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 53) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1355,15 +1350,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 56) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 54) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1381,12 +1377,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 57) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 55) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1403,12 +1399,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 58) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 56) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1425,11 +1421,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 59) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 57) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1447,13 +1443,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 60) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 58) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1471,7 +1467,32 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure --- Lists the top statements by average input/output usage for the current database (Query 61) (Top IO Statements) + +-- Cached SPs Missing Indexes by Execution Count (Query 59) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + +-- Lists the top statements by average input/output usage for the current database (Query 60) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], SUBSTRING(qt.[text],qs.statement_start_offset/2, @@ -1490,7 +1511,7 @@ ORDER BY [Avg IO] DESC OPTION (RECOMPILE); --- Possible Bad NC Indexes (writes > reads) (Query 62) (Bad NC Indexes) +-- Possible Bad NC Indexes (writes > reads) (Query 61) (Bad NC Indexes) SELECT SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(s.[object_id]) AS [Table Name], i.name AS [Index Name], i.index_id, @@ -1516,7 +1537,7 @@ ORDER BY [Difference] DESC, [Total Writes] DESC, [Total Reads] ASC OPTION (RECOM -- Investigate further before dropping an index! --- Missing Indexes for current database by Index Advantage (Query 63) (Missing Indexes) +-- Missing Indexes for current database by Index Advantage (Query 62) (Missing Indexes) SELECT DISTINCT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], migs.last_user_seek, mid.[statement] AS [Database.Schema.Table], mid.equality_columns, mid.inequality_columns, mid.included_columns, @@ -1537,11 +1558,10 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query - +-- Hkan Winther has given me some great suggestions for this query --- Find missing index warnings for cached plans in the current database (Query 64) (Missing Index Warnings) +-- Find missing index warnings for cached plans in the current database (Query 63) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan @@ -1558,7 +1578,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 64) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1570,12 +1590,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1656,6 +1681,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); + -- Look at most frequently modified indexes and statistics (Query 68) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, @@ -1825,13 +1851,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1843,4 +1869,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql index 4e46c138..62cdcb8b 100644 --- a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2016 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 13, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -92,6 +92,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5598.27 SP2 CU11 12/9/2019 -- 13.0.5698.0 SP2 CU12 2/25/2020 -- 13.0.5820.21 SP2 CU13 5/28/2020 +-- 13.0.5830.85 SP2 CU14 8/6/2020 -- How to determine the version, edition and update level of SQL Server and its components -- https://bit.ly/2oAjKgW @@ -194,6 +195,10 @@ ORDER BY name OPTION (RECOMPILE); -- priority boost (should be zero) -- remote admin connections (should be 1) + +-- sys.configurations (Transact-SQL) +-- https://bit.ly/2HsyDZI + -- New configuration options for SQL Server 2016 -- allow polybase export (Allow INSERT into a Hadoop external table) -- automatic soft-NUMA disabled (Automatic soft-NUMA is enabled by default) @@ -231,7 +236,7 @@ DBCC TRACESTATUS (-1); -- This allows a database to become online and queries to be executed before the Query Store has been fully recovered -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -271,7 +276,7 @@ FROM sys.dm_os_process_memory WITH (NOLOCK) OPTION (RECOMPILE); -- SQL Server Services information (Query 7) (SQL Server Services Info) SELECT servicename, process_id, startup_type_desc, status_desc, last_startup_time, service_account, is_clustered, cluster_nodename, [filename], -instant_file_initialization_enabled -- New in SQL Server 2016 SP1 +instant_file_initialization_enabled FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -288,11 +293,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -332,7 +342,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -395,8 +404,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -451,7 +460,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -472,7 +481,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -524,17 +533,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -542,7 +541,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -559,7 +558,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -573,7 +572,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -596,7 +595,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -605,7 +604,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -625,7 +624,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 25) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -645,8 +644,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 26) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -689,8 +687,14 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 27) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -710,8 +714,11 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 28) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -747,7 +754,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 29) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -763,7 +770,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 30) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -773,7 +780,7 @@ db.[compatibility_level] AS [DB Compatibility Level], db.is_mixed_page_allocation_on, db.page_verify_option_desc AS [Page Verify Option], db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_async_on, db.is_parameterization_forced, db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, -db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.is_encrypted, +db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, db.is_query_store_on, db.is_sync_with_backup, @@ -814,10 +821,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 31) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -835,14 +841,14 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N --- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 32) (VLF Counts) -- (adapted from Michelle Ufford) CREATE TABLE #VLFInfo (RecoveryUnitID int, FileID int, FileSize bigint, StartOffset bigint, @@ -883,7 +889,7 @@ DROP TABLE #VLFCountResults; --- Get CPU utilization by database (Query 34) (CPU Usage by Database) +-- Get CPU utilization by database (Query 33) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -904,7 +910,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 35) (IO Usage By Database) +-- Get I/O utilization by database (Query 34) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -928,7 +934,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 35) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -950,7 +956,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 36) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1033,7 +1039,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 37) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1051,7 +1057,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 38) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1072,7 +1078,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 40) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 39) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1101,7 +1107,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 40) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1126,7 +1132,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 41) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1139,7 +1145,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1154,7 +1160,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 42) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1166,11 +1172,11 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 43) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1181,7 +1187,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 44) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1201,9 +1207,12 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); -- CACHESTORE_OBJCP Object Plans -- These are compiled plans for stored procedures, functions and triggers +-- sys.dm_os_memory_clerks (Transact-SQL) +-- https://bit.ly/2H31xDR + --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 45) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1224,7 +1233,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 46) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1238,7 +1247,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1252,7 +1261,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 47) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1261,7 +1270,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1274,12 +1283,12 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 49) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 48) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, total_elapsed_time/execution_count AS [avg_elapsed_time], - last_elapsed_time, last_execution_time, cached_time + last_elapsed_time, last_execution_time, cached_time, [type_desc] FROM sys.dm_exec_function_stats WITH (NOLOCK) ORDER BY total_worker_time DESC OPTION (RECOMPILE); ------ @@ -1290,14 +1299,13 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- Showplan Enhancements for UDFs -- https://bit.ly/2LVqiQ1 - -- Database specific queries ***************************************************************** -- **** Please switch to a user database that you are interested in! ***** --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 49) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1322,7 +1330,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 51) (Log Space Usage) +-- Log space usage for current database (Query 50) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1337,9 +1345,11 @@ OPTION (RECOMPILE); -- Look at log file size and usage, along with the log reuse wait description for the current database +-- sys.dm_db_log_space_usage (Transact-SQL) +-- https://bit.ly/2H4MQw9 --- Get database scoped configuration values for current database (Query 52) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 51) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1353,7 +1363,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 53) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 52) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1376,7 +1386,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 54) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 53) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1384,7 +1394,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1395,15 +1405,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 55 through 60 are the "Bad Man List" for stored procedures +-- Queries 54 through 60 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 55) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 54) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1418,15 +1428,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 56) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 55) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1444,12 +1455,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 57) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 56) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1466,12 +1477,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 58) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 57) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1488,11 +1499,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 59) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 58) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1510,13 +1521,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 60) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 59) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1534,6 +1545,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 60) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 61) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1600,7 +1636,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 64) (Missing Index Warnings) @@ -1620,7 +1656,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 65) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1632,12 +1668,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1686,7 +1727,7 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); -- Gives you some good information about your tables -- is_memory_optimized and durability_desc were new in SQL Server 2014 --- temporal_type_desc, is_remote_data_archive_enabled, is_external are new in SQL Server 2016 +-- temporal_type_desc, is_remote_data_archive_enabled, is_external were new in SQL Server 2016 -- sys.tables (Transact-SQL) -- https://bit.ly/2Gk7998 @@ -1723,6 +1764,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); + -- Look at most frequently modified indexes and statistics (Query 69) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, @@ -1817,6 +1859,7 @@ ORDER BY OBJECT_NAME(i.[object_id]) OPTION (RECOMPILE); -- https://bit.ly/2GCP8lF + -- Look at Columnstore index physical statistics (Query 74) (Columnstore Index Physical Stat) SELECT OBJECT_NAME(ps.object_id) AS [TableName], i.[name] AS [IndexName], ps.index_id, ps.partition_number, @@ -1835,6 +1878,7 @@ ORDER BY ps.object_id, ps.partition_number, ps.row_group_id OPTION (RECOMPILE); -- https://bit.ly/2q276XQ + -- Get lock waits for current database (Query 75) (Lock Waits) SELECT o.name AS [table_name], i.name AS [index_name], ios.index_id, ios.partition_number, SUM(ios.row_lock_wait_count) AS [total_row_lock_waits], @@ -1876,7 +1920,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- https://bit.ly/2q1Q6BM --- Get Query Store Options for this database (Query 77) (QueryStore Options) +-- Get QueryStore Options for this database (Query 77) (QueryStore Options) SELECT actual_state_desc, desired_state_desc, [interval_length_minutes], current_storage_size_mb, [max_storage_size_mb], query_capture_mode_desc, size_based_cleanup_mode_desc @@ -1886,6 +1930,9 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- New for SQL Server 2016 -- Requires that Query Store is enabled for this database +-- Make sure that the actual_state_desc is the same as desired_state_desc +-- Make sure that the current_storage_size_mb is less than the max_storage_size_mb + -- Tuning Workload Performance with Query Store -- https://bit.ly/1kHSl7w @@ -1893,13 +1940,14 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- Get input buffer information for the current database (Query 78) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], -es.login_time, es.cpu_time, es.logical_reads, -es.[status], ib.event_info AS [Input Buffer] + es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, + es.[status], ib.event_info AS [Input Buffer] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) CROSS APPLY sys.dm_exec_input_buffer(es.session_id, NULL) AS ib WHERE es.database_id = DB_ID() AND es.session_id > 50 AND es.session_id <> @@SPID OPTION (RECOMPILE); +------ -- Gives you input buffer information from all non-system sessions for the current database -- Replaces DBCC INPUTBUFFER @@ -1907,6 +1955,9 @@ AND es.session_id <> @@SPID OPTION (RECOMPILE); -- New DMF for retrieving input buffer in SQL Server -- https://bit.ly/2uHKMbz +-- sys.dm_exec_input_buffer (Transact-SQL) +-- https://bit.ly/2J5Hf9q + -- Look at recent Full backups for the current database (Query 79) (Recent Full Backups) @@ -1947,13 +1998,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1965,6 +2016,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX - - +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql index b6e0f83e..317702c6 100644 --- a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2016 SP2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 13, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -76,6 +76,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5622.0 SP2 CU11 + Security Update 2/11/2010 https://support.microsoft.com/en-us/help/4535706/description-of-the-security-update-for-sql-server-2016-sp2-cu11-februa -- 13.0.5698.0 SP2 CU12 2/25/2020 https://support.microsoft.com/en-us/help/4536648/cumulative-update-12-for-sql-server-2016-sp2 -- 13.0.5820.21 SP2 CU13 5/38/2020 https://support.microsoft.com/en-us/help/4549825/cumulative-update-13-for-sql-server-2016-sp2 +-- 13.0.5830.85 SP2 CU14 8/6/2020 https://support.microsoft.com/en-us/help/4564903/cumulative-update-14-for-sql-server-2016-sp2 @@ -208,7 +209,7 @@ DBCC TRACESTATUS (-1); -- This allows a database to become online and queries to be executed before the Query Store has been fully recovered -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -265,11 +266,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -309,7 +315,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -366,14 +371,14 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- Gives you some useful information about the composition and relative load on your NUMA nodes -- You want to see an equal number of schedulers on each NUMA node --- Watch out if SQL Server 2017 Standard Edition has been installed +-- Watch out if SQL Server 2016 Standard Edition has been installed -- on a physical or virtual machine with more than four sockets or more than 24 physical cores -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -428,7 +433,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -449,7 +454,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -499,17 +504,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -517,7 +512,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Not as useful for virtualization --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -534,7 +529,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -548,7 +543,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -571,7 +566,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -580,7 +575,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -601,7 +596,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); --- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 25) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -621,8 +616,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 27) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 26) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -665,8 +659,14 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 27) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -686,8 +686,11 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) + +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 28) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -723,8 +726,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 - --- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 29) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -740,7 +742,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 30) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -791,10 +793,9 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 31) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, @@ -812,14 +813,14 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N --- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 32) (VLF Counts) SELECT [name] AS [Database Name], [VLF Count] FROM sys.databases AS db WITH (NOLOCK) CROSS APPLY (SELECT file_id, COUNT(*) AS [VLF Count] @@ -840,7 +841,7 @@ ORDER BY [VLF Count] DESC OPTION (RECOMPILE); --- Get CPU utilization by database (Query 34) (CPU Usage by Database) +-- Get CPU utilization by database (Query 33) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -861,7 +862,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 35) (IO Usage By Database) +-- Get I/O utilization by database (Query 34) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -885,7 +886,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 35) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -904,7 +905,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- is being used by each database on the instance --- Get tempdb version store space usage by database (Query 37) (Version Store Space Usage) +-- Get tempdb version store space usage by database (Query 36) (Version Store Space Usage) SELECT DB_NAME(database_id) AS [Database Name], reserved_page_count AS [Version Store Reserved Page Count], reserved_space_kb/1024 AS [Version Store Reserved Space (MB)] @@ -921,7 +922,7 @@ ORDER BY reserved_space_kb/1024 DESC OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 37) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1004,7 +1005,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 38) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1022,7 +1023,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 39) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1043,7 +1044,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 41) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 40) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1072,7 +1073,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 41) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1097,7 +1098,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 42) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1110,7 +1111,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1125,7 +1126,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 43) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1137,11 +1138,11 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 44) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1152,7 +1153,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 45) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1177,7 +1178,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 46) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1198,7 +1199,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 47) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1212,7 +1213,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1226,7 +1227,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 48) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1235,7 +1236,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1248,7 +1249,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 50) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 49) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, @@ -1261,7 +1262,8 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- sys.dm_exec_function_stats (Transact-SQL) -- https://bit.ly/2q1Q6BM - +-- Showplan Enhancements for UDFs +-- https://bit.ly/2LVqiQ1 -- Database specific queries ***************************************************************** @@ -1269,7 +1271,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 51) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 50) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1288,13 +1290,13 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- Look at how large and how full the files are and where they are located -- Make sure the transaction log is not full!! --- is_autogrow_all_files was new for SQL Server 2016. Equivalent to TF 1117 for user databases +-- is_autogrow_all_files is new for SQL Server 2016. Equivalent to TF 1117 for user databases -- SQL Server 2016: Changes in default behavior for autogrow and allocations for tempdb and user databases -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 52) (Log Space Usage) +-- Log space usage for current database (Query 51) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1313,7 +1315,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2H4MQw9 --- Status of last VLF for current database (Query 53) (Last VLF Status) +-- Status of last VLF for current database (Query 52) (Last VLF Status) SELECT TOP(1) DB_NAME(li.database_id) AS [Database Name], li.[file_id], li.vlf_size_mb, li.vlf_sequence_number, li.vlf_active, li.vlf_status FROM sys.dm_db_log_info(DB_ID()) AS li @@ -1332,7 +1334,7 @@ ORDER BY vlf_sequence_number DESC OPTION (RECOMPILE); --- Get database scoped configuration values for current database (Query 54) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 53) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1346,7 +1348,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 55) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 54) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1369,7 +1371,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 56) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 55) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1377,7 +1379,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1388,15 +1390,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 57 through 62 are the "Bad Man List" for stored procedures +-- Queries 56 through 62 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 56) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1411,15 +1413,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 58) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 57) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1437,12 +1440,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 59) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 58) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1459,12 +1462,12 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 60) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 59) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1481,11 +1484,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 61) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 60) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1503,13 +1506,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 62) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 61) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1527,6 +1530,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 62) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 63) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1593,7 +1621,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 66) (Missing Index Warnings) @@ -1613,7 +1641,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 67) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1625,12 +1653,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1882,13 +1915,14 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); -- New for SQL Server 2016 -- Requires that Query Store is enabled for this database +-- Make sure that the actual_state_desc is the same as desired_state_desc +-- Make sure that the current_storage_size_mb is less than the max_storage_size_mb + -- Tuning Workload Performance with Query Store -- https://bit.ly/1kHSl7w - - -- Get input buffer information for the current database (Query 80) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, @@ -1950,13 +1984,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -1968,4 +2002,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql index dd3b2de7..df574f5d 100644 --- a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2017 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 14, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -86,7 +86,9 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 14.0.3238.1 CU17 10/8/2019 https://support.microsoft.com/en-us/help/4515579/cumulative-update-17-for-sql-server-2017 -- 14.0.3257.3 CU18 12/9/2019 https://support.microsoft.com/en-us/help/4527377/cumulative-update-18-for-sql-server-2017 -- 14.0.3281.6 CU19 2/5/2020 https://support.microsoft.com/en-us/help/4535007/cumulative-update-19-for-sql-server-2017 --- 14.0.3294.2 CU20 4/7/2020 https://support.microsoft.com/en-us/help/4541283/cumulative-update-20-for-sql-server-2017 +-- 14.0.3294.2 CU20 4/7/2020 https://support.microsoft.com/en-us/help/4541283/cumulative-update-20-for-sql-server-2017 +-- 14.0.3335.7 CU21 7/1/2020 https://support.microsoft.com/en-us/help/4557397/cumulative-update-21-for-sql-server-2017 +-- 14.0.3356.20 CU22 9/10/2020 https://support.microsoft.com/en-us/help/4577467/cumulative-update-22-for-sql-server-2017 -- How to determine the version, edition and update level of SQL Server and its components @@ -164,8 +166,8 @@ SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], -SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], -- New for SQL Server 2016 -SERVERPROPERTY('IsAdvancedAnalyticsInstalled') AS [IsRServicesInstalled]; -- New for SQL Server 2016 +SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], +SERVERPROPERTY('IsAdvancedAnalyticsInstalled') AS [IsRServicesInstalled]; ------ -- This gives you a lot of useful information about your instance of SQL Server, @@ -228,7 +230,7 @@ DBCC TRACESTATUS (-1); -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -284,11 +286,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -321,7 +328,7 @@ ORDER BY sj.name OPTION (RECOMPILE); -- MSDN sysjobs documentation -- https://bit.ly/2paDEOP --- SQL Server Maintenance Solution +-- SQL Server Maintenance Solution (Ola Hallengren) -- https://bit.ly/1pgchQu -- You can use this script to add default schedules to the standard Ola Hallengren Maintenance Solution jobs @@ -387,8 +394,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -443,7 +450,7 @@ FROM sys.dm_hadr_cluster WITH (NOLOCK) OPTION (RECOMPILE); -- You will see no results if your instance is not using AlwaysOn AGs --- Good overview of AG health and status (Query 16) (AlwaysOn AG Status) +-- Good overview of AG health and status (Query 16) (AG Status) SELECT ag.name AS [AG Name], ar.replica_server_name, ar.availability_mode_desc, adc.[database_name], drs.is_local, drs.is_primary_replica, drs.synchronization_state_desc, drs.is_commit_participant, drs.synchronization_health_desc, drs.recovery_lsn, drs.truncation_lsn, drs.last_sent_lsn, @@ -464,7 +471,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -514,18 +521,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started --- Get pvscsi info from Windows Registry (Query 19) (PVSCSI Driver Parameters) -EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device', N'DriverParameter'; ------- - --- This is valid for VMware VMs --- Recommended value for intensive I/O patterns from VMware is: RequestRingPages=32,MaxQueueDepth=254 --- https://kb.vmware.com/s/article/2053145 --- Does not work on Linux - - - --- Get BIOS date from Windows Registry (Query 20) (BIOS Date) +-- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -534,7 +530,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste -- Does not work on Linux --- Get processor description from Windows Registry (Query 21) (Processor Description) +-- Get processor description from Windows Registry (Query 20) (Processor Description) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\CentralProcessor\0', N'ProcessorNameString'; ------ @@ -552,7 +548,7 @@ EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\Syste --- Get information on location, time and size of any memory dumps from SQL Server (Query 22) (Memory Dump Info) +-- Get information on location, time and size of any memory dumps from SQL Server (Query 21) (Memory Dump Info) SELECT [filename], creation_time, size_in_bytes/1048576.0 AS [Size (MB)] FROM sys.dm_server_memory_dumps WITH (NOLOCK) ORDER BY creation_time DESC OPTION (RECOMPILE); @@ -566,7 +562,7 @@ ORDER BY creation_time DESC OPTION (RECOMPILE); --- Look at Suspect Pages table (Query 23) (Suspect Pages) +-- Look at Suspect Pages table (Query 22) (Suspect Pages) SELECT DB_NAME(database_id) AS [Database Name], [file_id], page_id, event_type, error_count, last_update_date FROM msdb.dbo.suspect_pages WITH (NOLOCK) @@ -589,7 +585,7 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 24) (TempDB Data Files) +-- Get number of data files in tempdb database (Query 23) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -598,7 +594,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -618,17 +614,21 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Drive information for all fixed drives visible to the operating system (Query 26) (Fixed Drives) +-- Drive information for all fixed drives visible to the operating system (Query 25) (Fixed Drives) SELECT fixed_drive_path, drive_type_desc, CONVERT(DECIMAL(18,2), free_space_in_bytes/1073741824.0) AS [Available Space (GB)] FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); ------ --- This shows all of your fixed drives, not just LUNs with SQL Server database files +-- This shows all of your drives, not just LUNs with SQL Server database files +-- New in SQL Server 2017 +-- sys.dm_os_enumerate_fixed_drives (Transact-SQL) +-- https://bit.ly/2EZoHLj --- Volume info for all LUNS that have database files on the current instance (Query 27) (Volume Info) + +-- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -648,8 +648,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 28) (Drive Level Latency) --- Based on code from Jimmy May +-- Drive level latency information (Query 27) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -692,8 +691,14 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 --- Calculates average stalls per read, per write, and per total input/output for each database file (Query 29) (IO Latency by File) +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + + +-- Calculates average stalls per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -713,8 +718,11 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 30) (IO Warnings) + +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -750,7 +758,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 31) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -766,7 +774,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 32) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -817,12 +825,11 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 33) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], -FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], -mid.[statement] AS [Database.Schema.Table], +FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], -COUNT(1) OVER(PARTITION BY mid.[statement], equality_columns) AS [similar_missing_indexes_for_table], +COUNT(1) OVER(PARTITION BY mid.[statement], mid.equality_columns) AS [similar_missing_indexes_for_table], mid.equality_columns, mid.inequality_columns, mid.included_columns, migs.user_seeks, CONVERT(decimal(18,2), migs.avg_total_user_cost) AS [avg_total_user_cost], migs.avg_user_impact FROM sys.dm_db_missing_index_group_stats AS migs WITH (NOLOCK) @@ -838,14 +845,14 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N --- Get VLF Counts for all databases on the instance (Query 34) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) SELECT [name] AS [Database Name], [VLF Count] FROM sys.databases AS db WITH (NOLOCK) CROSS APPLY (SELECT file_id, COUNT(*) AS [VLF Count] @@ -866,7 +873,7 @@ ORDER BY [VLF Count] DESC OPTION (RECOMPILE); --- Get CPU utilization by database (Query 35) (CPU Usage by Database) +-- Get CPU utilization by database (Query 34) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -887,7 +894,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Note: This only reflects CPU usage from the currently cached query plans --- Get I/O utilization by database (Query 36) (IO Usage By Database) +-- Get I/O utilization by database (Query 35) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -911,7 +918,7 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- They include all I/O activity, not just the nominal I/O workload --- Get total buffer usage by database for current instance (Query 37) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -930,7 +937,7 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- is being used by each database on the instance --- Get tempdb version store space usage by database (Query 38) (Version Store Space Usage) +-- Get tempdb version store space usage by database (Query 37) (Version Store Space Usage) SELECT DB_NAME(database_id) AS [Database Name], reserved_page_count AS [Version Store Reserved Page Count], reserved_space_kb/1024 AS [Version Store Reserved Space (MB)] @@ -947,7 +954,7 @@ ORDER BY reserved_space_kb/1024 DESC OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 39) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1030,7 +1037,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 40) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1048,7 +1055,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 41) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1069,7 +1076,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 42) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 41) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1098,22 +1105,22 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 43) (CPU Utilization History) -DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info WITH (NOLOCK)); +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +DECLARE @ts_now bigint = (SELECT ms_ticks FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], SystemIdle AS [System Idle Process], 100 - SystemIdle - SQLProcessUtilization AS [Other Process CPU Utilization], DATEADD(ms, -1 * (@ts_now - [timestamp]), GETDATE()) AS [Event Time] FROM (SELECT record.value('(./Record/@id)[1]', 'int') AS record_id, - record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') - AS [SystemIdle], - record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') - AS [SQLProcessUtilization], [timestamp] - FROM (SELECT [timestamp], CONVERT(xml, record) AS [record] - FROM sys.dm_os_ring_buffers WITH (NOLOCK) - WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' - AND record LIKE N'%%') AS x) AS y + record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') + AS [SystemIdle], + record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') + AS [SQLProcessUtilization], [timestamp] + FROM (SELECT [timestamp], CONVERT(xml, record) AS [record] + FROM sys.dm_os_ring_buffers WITH (NOLOCK) + WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' + AND record LIKE N'%%') AS x) AS y ORDER BY record_id DESC OPTION (RECOMPILE); ------ @@ -1123,7 +1130,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 44) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1136,7 +1143,7 @@ qs.min_logical_reads AS [Min Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.max_logical_reads AS [Max Logical Reads], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1151,7 +1158,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 45) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1163,11 +1170,11 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 46) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1178,7 +1185,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 47) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1203,7 +1210,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 48) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1224,7 +1231,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 49) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1238,7 +1245,7 @@ qs.min_elapsed_time AS [Min Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.max_elapsed_time AS [Max Elapsed Time], qs.execution_count AS [Execution Count], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1252,7 +1259,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 50) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1261,7 +1268,7 @@ qs.execution_count AS [Execution Count], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], qs.total_physical_reads/qs.execution_count AS [Avg Physical Reads], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1274,7 +1281,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 51) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 50) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, @@ -1297,7 +1304,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 52) (File Sizes and Space) +-- Individual File Sizes and space available for current database (Query 51) (File Sizes and Space) SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) @@ -1322,7 +1329,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 53) (Log Space Usage) +-- Log space usage for current database (Query 52) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1341,7 +1348,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2H4MQw9 --- Status of last VLF for current database (Query 54) (Last VLF Status) +-- Status of last VLF for current database (Query 53) (Last VLF Status) SELECT TOP(1) DB_NAME(li.database_id) AS [Database Name], li.[file_id], li.vlf_size_mb, li.vlf_sequence_number, li.vlf_active, li.vlf_status FROM sys.dm_db_log_info(DB_ID()) AS li @@ -1360,7 +1367,7 @@ ORDER BY vlf_sequence_number DESC OPTION (RECOMPILE); --- Get database scoped configuration values for current database (Query 55) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 54) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1374,7 +1381,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 56) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 55) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(16, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1397,7 +1404,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 57) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 56) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1405,7 +1412,7 @@ qs.total_worker_time AS [Total Worker Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_elapsed_time AS [Total Elapsed Time], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], qs.creation_time AS [Creation Time] --,t.[text] AS [Complete Query Text], qp.query_plan AS [Query Plan] -- uncomment out these columns if not copying results to Excel FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) @@ -1416,15 +1423,15 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); ------ --- Queries 58 through 63 are the "Bad Man List" for stored procedures +-- Queries 57 through 63 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 58) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], qs.total_worker_time/qs.execution_count AS [Avg Worker Time], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1439,15 +1446,16 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- Tells you which cached stored procedures are called the most often -- This helps you characterize and baseline your workload +-- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 59) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 58) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.total_worker_time AS [TotalWorkerTime], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1465,12 +1473,12 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 60) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 59) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1487,15 +1495,15 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 61) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 60) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan FROM sys.procedures AS p WITH (NOLOCK) INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) ON p.[object_id] = qs.[object_id] @@ -1509,11 +1517,11 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 62) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 61) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1531,13 +1539,13 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 63) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 62) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], -CASE WHEN CONVERT(nvarchar(max), qp.query_plan) LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], +CASE WHEN CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' THEN 1 ELSE 0 END AS [Has Missing Index], FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] -- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan @@ -1555,6 +1563,31 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure + +-- Cached SPs Missing Indexes by Execution Count (Query 63) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + -- Lists the top statements by average input/output usage for the current database (Query 64) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], @@ -1621,7 +1654,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 67) (Missing Index Warnings) @@ -1641,7 +1674,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 68) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1653,12 +1686,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -2002,13 +2040,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -2020,4 +2058,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2O0Hacc -- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX +-- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql index db5a0eb4..c50d5132 100644 --- a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql @@ -1,13 +1,13 @@ - -- SQL Server 2019 Diagnostic Information Queries -- Glenn Berry --- Last Modified: June 1, 2020 +-- Last Modified: September 13, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ +-- YouTube: https://bit.ly/2PkoAM1 -- Twitter: GlennAlanBerry --- Please listen to my Pluralsight courses --- https://www.pluralsight.com/author/glenn-berry +-- Diagnostic Queries are available here +-- https://glennsqlperformance.com/resources/ -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server @@ -69,8 +69,10 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 15.0.4003.23 CU1 1/7/2020 https://support.microsoft.com/en-us/help/4527376/cumulative-update-1-for-sql-server-2019 -- 15.0.4013.40 CU2 2/13/2020 https://support.microsoft.com/en-us/help/4536075/cumulative-update-2-for-sql-server-2019 -- 15.0.4023.6 CU3 3/12/2020 https://support.microsoft.com/en-us/help/4538853/cumulative-update-3-for-sql-server-2019 --- 15.0.4033.1 CU4 3/31/2020 https://support.microsoft.com/en-us/help/4548597/cumulative-update-4-for-sql-server-2019 - +-- 15.0.4033.1 CU4 3/31/2020 https://support.microsoft.com/en-us/help/4548597/cumulative-update-4-for-sql-server-2019 +-- 15.0.4043.16 CU5 6/22/2020 https://support.microsoft.com/en-us/help/4552255/cumulative-update-5-for-sql-server-2019 +-- 15.0.4053.23 CU6 8/4/2020 https://support.microsoft.com/en-us/help/4563110/cumulative-update-6-for-sql-server-2019 +-- 15.0.4063.15 CU7 9/2/2020 https://support.microsoft.com/en-us/help/4570012/cumulative-update-7-for-sql-server-2019 @@ -221,6 +223,9 @@ FROM sys.dm_os_process_memory WITH (NOLOCK) OPTION (RECOMPILE); -- This indicates that you are not under internal memory pressure -- If locked_page_allocations_kb > 0, then LPIM is enabled +-- sys.dm_os_process_memory (Transact-SQL) +-- https://bit.ly/3iUgQgC + -- How to enable the "locked pages" feature in SQL Server 2012 -- https://bit.ly/2F5UjOA @@ -249,11 +254,16 @@ FROM sys.dm_server_services WITH (NOLOCK) OPTION (RECOMPILE); SELECT ISNULL(d.[name], bs.[database_name]) AS [Database], d.recovery_model_desc AS [Recovery Model], d.log_reuse_wait_desc AS [Log Reuse Wait Desc], MAX(CASE WHEN [type] = 'D' THEN bs.backup_finish_date ELSE NULL END) AS [Last Full Backup], + MAX(CASE WHEN [type] = 'D' THEN bmf.physical_device_name ELSE NULL END) AS [Last Full Backup Location], MAX(CASE WHEN [type] = 'I' THEN bs.backup_finish_date ELSE NULL END) AS [Last Differential Backup], - MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup] + MAX(CASE WHEN [type] = 'I' THEN bmf.physical_device_name ELSE NULL END) AS [Last Differential Backup Location], + MAX(CASE WHEN [type] = 'L' THEN bs.backup_finish_date ELSE NULL END) AS [Last Log Backup], + MAX(CASE WHEN [type] = 'L' THEN bmf.physical_device_name ELSE NULL END) AS [Last Log Backup Location] FROM sys.databases AS d WITH (NOLOCK) LEFT OUTER JOIN msdb.dbo.backupset AS bs WITH (NOLOCK) -ON bs.[database_name] = d.[name] +ON bs.[database_name] = d.[name] +LEFT OUTER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) +ON bs.media_set_id = bmf.media_set_id AND bs.backup_finish_date > GETDATE()- 30 WHERE d.name <> N'tempdb' GROUP BY ISNULL(d.[name], bs.[database_name]), d.recovery_model_desc, d.log_reuse_wait_desc, d.[name] @@ -293,7 +303,6 @@ ORDER BY sj.name OPTION (RECOMPILE); -- https://bit.ly/3ane0gN - -- Get SQL Server Agent Alert Information (Query 10) (SQL Server Agent Alerts) SELECT name, event_source, message_id, severity, [enabled], has_notification, delay_between_responses, occurrence_count, last_occurrence_date, last_occurrence_time @@ -353,8 +362,8 @@ WHERE node_state_desc <> N'ONLINE DAC' OPTION (RECOMPILE); -- sys.dm_os_nodes (Transact-SQL) -- https://bit.ly/2pn5Mw8 --- Balancing Your Available SQL Server Core Licenses Evenly Across NUMA Nodes --- https://bit.ly/2vfC4Rq +-- How to Balance SQL Server Core Licenses Across NUMA Nodes +-- https://bit.ly/3i4TyVR @@ -430,7 +439,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -481,7 +490,6 @@ EXEC sys.xp_readerrorlog 0, 1, N'Manufacturer'; -- This query will return no results if your error log has been recycled since the instance was started - -- Get BIOS date from Windows Registry (Query 19) (BIOS Date) EXEC sys.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'HARDWARE\DESCRIPTION\System\BIOS', N'BiosReleaseDate'; ------ @@ -581,7 +589,11 @@ CONVERT(DECIMAL(18,2), free_space_in_bytes/1073741824.0) AS [Available Space (GB FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); ------ --- This shows all of your fixed drives, not just LUNs with SQL Server database files +-- This shows all of your drives, not just LUNs with SQL Server database files +-- New in SQL Server 2017 + +-- sys.dm_os_enumerate_fixed_drives (Transact-SQL) +-- https://bit.ly/2EZoHLj @@ -648,6 +660,12 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- These latency numbers include all file activity against all SQL Server -- database files on each drive since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + +-- sys.dm_os_volume_stats (Transact-SQL) +-- https://bit.ly/33thz2j + -- Calculates average latency per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], @@ -669,6 +687,9 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- These latency numbers include all file activity against each SQL Server -- database file since SQL Server was last started +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + -- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); @@ -706,7 +727,6 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 - -- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, @@ -798,7 +818,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1125,7 +1145,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1382,7 +1402,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- It also helps you find possible caching opportunities --- Queries 57 through 62 are the "Bad Man List" for stored procedures +-- Queries 57 through 63 are the "Bad Man List" for stored procedures -- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], @@ -1522,7 +1542,32 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); -- You should look at this if you see signs of I/O pressure or of memory pressure --- Lists the top statements by average input/output usage for the current database (Query 63) (Top IO Statements) + +-- Cached SPs Missing Indexes by Execution Count (Query 63) (SP Missing Index) +SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], +ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], +qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], +qs.total_worker_time/qs.execution_count AS [Avg Worker Time], +qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], +FORMAT(qs.last_execution_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Last Execution Time], +FORMAT(qs.cached_time, 'yyyy-MM-dd HH:mm:ss', 'en-US') AS [Plan Cached Time] +-- ,qp.query_plan AS [Query Plan] -- Uncomment if you want the Query Plan +FROM sys.procedures AS p WITH (NOLOCK) +INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) +ON p.[object_id] = qs.[object_id] +CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp +WHERE qs.database_id = DB_ID() +AND DATEDIFF(Minute, qs.cached_time, GETDATE()) > 0 +AND CONVERT(nvarchar(max), qp.query_plan) COLLATE Latin1_General_BIN2 LIKE N'%%' +ORDER BY qs.execution_count DESC OPTION (RECOMPILE); +------ + +-- This helps you find the most frequently executed cached stored procedures that have missing index warnings +-- This can often help you find index tuning candidates + + + +-- Lists the top statements by average input/output usage for the current database (Query 64) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], SUBSTRING(qt.[text],qs.statement_start_offset/2, @@ -1541,7 +1586,7 @@ ORDER BY [Avg IO] DESC OPTION (RECOMPILE); --- Possible Bad NC Indexes (writes > reads) (Query 64) (Bad NC Indexes) +-- Possible Bad NC Indexes (writes > reads) (Query 65) (Bad NC Indexes) SELECT SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(s.[object_id]) AS [Table Name], i.name AS [Index Name], i.index_id, @@ -1567,7 +1612,7 @@ ORDER BY [Difference] DESC, [Total Writes] DESC, [Total Reads] ASC OPTION (RECOM -- Investigate further before dropping an index! --- Missing Indexes for current database by Index Advantage (Query 65) (Missing Indexes) +-- Missing Indexes for current database by Index Advantage (Query 66) (Missing Indexes) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], @@ -1592,10 +1637,10 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query --- Find missing index warnings for cached plans in the current database (Query 66) (Missing Index Warnings) +-- Find missing index warnings for cached plans in the current database (Query 67) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan @@ -1610,9 +1655,9 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- This can help you decide whether to add them or not --- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 67) (Buffer Usage) +-- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 68) (Buffer Usage) -- Note: This query could take some time on a busy instance -SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], +SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.[Rows] AS [Row Count], @@ -1624,12 +1669,17 @@ INNER JOIN sys.partitions AS p WITH (NOLOCK) ON a.container_id = p.hobt_id INNER JOIN sys.objects AS o WITH (NOLOCK) ON p.object_id = o.object_id +INNER JOIN sys.database_files AS f WITH (NOLOCK) +ON b.file_id = f.file_id +INNER JOIN sys.filegroups AS fg WITH (NOLOCK) +ON f.data_space_id = fg.data_space_id WHERE b.database_id = CONVERT(int, DB_ID()) AND p.[object_id] > 100 AND OBJECT_NAME(p.[object_id]) NOT LIKE N'plan_%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'sys%' AND OBJECT_NAME(p.[object_id]) NOT LIKE N'xml_index_nodes%' -GROUP BY o.Schema_ID, p.[object_id], p.index_id, p.data_compression_desc, p.[Rows] +GROUP BY fg.name, o.Schema_ID, p.[object_id], p.index_id, + p.data_compression_desc, p.[Rows] ORDER BY [BufferCount] DESC OPTION (RECOMPILE); ------ @@ -1637,7 +1687,7 @@ ORDER BY [BufferCount] DESC OPTION (RECOMPILE); -- It can help identify possible candidates for data compression --- Get Table names, row counts, and compression status for clustered index or heap (Query 68) (Table Sizes) +-- Get Table names, row counts, and compression status for clustered index or heap (Query 69) (Table Sizes) SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.object_id) AS [ObjectName], SUM(p.Rows) AS [RowCount], p.data_compression_desc AS [Compression Type] FROM sys.partitions AS p WITH (NOLOCK) @@ -1662,7 +1712,7 @@ ORDER BY SUM(p.Rows) DESC OPTION (RECOMPILE); --- Get some key table properties (Query 69) (Table Properties) +-- Get some key table properties (Query 70) (Table Properties) SELECT OBJECT_NAME(t.[object_id]) AS [ObjectName], p.[rows] AS [Table Rows], p.index_id, p.data_compression_desc AS [Index Data Compression], t.create_date, t.lock_on_bulk_load, t.is_replicated, t.has_replication_filter, @@ -1685,7 +1735,7 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); --- When were Statistics last updated on all indexes? (Query 70) (Statistics Update) +-- When were Statistics last updated on all indexes? (Query 71) (Statistics Update) SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.[NAME] AS [Object Name], o.[type_desc] AS [Object Type], i.[name] AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], s.auto_created, s.no_recompute, s.user_created, s.is_incremental, s.is_temporary, @@ -1716,7 +1766,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); --- Look at most frequently modified indexes and statistics (Query 71) (Volatile Indexes) +-- Look at most frequently modified indexes and statistics (Query 72) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, sp.modification_counter, sp.[rows], sp.rows_sampled, sp.last_updated @@ -1734,7 +1784,7 @@ ORDER BY sp.modification_counter DESC, o.name OPTION (RECOMPILE); --- Get fragmentation info for all indexes above a certain size in the current database (Query 72) (Index Fragmentation) +-- Get fragmentation info for all indexes above a certain size in the current database (Query 73) (Index Fragmentation) -- Note: This query could take some time on a very large database SELECT DB_NAME(ps.database_id) AS [Database Name], SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(ps.OBJECT_ID) AS [Object Name], i.[name] AS [Index Name], ps.index_id, @@ -1756,7 +1806,7 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); -- and how effective your index maintenance strategy is ---- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 73) (Overall Index Usage - Reads) +--- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 74) (Overall Index Usage - Reads) SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], @@ -1775,7 +1825,7 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - -- Show which indexes in the current database are most active for Reads ---- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 74) (Overall Index Usage - Writes) +--- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 75) (Overall Index Usage - Writes) SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, @@ -1792,7 +1842,7 @@ ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes -- Show which indexes in the current database are most active for Writes --- Get in-memory OLTP index usage (Query 75) (XTP Index Usage) +-- Get in-memory OLTP index usage (Query 76) (XTP Index Usage) SELECT OBJECT_NAME(i.[object_id]) AS [Object Name], i.index_id, i.[name] AS [Index Name], i.[type_desc], xis.scans_started, xis.scans_retries, xis.rows_touched, xis.rows_returned @@ -1811,7 +1861,7 @@ ORDER BY OBJECT_NAME(i.[object_id]) OPTION (RECOMPILE); --- Look at Columnstore index physical statistics (Query 76) (Columnstore Index Physical Stat) +-- Look at Columnstore index physical statistics (Query 77) (Columnstore Index Physical Stat) SELECT OBJECT_NAME(ps.object_id) AS [TableName], i.[name] AS [IndexName], ps.index_id, ps.partition_number, ps.delta_store_hobt_id, ps.state_desc, ps.total_rows, ps.size_in_bytes, @@ -1830,7 +1880,7 @@ ORDER BY ps.object_id, ps.partition_number, ps.row_group_id OPTION (RECOMPILE); --- Get lock waits for current database (Query 77) (Lock Waits) +-- Get lock waits for current database (Query 78) (Lock Waits) SELECT o.name AS [table_name], i.name AS [index_name], ios.index_id, ios.partition_number, SUM(ios.row_lock_wait_count) AS [total_row_lock_waits], SUM(ios.row_lock_wait_in_ms) AS [total_row_lock_wait_in_ms], @@ -1853,7 +1903,7 @@ ORDER BY total_lock_wait_in_ms DESC OPTION (RECOMPILE); --- Look at UDF execution statistics (Query 78) (UDF Statistics) +-- Look at UDF execution statistics (Query 79) (UDF Statistics) SELECT OBJECT_NAME(object_id) AS [Function Name], execution_count, total_worker_time, total_logical_reads, total_physical_reads, total_elapsed_time, total_elapsed_time/execution_count AS [avg_elapsed_time], @@ -1871,7 +1921,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- https://bit.ly/2q1Q6BM --- Determine which scalar UDFs are in-lineable (Query 79) (Inlineable UDFs) +-- Determine which scalar UDFs are in-lineable (Query 80) (Inlineable UDFs) SELECT OBJECT_NAME(m.object_id) AS [Function Name], is_inlineable, inline_type FROM sys.sql_modules AS m WITH (NOLOCK) LEFT OUTER JOIN sys.dm_exec_function_stats AS efs WITH (NOLOCK) @@ -1887,7 +1937,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2Qt216S --- Get QueryStore Options for this database (Query 80) (QueryStore Options) +-- Get QueryStore Options for this database (Query 81) (QueryStore Options) SELECT actual_state_desc, desired_state_desc, [interval_length_minutes], current_storage_size_mb, [max_storage_size_mb], query_capture_mode_desc, size_based_cleanup_mode_desc @@ -1905,7 +1955,7 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); --- Get input buffer information for the current database (Query 81) (Input Buffer) +-- Get input buffer information for the current database (Query 82) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, es.[status], ib.event_info AS [Input Buffer] @@ -1927,9 +1977,10 @@ AND es.session_id <> @@SPID OPTION (RECOMPILE); --- Get any resumable index rebuild operation information (Query 82) (Resumable Index Rebuild) +-- Get any resumable index rebuild operation information (Query 83) (Resumable Index Rebuild) SELECT OBJECT_NAME(iro.object_id) AS [Object Name], iro.index_id, iro.name AS [Index Name], - iro.sql_text, iro.last_max_dop_used, iro.partition_number, iro.state_desc, iro.start_time, iro.percent_complete + iro.sql_text, iro.last_max_dop_used, iro.partition_number, iro.state_desc, + iro.start_time, iro.percent_complete FROM sys.index_resumable_operations AS iro WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1938,7 +1989,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2pYSWqq --- Get database automatic tuning options (Query 83) (Automatic Tuning Options) +-- Get database automatic tuning options (Query 84) (Automatic Tuning Options) SELECT [name], desired_state_desc, actual_state_desc, reason_desc FROM sys.database_automatic_tuning_options WITH (NOLOCK) OPTION (RECOMPILE); @@ -1949,7 +2000,7 @@ OPTION (RECOMPILE); --- Look at recent Full backups for the current database (Query 84) (Recent Full Backups) +-- Look at recent Full backups for the current database (Query 85) (Recent Full Backups) SELECT TOP (30) bs.machine_name, bs.server_name, bs.database_name AS [Database Name], bs.recovery_model, CONVERT (BIGINT, bs.backup_size / 1048576 ) AS [Uncompressed Backup Size (MB)], CONVERT (BIGINT, bs.compressed_backup_size / 1048576 ) AS [Compressed Backup Size (MB)], @@ -1990,13 +2041,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- SQL Server 2017: Diagnosing Configuration Issues with DMVs -- https://bit.ly/2MSUDUL --- SQL Server 2014 DMV Diagnostic Queries Part 1 +-- SQL Server 2014 DMV Diagnostic Queries Part 1 -- https://bit.ly/2plxCer --- SQL Server 2014 DMV Diagnostic Queries Part 2 +-- SQL Server 2014 DMV Diagnostic Queries Part 2 -- https://bit.ly/2IuJpzI --- SQL Server 2014 DMV Diagnostic Queries Part 3 +-- SQL Server 2014 DMV Diagnostic Queries Part 3 -- https://bit.ly/2FIlCPb @@ -2006,5 +2057,4 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn --- https://bit.ly/2O0Hacc - +-- https://bit.ly/2O0Hacc \ No newline at end of file From 96a3dcdc1b7d344e950a7bf996c454e3e47225fc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 22 Sep 2020 16:07:57 +0300 Subject: [PATCH 092/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 970eddf6..a6bbc717 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1223,6 +1223,7 @@ Articles types: | [Table Partitioning in SQL Server – The Basics] | Cathrine Wilhelmsen | 2015-04-12 | [AZ][DBA] | | [Table Partitioning in SQL Server – Partition Switching] | Cathrine Wilhelmsen | 2015-04-19 | [AZ][DBA] | | [TempDB in SQL Server] | SentryOne | 2020-09-15 | [DBA] | +| [SQL Server’s Cost Threshold for Parallelism] | Kendra Little | 2014-11-20 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2420,3 +2421,4 @@ Articles types: [Table Partitioning in SQL Server – The Basics]:https://www.cathrinewilhelmsen.net/2015/04/12/table-partitioning-in-sql-server/ [Table Partitioning in SQL Server – Partition Switching]:https://www.cathrinewilhelmsen.net/2015/04/19/table-partitioning-in-sql-server-partition-switching/ [TempDB in SQL Server]:https://www.sentryone.com/tempdb-in-sql-server +[SQL Server’s Cost Threshold for Parallelism]:https://www.brentozar.com/archive/2014/11/sql-server-cost-threshold-for-parallelism/ From 1845011b4f5d0bc0529ec472de5e606730cecca4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 23 Sep 2020 16:09:33 +0300 Subject: [PATCH 093/553] New article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a6bbc717..2e0b0b97 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1224,6 +1224,7 @@ Articles types: | [Table Partitioning in SQL Server – Partition Switching] | Cathrine Wilhelmsen | 2015-04-19 | [AZ][DBA] | | [TempDB in SQL Server] | SentryOne | 2020-09-15 | [DBA] | | [SQL Server’s Cost Threshold for Parallelism] | Kendra Little | 2014-11-20 | [DBA][DEV] | +| [How many CPUs is my parallel query using in SQL Server?] | Kendra Little | 2014-05-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2422,3 +2423,4 @@ Articles types: [Table Partitioning in SQL Server – Partition Switching]:https://www.cathrinewilhelmsen.net/2015/04/19/table-partitioning-in-sql-server-partition-switching/ [TempDB in SQL Server]:https://www.sentryone.com/tempdb-in-sql-server [SQL Server’s Cost Threshold for Parallelism]:https://www.brentozar.com/archive/2014/11/sql-server-cost-threshold-for-parallelism/ +[How many CPUs is my parallel query using in SQL Server?]:https://www.brentozar.com/archive/2014/11/many-cpus-parallel-query-using-sql-server/ From a804d031b6278a5c66b67136db75e2181dc3f710 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 24 Sep 2020 14:16:37 +0300 Subject: [PATCH 094/553] Add new security article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2e0b0b97..f98860b4 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1225,6 +1225,7 @@ Articles types: | [TempDB in SQL Server] | SentryOne | 2020-09-15 | [DBA] | | [SQL Server’s Cost Threshold for Parallelism] | Kendra Little | 2014-11-20 | [DBA][DEV] | | [How many CPUs is my parallel query using in SQL Server?] | Kendra Little | 2014-05-04 | [DBA][DEV] | +| [Protecting your data against unauthorised reads on SQL Server] | Monin | 2020-06-24 | [SEC] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2424,3 +2425,4 @@ Articles types: [TempDB in SQL Server]:https://www.sentryone.com/tempdb-in-sql-server [SQL Server’s Cost Threshold for Parallelism]:https://www.brentozar.com/archive/2014/11/sql-server-cost-threshold-for-parallelism/ [How many CPUs is my parallel query using in SQL Server?]:https://www.brentozar.com/archive/2014/11/many-cpus-parallel-query-using-sql-server/ +[Protecting your data against unauthorised reads on SQL Server]:https://monin-it.be/2020/06/23/protectingyourdata/ From dd4072636f0e17f3707d76e919f254f6d424f512 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 25 Sep 2020 09:48:08 +0300 Subject: [PATCH 095/553] Add pretty good article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f98860b4..c1274bc6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1226,6 +1226,7 @@ Articles types: | [SQL Server’s Cost Threshold for Parallelism] | Kendra Little | 2014-11-20 | [DBA][DEV] | | [How many CPUs is my parallel query using in SQL Server?] | Kendra Little | 2014-05-04 | [DBA][DEV] | | [Protecting your data against unauthorised reads on SQL Server] | Monin | 2020-06-24 | [SEC] | +| [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2426,3 +2427,4 @@ Articles types: [SQL Server’s Cost Threshold for Parallelism]:https://www.brentozar.com/archive/2014/11/sql-server-cost-threshold-for-parallelism/ [How many CPUs is my parallel query using in SQL Server?]:https://www.brentozar.com/archive/2014/11/many-cpus-parallel-query-using-sql-server/ [Protecting your data against unauthorised reads on SQL Server]:https://monin-it.be/2020/06/23/protectingyourdata/ +[SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea]:https://www.brentozar.com/archive/2018/02/set-implicit_transactions-one-hell-bad-idea/ From f9cac89d29bc70970e30cb0b2eb3f8a973904a39 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 26 Sep 2020 09:51:57 +0300 Subject: [PATCH 096/553] Add new must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c1274bc6..9723ffbd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1227,6 +1227,7 @@ Articles types: | [How many CPUs is my parallel query using in SQL Server?] | Kendra Little | 2014-05-04 | [DBA][DEV] | | [Protecting your data against unauthorised reads on SQL Server] | Monin | 2020-06-24 | [SEC] | | [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | +| [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2428,3 +2429,4 @@ Articles types: [How many CPUs is my parallel query using in SQL Server?]:https://www.brentozar.com/archive/2014/11/many-cpus-parallel-query-using-sql-server/ [Protecting your data against unauthorised reads on SQL Server]:https://monin-it.be/2020/06/23/protectingyourdata/ [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea]:https://www.brentozar.com/archive/2018/02/set-implicit_transactions-one-hell-bad-idea/ +[Tempdb: The Ghost Of Version Store]:https://kohera.be/blog/sql-server/tempdb-the-ghost-of-version-store/ From 48e9b8a96c5da2454635ee755c9879bd77444f6b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 27 Sep 2020 09:53:01 +0300 Subject: [PATCH 097/553] Add Kohera SQL Server blog --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ced279f6..d9ee6e40 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQLBlog.org](https://sqlblog.org) - [Idera SQL Server Blog](https://community.idera.com/tags/SQL%2bServer) - [SQL Server Science Blog](https://www.sqlserverscience.com/) (by Max Vernon) + - [Kohera SQL Server Blog](https://kohera.be/blog/category/sql-server/) - Security (great thanks to [Troy Hunt](https://www.troyhunt.com/troys-ultimate-list-of-security-links/)) - SQL injection - [sqlmap](http://sqlmap.org/) – The tool for mounting SQL injection attacks tests against a running site From 9a95b1fadb54b93faf65b8a6bff3c04730e1246f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 28 Sep 2020 14:24:32 +0300 Subject: [PATCH 098/553] SQL Assessment API rules in .csv format link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d9ee6e40..b9fac7d5 100644 --- a/README.md +++ b/README.md @@ -442,6 +442,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Server Diagrams](http://www.e-squillace.com/techdiagrams-sqlserver/) (by George Squillace) - [New Stars of Data 2020 Presentations](https://github.com/SQLGrillen/NSOD-1) (by SQLGrillen) - [Get Your ColumnScore](https://columnscore.com) (by ColumnScore) + - [SQL Assessment API rules in .csv format](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/DefaultRuleset.csv) (by Microsoft) **[⬆ back to top](#table-of-contents)** From bb98e32f5a9c8fcb280e43347438f35d430dfe37 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 29 Sep 2020 17:33:21 +0300 Subject: [PATCH 099/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9723ffbd..e02e337f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1228,6 +1228,7 @@ Articles types: | [Protecting your data against unauthorised reads on SQL Server] | Monin | 2020-06-24 | [SEC] | | [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | | [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | +| [Row Versioning Concurrency in SQL Server] | Kalen Delaney | 2014-06-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2430,3 +2431,4 @@ Articles types: [Protecting your data against unauthorised reads on SQL Server]:https://monin-it.be/2020/06/23/protectingyourdata/ [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea]:https://www.brentozar.com/archive/2018/02/set-implicit_transactions-one-hell-bad-idea/ [Tempdb: The Ghost Of Version Store]:https://kohera.be/blog/sql-server/tempdb-the-ghost-of-version-store/ +[Row Versioning Concurrency in SQL Server]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ From 833594384d8acb1bd5b042c777c969e90be1b679 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 30 Sep 2020 17:40:48 +0300 Subject: [PATCH 100/553] Add new must read tempdb article --- Articles/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index e02e337f..ddc78153 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1228,7 +1228,7 @@ Articles types: | [Protecting your data against unauthorised reads on SQL Server] | Monin | 2020-06-24 | [SEC] | | [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | | [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | -| [Row Versioning Concurrency in SQL Server] | Kalen Delaney | 2014-06-05 | [DBA][DEV] | +| [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)] | Glenn Boonen | 2020-05-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2432,3 +2432,4 @@ Articles types: [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea]:https://www.brentozar.com/archive/2018/02/set-implicit_transactions-one-hell-bad-idea/ [Tempdb: The Ghost Of Version Store]:https://kohera.be/blog/sql-server/tempdb-the-ghost-of-version-store/ [Row Versioning Concurrency in SQL Server]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ +[When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)]:https://kohera.be/blog/sql-server/when-tempdb-becomes-permanentdb/ From 257fb44eaeb0eefed34c25f5d5e74c5cace12753 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 1 Oct 2020 17:41:40 +0300 Subject: [PATCH 101/553] Add 5011 error --- Errors/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Errors/README.md b/Errors/README.md index 4c1b353f..a8ca1537 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -153,6 +153,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 4934 | Computed column '%.*ls' in table '%.*ls' cannot be persisted because the column does user or … | [4934_link1] | | 4947 | ALTER TABLE SWITCH statement failed. There is no identical index in source table '%.*ls' for the … | [4947_link1][18] | | 5004 | To use ALTER DATABASE, the database must be in a writable state in which a checkpoint can be executed. | [5004_link1] | +| 5011 | User does not have permission to alter database '%.*ls', the database does not exist, or the database … | [5011_link1][49] | | 5061 | ALTER DATABASE failed because a lock could not be placed on database '%.*ls'. Try again later. | [5061_link1] | | 5084 | Setting database option %ls to %ls for database '%.*ls'. | [5084_link1][43] | | 5120 | Unable to open the physical file ... Operating system error 5: "5(Access is denied.)" … | [SQL SERVER - FIX Error 5120] | @@ -289,6 +290,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [46]:https://www.mssqltips.com/sqlservertip/6279/prevent-sql-server-blocking-using-locktimeout/ [47]:https://www.sqlshack.com/sql-varchar-data-type-deep-dive/ [48]:https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ +[49]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ From c4e51af74adbd49e9b0a43e9484b45c8c34bb218 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 2 Oct 2020 17:43:04 +0300 Subject: [PATCH 102/553] Add 3956 error --- Errors/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Errors/README.md b/Errors/README.md index a8ca1537..8f9eb269 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -144,6 +144,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 3743 | The database '%.*ls' is enabled for database mirroring. Database mirroring must be removed befor … | [3743_link1] | | 3906 | Failed to update database "%.*ls" because the database is read-only. | [3906_link1] | | 3930 | The current transaction cannot be committed and cannot support operations that write to the log … | [3930_link1] | +| 3956 | Snapshot isolation transaction failed to start in database '%.*ls' because the ALTER DATABASE command … | [3956_link1][49] | | 4064 | Cannot open user default database. Login failed.Login failed. … | [4064_link1] | | 4189 | Cannot convert to text/ntext or collate to '%.*ls' because these legacy LOB types do not support UTF-8 … | [4189_link1][21] | | 4353 | Conflicting file relocations have been specified for file '%.*ls'. Only a single WITH MOVE clause … | [4353_link1] | From dbf3183516358381294b8ac7079bd0e8dc305e97 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 3 Oct 2020 17:44:19 +0300 Subject: [PATCH 103/553] Add 3960 error --- Errors/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Errors/README.md b/Errors/README.md index 8f9eb269..fe6615a3 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -145,6 +145,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 3906 | Failed to update database "%.*ls" because the database is read-only. | [3906_link1] | | 3930 | The current transaction cannot be committed and cannot support operations that write to the log … | [3930_link1] | | 3956 | Snapshot isolation transaction failed to start in database '%.*ls' because the ALTER DATABASE command … | [3956_link1][49] | +| 3960 | Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to … | [3960_link1][49] | | 4064 | Cannot open user default database. Login failed.Login failed. … | [4064_link1] | | 4189 | Cannot convert to text/ntext or collate to '%.*ls' because these legacy LOB types do not support UTF-8 … | [4189_link1][21] | | 4353 | Conflicting file relocations have been specified for file '%.*ls'. Only a single WITH MOVE clause … | [4353_link1] | From 3f49d4e85f7ca49247d56c99cd4ee65132328f24 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 4 Oct 2020 12:31:45 +0300 Subject: [PATCH 104/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ddc78153..bb583226 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1229,6 +1229,7 @@ Articles types: | [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | | [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | | [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)] | Glenn Boonen | 2020-05-07 | [DBA][DEV] | +| [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2433,3 +2434,4 @@ Articles types: [Tempdb: The Ghost Of Version Store]:https://kohera.be/blog/sql-server/tempdb-the-ghost-of-version-store/ [Row Versioning Concurrency in SQL Server]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)]:https://kohera.be/blog/sql-server/when-tempdb-becomes-permanentdb/ +[A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ From a2b88a8d0dc4c458720182334ae409cac0962ae3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 5 Oct 2020 12:37:25 +0300 Subject: [PATCH 105/553] Improve T-SQL Programming Style --- ... Convention and T-SQL Programming Style.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index a95010d1..21fdc7a6 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -268,7 +268,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. ``` If a new column is added to `SalesOrder` table in the future, but not to `SalesOrderArchive`, the `INSERT` will fail. Which sounds bad, but it's actually a really good thing! Because the alternative is much worse. - If all the columns were listed on the `INSERT` and the `SELECT`, then the `INSERT` would succeed, and so would the following DELETE (which is effectively `DELETE *`). + If all the columns were listed on the `INSERT` and the `SELECT`, then the `INSERT` would succeed, and so would the following `DELETE` (which is effectively `DELETE *`). Production code that succeeds doesn't get any attention, and it may be a long time before someone notices that the new column is not being archived, but being silently deleted altogether. More details [here](https://dba.stackexchange.com/a/253917/107045). - No square brackets `[]` and [reserved words](https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Check_Reserved_Words_For_Object_Names.sql) in object names and alias, use only Latin symbols **`[A-z]`** and numeric **`[0-9]`**. @@ -556,23 +556,23 @@ GO ALTER PROCEDURE dbo.usp_StoredProcedure( - @parameterValue1 smallint - , @parameterValue2 nvarchar(300) - , @debug bit = 0 + @parameterValue1 smallint + , @parameterValue2 nvarchar(300) + , @debug bit = 0 ) /* - Simple example of tsql procedure - nothing - No - Konstantin Taranov - 2019-01-01 - 2019-11-25 by Konstantin Taranov - 1.2 - - - EXECUTE dbo.usp_StoredProcedure - @parameterValue1 = 0 - , @parameterValue2 = N'BULK' + Simple example of tsql procedure + nothing + No + Konstantin Taranov + 2019-01-01 + 2019-11-25 by Konstantin Taranov + 1.2 + - + EXECUTE dbo.usp_StoredProcedure + @parameterValue1 = 0 + , @parameterValue2 = N'BULK' */ AS From c6563ef65d46c80efdb40143a5fa7ae1b7382479 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 6 Oct 2020 12:43:10 +0300 Subject: [PATCH 106/553] Improve T-SQL Programming Style --- ...me Convention and T-SQL Programming Style.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 21fdc7a6..35fb7929 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -201,12 +201,12 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Recommended function | Not Recommended | Why | More details | -|----------------------|-----------------|---------------------------------------------------------------------------------------------|--------------| -| [`<>`][12] | [`!=`][12] | `<>` is `ANSI`, `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CAST`][10] | [`CONVERT`][10] | `CAST` is `ANSI` | [14],[15] | -| [`COALECSE`] | [`ISNULL`] | `COALECSE` is `ANSI` and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | -| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| Recommended function | Not Recommended | Why | More details | +|----------------------|-----------------|-----------------------------------------------------------------------------------------------|--------------| +| [`<>`][12] | [`!=`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | +| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -272,9 +272,9 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. Production code that succeeds doesn't get any attention, and it may be a long time before someone notices that the new column is not being archived, but being silently deleted altogether. More details [here](https://dba.stackexchange.com/a/253917/107045). - No square brackets `[]` and [reserved words](https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Check_Reserved_Words_For_Object_Names.sql) in object names and alias, use only Latin symbols **`[A-z]`** and numeric **`[0-9]`**. - - Prefer [ANSI syntax](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) and functions ([`CAST`][10] instead [`CONVERT`][10], [`COALESE`](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql) instead [`ISNULL`](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), etc.). + - Prefer [`ANSI`](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) syntax and functions ([`CAST`][10] instead [`CONVERT`][10], [`COALESE`](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql) instead [`ISNULL`](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), etc.). - All finished expressions should have semicolon `;` at the end. - This is ANSI standard and Microsoft announced with the SQL Server 2008 release that semicolon statement terminators will become mandatory in a future version so statement terminators other than semicolons (whitespace) are currently deprecated. + This is [`ANSI`] standard and Microsoft announced with the SQL Server 2008 release that semicolon statement terminators will become mandatory in a future version so statement terminators other than semicolons (whitespace) are currently deprecated. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. @@ -754,3 +754,4 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure [11]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql#best-practices [explicit transactions]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql [autocommit]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql +[`ANSI`](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) From 56dc588a9a5a442a9bdcf649fbad4f9f3e0799a1 Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Tue, 6 Oct 2020 16:13:56 +0300 Subject: [PATCH 107/553] Add 5 new SQL Server Backup Tools --- Utilities/README.md | 100 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 6dcaacf0..540540a8 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,8 +1,8 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **374** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **379** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {11} + - **[B]**: Backup solutions {16} - **[BI]**: Business Intelligence Solutions {4} - **[D]**: Documentation solutions {8} - **[DA]**: Database Architecture {20} @@ -351,6 +351,7 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | | [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | | [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | +| [Veeam Explorer for Microsoft SQL Server](#veeam-explorer) | ? | ? | [B] | [Veeam Explorer for Microsoft SQL Server] | ? | Veeam | Shareware | No | ? | | [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | | [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | | [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | @@ -397,8 +398,12 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Database Copy](#sql-database-copy) | No | No | [MG] | [SQL Database Copy] | 2017-07-25 | ryanovic | [MIT] | Open Source | No | | [SQL Delta Duo for SQL Server](#sql-delta-duo-for-sql-server) | No | No | [?] | [SQL Delta Duo for SQL Server] | ? | The Australian Software Company | | No | $370 | | [SQL Trace Replay](#sql-trace-replay) | No | No | [?] | [SQL Trace Replay] | ? | Mikhail Shilkov | [MIT] | Open Source | No | -| [SQL Workload Profiler](#sql-workload-profiler) | No | No | [?] | [SQL Workload Profiler] | 2014-10-01 | Chris Bailiss | | Yes | No | -| [SQLDBdiff](#sqldbdiff) | No | Linux | [?] | [SQLDBdiff] | ? | SQLDBtools | | Yes | $60 | +| [SQL Workload Profiler](#sql-workload-profiler) | No | No | [?] | [SQL Workload Profiler] | 2014-10-01 | Chris Bailiss | | Yes | No | +| [SQLDBdiff](#sqldbdiff) | No | Linux | [?] | [SQLDBdiff] | ? | SQLDBtools | | Yes | $60 | +| [SQL Backup Master](#sql-backup-master) | No | No | [B] | [SQL Backup Master] | ? | Key Metric Software | | Yes | $49 | +| [Handy Backup Server](#handy-backup-server) | Oracle,MySQL,PostgreSQL,Other | Linux | [B] | [Handy Backup Server] | 2019-03-11 | Novosoft | | No | $39 | +| [EaseUS Todo Backup Server](#easeus-todo-backup-server) | No | No | [B] | [EaseUS Todo Backup Server] | ? | EaseUS | | No | $39 | +| [SqlBackupFree](#sqlbackupfree) | No | No | [B] | [SqlBackupFree] | ? | pranas.net | | Yes | No | ## SSMS @@ -5843,6 +5848,88 @@ Price: $60 - SQL Server properties. +## SQL Backup Master + +Download page: [SQL Backup Master]
+Release date: ?
+Support Version: 2005-2019
+Author: Key Metric Software
+Free version: Yes
+Price: $49 + + - Supports full, differential, and transaction log backups + - Simple yet powerful backup job scheduling + - Built-in email notifications for backup job successes, failures, and warnings + - Back up to local folders, network folders, or attached storage devices + - Back up to FTP servers with first-class FTP, SFTP, & FTPS support + - Back up to Dropbox, Google Drive, Box, Amazon S3, OneDrive, & Azure + + +## Handy Backup Server + +Download page: [Handy Backup Server]
+Release date: 2019-03-11
+Support Version: 2005-2019
+Author: Novosoft
+Free version: Yes
+Price: $39 + + - Automating All Operations + - Native and Generic Database Backup + - Other Server Data Backup + - Saving Snapshots of Virtual Machines + - Using Modern Local and Online Data Storages + - Dealing with OS older than Windows Server 2019 or other + + +## Veeam Explorer for Microsoft SQL Server + +Download page: [Veeam Explorer for Microsoft SQL Server]
+Release date: ?
+Support Version: ?
+Author: Veeam
+Free version: No
+Price: ? + + - Full database and table level recovery + - Perform quick point-in-time restore + - Delegate restore tasks to SQL DBAs + - Part of Veeam Backup & Replication + - Recover one or multiple databases simultaneously from a single-pass image level backup + - Restore entire Microsoft SQL databases down to the table level + - Microsoft SQL log backup provides transaction log replay to restore to a specific point in time + + +## EaseUS Todo Backup Server + +Download page: [EaseUS Todo Backup Server]
+Release date: ?
+Support Version: ?
+Author: EaseUS
+Free version: No
+Price: $39 + + - Add new backup tasks on disk, partition, system, mail and other data + - Select a source system/disk/partition, target a location to store copies and clone fast + - Create a bootable WinPE/Linux bootable USB/DVD/CD to restart the system from it + - Check backup logs, replicate backup issues, and restore data from exact backup files + - P2V copy, P2V recovery, P2V conversion. Clone, restore, and convert backup to the virtual machine + + +## SqlBackupFree + +Download page: [SqlBackupFree]
+Release date: ?
+Support Version: ?
+Author: pranas.net
+Free version: Yes
+Price: No + + - Schedule SQL Server Database Backups. Full backups + - Compress (zip) the backups + - Send backups to FTP, local, network folder or HDD drive + - Send e-mail confirmation on job success or failure + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -6218,6 +6305,11 @@ Price: $60 [SQL Database Copy]:https://github.com/ryanovic/SqlDatabaseCopy [SQL Delta Duo for SQL Server]:https://sqldelta.com/products [SQL Trace Replay]:https://github.com/mikhailshilkov/sql-trace-replay +[SQL Backup Master]:https://www.sqlbackupmaster.com +[Handy Backup Server]:https://www.handybackup.net/handybackup-server.shtml +[Veeam Explorer for Microsoft SQL Server]:https://www.veeam.com/microsoft-sql-server-explorer.html +[EaseUS Todo Backup Server]:https://www.easeus.com/backup-software/tb-enterprise.html +[SqlBackupFree]:http://sqlbackupfree.com [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 53248510fc427e7437f70744d7feea1cfbf053bf Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 7 Oct 2020 12:51:39 +0300 Subject: [PATCH 108/553] Add Do not use nested transactions recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 35fb7929..58494227 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -284,6 +284,9 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. More details [here](https://www.sentryone.com/blog/aaronbertrand/backtobasics-lower-case-data-types). - All system database and tables must be in **lowercase** for properly working for Case Sensitive instance: `master, sys.tables …`. + - Do not use [nested transactions](https://docs.microsoft.com/en-us/sql/ado/guide/data/transaction-processing#nested-transactions). + The commit of a nested transaction has absolutely no effect – as the only transaction that really exists as far as SQL Server is concerned is the outer one. + More details [here](https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/). - Whenever you have data modification on non-temporary tables, is to use [explicit transactions] over [autocommit]. 1. If you have a stored procedure which is simply running a `SELECT` statement, use [autocommit]. 2. If you have a stored procedure which performs data modification on non-temporary tables, use an [explicit transaction] only over the area which modifies data. From ffa2663543f84e0e7fd7fe2daf72f895cf2ed0fc Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Wed, 7 Oct 2020 17:31:39 +0300 Subject: [PATCH 109/553] Add 5 new SQL Server Tools --- Utilities/README.md | 86 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 540540a8..87b4cc6f 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **379** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **384** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - **[B]**: Backup solutions {16} @@ -20,8 +20,8 @@ Utility types (main purpose), in braces `{}` current counts: - **[SEC]**: Security tools {7} - **[SC]**: Structure compare {21} - **[ST]**: Statistics utilities {3} - - **[T]**: Testing tools {6} - - **[?]**: Not yet classified {146} + - **[T]**: Testing tools {7} + - **[?]**: Not yet classified {150} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-------------------------|------------|----------------|------:| @@ -68,6 +68,7 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | | [Elastic database tools](#elastic-database-tools) | No | No | [?] | [Elastic database tools] | ? | Microsoft | | Yes | No | | [Microsoft Sync Framework](#microsoft-sync-framework) | No | No | [?] | [Microsoft Sync Framework] | 2020-04-22 | Microsoft | | Yes | No | +| [Query Performance Insight for Azure SQL Database](#query-perf) | No | No | [?] | [Query Performance Insight for Azure SQL Database]| ? | Microsoft | | Yes | No | | [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | | [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | | [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | @@ -404,6 +405,10 @@ Utility types (main purpose), in braces `{}` current counts: | [Handy Backup Server](#handy-backup-server) | Oracle,MySQL,PostgreSQL,Other | Linux | [B] | [Handy Backup Server] | 2019-03-11 | Novosoft | | No | $39 | | [EaseUS Todo Backup Server](#easeus-todo-backup-server) | No | No | [B] | [EaseUS Todo Backup Server] | ? | EaseUS | | No | $39 | | [SqlBackupFree](#sqlbackupfree) | No | No | [B] | [SqlBackupFree] | ? | pranas.net | | Yes | No | +| [ERDPlus](#erdplus) | No | No | [?] | [ERDPlus] | 2020-05-24 | ERDPlus | | ? | ? | +| [SentryOne Test](#sentryone-test) | No | No | [T] | [SentryOne Test] | ? | SQL Sentry | | No | $828 | +| [Code Quality and Security for T-SQL](#sonarsource) | No | No | [?] | [Code Quality and Security for T-SQL] | ? | SonarSource | | No | €120 | +| [DBBALANCE](#dbbalance) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [DBBALANCE] | ? | DBBalance | | No | ? | ## SSMS @@ -5930,6 +5935,76 @@ Price: No - Send backups to FTP, local, network folder or HDD drive - Send e-mail confirmation on job success or failure + +## ERDPlus + +Download page: [ERDPlus]
+Release date: ?
+Support Version: ?
+Author: ERDPlus
+Free version: ?
+Price: ? + +A database modeling tool for creating Entity Relationship Diagrams, Relational Schemas, Star Schemas, and SQL DDL statements. + + +## SentryOne Test + +Download page: [SentryOne Test]
+Release date: ?
+Support Version: ?
+Author: SQL Sentry
+Free version: No
+Price: $828 + + - Quickly build tests with wizards + - Simplify unit testing + - Build tests within Visual Studio + - Create custom testing modules + - Reconcile and verify data + - Conduct BI testing + + +## Query Performance Insight for Azure SQL Database + +Download page: [Query Performance Insight for Azure SQL Database]
+Release date: ?
+Support Version: Azure
+Author: Microsoft
+Free version: Yes
+Price: No + + - Deeper insight into your databases resource (DTU) consumption + - Details on top database queries by CPU, duration, and execution count (potential tuning candidates for performance improvements) + - The ability to drill down into details of a query, to view the query text and history of resource utilization + - Annotations that show performance recommendations from database advisors + + +## Code Quality and Security for T-SQL + +Download page: [Code Quality and Security for T-SQL]
+Release date: ?
+Support Version: ?
+Author: SonarSource
+Free version: Yes
+Price: €120 + +SonarSource provides static code analysis for T-SQL projects. Based on our own T-SQL compiler front-end, it uses the most advanced techniques (pattern matching, program flow analysis) to analyze code and find Code Smells, Bugs, and Security Vulnerabilities. As with everything we develop at SonarSource, it was built on the principles of depth, accuracy, and speed. + +## DBBALANCE + +Download page: [DBBALANCE]
+Release date: ?
+Support Version: ?
+Author: DBBalance
+Free version: No
+Price: ? + + - Data and Schema Synchronization + - Data and Schema Comparison + - Database Migration + - Database Development + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -6310,6 +6385,11 @@ Price: No [Veeam Explorer for Microsoft SQL Server]:https://www.veeam.com/microsoft-sql-server-explorer.html [EaseUS Todo Backup Server]:https://www.easeus.com/backup-software/tb-enterprise.html [SqlBackupFree]:http://sqlbackupfree.com +[ERDPlus]:https://erdplus.com +[SentryOne Test]:https://www.sentryone.com/products/sentryone-test +[Query Performance Insight for Azure SQL Database]:https://docs.microsoft.com/en-us/azure/azure-sql/database/query-performance-insight-use +[Code Quality and Security for T-SQL]:https://www.sonarsource.com/tsql +[DBBALANCE]:http://www.dbbalance.com [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 74326e836202a810dd295e70391a0bda84392f6b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 8 Oct 2020 12:55:52 +0300 Subject: [PATCH 110/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index bb583226..0a25f29a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1230,6 +1230,7 @@ Articles types: | [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | | [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)] | Glenn Boonen | 2020-05-07 | [DBA][DEV] | | [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | +| [The Best Medium-Hard Data Analyst SQL Interview Questions] | Zachary Thomas | 2020-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2435,3 +2436,4 @@ Articles types: [Row Versioning Concurrency in SQL Server]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)]:https://kohera.be/blog/sql-server/when-tempdb-becomes-permanentdb/ [A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ +[The Best Medium-Hard Data Analyst SQL Interview Questions]:https://quip.com/2gwZArKuWk7W From a6c89cf4c8ef0cb22a653de134f7d699320133e8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 8 Oct 2020 13:54:29 +0300 Subject: [PATCH 111/553] Fix broken links --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8572db17..32fd1ae8 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [udf_SplitStringByDelimiter](/User_Defined_Function/udf_SplitStringByDelimiter.sql) - [udf_Tally](/User_Defined_Function/udf_Tally.sql) - and many others... - - [Utilities](/Utilities) (**Complete list of 346 SQL Server paid and free Utilities and Tools**) + - [Utilities](/Utilities) (**Complete list of 384 SQL Server paid and free Utilities and Tools**) **[⬆ back to top](#table-of-contents)** @@ -204,13 +204,12 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Data Driven](http://datadriven.tv/) (by Frank La Vigne and Andy Leonard) - [SQL Undercover Podcast](https://sqlundercover.com/category/podcast/) (by David Fowler and Adrian Buckman) - [Dallas DBAs](https://dallasdbas.com/) (by Kevin Hill) - - [Dear SQL DBA](https://sqlworkbooks.com/dear-sql-dba/) (by Kendra Little) - [SQL Server Pain Relief: Office Hours](https://www.stitcher.com/podcast/sql-server-pain-relief-office-hours-with-brent-ozar-unlimitedr) (by Brent Ozar) - [Azure DevOps Podcast](http://azuredevopspodcast.clear-measure.com/) (by Microsoft) - Courses - Free - [Learning Extended Events in 60 Days](https://jasonbrimhall.info/2015/09/08/learning-extended-events-in-60-days/) and new [link](http://sqlxevents.com/) (by Jason Brimhall) - - [Learn SQL Server by solving problems](https://sqlworkbooks.com/courses-overview/) (by Little Kendra) + - [Learn SQL Server by solving problems](https://littlekendra.com/courses-overview/) (by Little Kendra) - [Codecademy Learn SQL](https://www.codecademy.com/learn/learn-sql) - [Codecademy SQL: Table Transformation](https://www.codecademy.com/learn/sql-table-transformation) - [Codecademy SQL: Analyzing Business Metrics](https://www.codecademy.com/learn/sql-analyzing-business-metrics) From d48b2bda6e12f7632836ae0020c17613bb89a8eb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 9 Oct 2020 12:58:31 +0300 Subject: [PATCH 112/553] Add new good article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0a25f29a..c36e02c8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1231,6 +1231,7 @@ Articles types: | [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)] | Glenn Boonen | 2020-05-07 | [DBA][DEV] | | [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | | [The Best Medium-Hard Data Analyst SQL Interview Questions] | Zachary Thomas | 2020-01-01 | [DBA][DEV] | +| [Starting SQL: Why Not Make Everything Dynamic?] | Eric Darling | 2020-09-28 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2437,3 +2438,4 @@ Articles types: [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)]:https://kohera.be/blog/sql-server/when-tempdb-becomes-permanentdb/ [A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ [The Best Medium-Hard Data Analyst SQL Interview Questions]:https://quip.com/2gwZArKuWk7W +[Starting SQL: Why Not Make Everything Dynamic?]:https://www.erikdarlingdata.com/starting-sql/starting-sql-why-not-make-everything-dynamic/ From a906efebf6488f6f7963321a0c8472916a90f1b4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 10 Oct 2020 13:00:55 +0300 Subject: [PATCH 113/553] Add new dbatools article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c36e02c8..c7c71c19 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1232,6 +1232,7 @@ Articles types: | [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | | [The Best Medium-Hard Data Analyst SQL Interview Questions] | Zachary Thomas | 2020-01-01 | [DBA][DEV] | | [Starting SQL: Why Not Make Everything Dynamic?] | Eric Darling | 2020-09-28 | [DBA][DEV] | +| [dbatools multithreading commands] | Kin | 2019-01-04 | [PS] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2439,3 +2440,4 @@ Articles types: [A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ [The Best Medium-Hard Data Analyst SQL Interview Questions]:https://quip.com/2gwZArKuWk7W [Starting SQL: Why Not Make Everything Dynamic?]:https://www.erikdarlingdata.com/starting-sql/starting-sql-why-not-make-everything-dynamic/ +[dbatools multithreading commands]:https://dbatools.io/multithread/ From 8ac9a8c5d6fdc3eb299e17495e79925c168694d2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 11 Oct 2020 13:06:42 +0300 Subject: [PATCH 114/553] Add new security artile --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c7c71c19..92db1f09 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1233,6 +1233,7 @@ Articles types: | [The Best Medium-Hard Data Analyst SQL Interview Questions] | Zachary Thomas | 2020-01-01 | [DBA][DEV] | | [Starting SQL: Why Not Make Everything Dynamic?] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [dbatools multithreading commands] | Kin | 2019-01-04 | [PS] | +| [Preventing Brute Force Attacks in SQL Server] | Raul Gonzalez | 2020-01-01 | [SEC] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2441,3 +2442,4 @@ Articles types: [The Best Medium-Hard Data Analyst SQL Interview Questions]:https://quip.com/2gwZArKuWk7W [Starting SQL: Why Not Make Everything Dynamic?]:https://www.erikdarlingdata.com/starting-sql/starting-sql-why-not-make-everything-dynamic/ [dbatools multithreading commands]:https://dbatools.io/multithread/ +[Preventing Brute Force Attacks in SQL Server]:https://blog.coeo.com/preventing-brute-force-attacks-in-sql-server From d8b6705a3cd0ca5e9acd40590a2f3482f2dee53e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 12 Oct 2020 13:08:25 +0300 Subject: [PATCH 115/553] Add new CLR article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 92db1f09..032f26e1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1234,6 +1234,7 @@ Articles types: | [Starting SQL: Why Not Make Everything Dynamic?] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [dbatools multithreading commands] | Kin | 2019-01-04 | [PS] | | [Preventing Brute Force Attacks in SQL Server] | Raul Gonzalez | 2020-01-01 | [SEC] | +| [Asynchronous T-SQL Execution Without Service Broker] | Oleg Vorkunov | 2008-09-15 | [CLR] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2443,3 +2444,4 @@ Articles types: [Starting SQL: Why Not Make Everything Dynamic?]:https://www.erikdarlingdata.com/starting-sql/starting-sql-why-not-make-everything-dynamic/ [dbatools multithreading commands]:https://dbatools.io/multithread/ [Preventing Brute Force Attacks in SQL Server]:https://blog.coeo.com/preventing-brute-force-attacks-in-sql-server +[Asynchronous T-SQL Execution Without Service Broker]:https://www.codeproject.com/Articles/29356/Asynchronous-T-SQL-Execution-Without-Service-Broke From 2b367e5a8f08b88b9464f16f32f3b9f04d789208 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 13 Oct 2020 13:10:25 +0300 Subject: [PATCH 116/553] Add new SSIS article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 032f26e1..232a2e76 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1235,6 +1235,7 @@ Articles types: | [dbatools multithreading commands] | Kin | 2019-01-04 | [PS] | | [Preventing Brute Force Attacks in SQL Server] | Raul Gonzalez | 2020-01-01 | [SEC] | | [Asynchronous T-SQL Execution Without Service Broker] | Oleg Vorkunov | 2008-09-15 | [CLR] | +| [Using hash values in SSIS to determine when to insert or update rows] | Koen Verbeeck | 2019-10-15 | [SSIS] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2445,3 +2446,4 @@ Articles types: [dbatools multithreading commands]:https://dbatools.io/multithread/ [Preventing Brute Force Attacks in SQL Server]:https://blog.coeo.com/preventing-brute-force-attacks-in-sql-server [Asynchronous T-SQL Execution Without Service Broker]:https://www.codeproject.com/Articles/29356/Asynchronous-T-SQL-Execution-Without-Service-Broke +[Using hash values in SSIS to determine when to insert or update rows]:https://www.mssqltips.com/sqlservertip/3170/using-hash-values-in-ssis-to-determine-when-to-insert-or-update-rows/ From d5677478ca6898d8aca22dfe68dc340945238aaa Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 14 Oct 2020 13:21:04 +0300 Subject: [PATCH 117/553] Add new XE article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 232a2e76..fa617010 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1236,6 +1236,7 @@ Articles types: | [Preventing Brute Force Attacks in SQL Server] | Raul Gonzalez | 2020-01-01 | [SEC] | | [Asynchronous T-SQL Execution Without Service Broker] | Oleg Vorkunov | 2008-09-15 | [CLR] | | [Using hash values in SSIS to determine when to insert or update rows] | Koen Verbeeck | 2019-10-15 | [SSIS] | +| [Capturing Queries Can Be A Pain] | Grant Fritchey | 2020-08-03 | [XE] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2447,3 +2448,4 @@ Articles types: [Preventing Brute Force Attacks in SQL Server]:https://blog.coeo.com/preventing-brute-force-attacks-in-sql-server [Asynchronous T-SQL Execution Without Service Broker]:https://www.codeproject.com/Articles/29356/Asynchronous-T-SQL-Execution-Without-Service-Broke [Using hash values in SSIS to determine when to insert or update rows]:https://www.mssqltips.com/sqlservertip/3170/using-hash-values-in-ssis-to-determine-when-to-insert-or-update-rows/ +[Capturing Queries Can Be A Pain]:https://www.scarydba.com/2020/08/03/capturing-queries-can-be-a-pain/ From 5063134eb9ecf1849cafdc33ba7a21dc6bf6354b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 15 Oct 2020 13:24:56 +0300 Subject: [PATCH 118/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fa617010..bcd6929b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1237,6 +1237,7 @@ Articles types: | [Asynchronous T-SQL Execution Without Service Broker] | Oleg Vorkunov | 2008-09-15 | [CLR] | | [Using hash values in SSIS to determine when to insert or update rows] | Koen Verbeeck | 2019-10-15 | [SSIS] | | [Capturing Queries Can Be A Pain] | Grant Fritchey | 2020-08-03 | [XE] | +| [Building full-text indexes using the Sphinx search engine] | Hadi Fadlallah | 2020-08-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2449,3 +2450,4 @@ Articles types: [Asynchronous T-SQL Execution Without Service Broker]:https://www.codeproject.com/Articles/29356/Asynchronous-T-SQL-Execution-Without-Service-Broke [Using hash values in SSIS to determine when to insert or update rows]:https://www.mssqltips.com/sqlservertip/3170/using-hash-values-in-ssis-to-determine-when-to-insert-or-update-rows/ [Capturing Queries Can Be A Pain]:https://www.scarydba.com/2020/08/03/capturing-queries-can-be-a-pain/ +[Building full-text indexes using the Sphinx search engine]:https://www.sqlshack.com/building-full-text-indexes-using-the-sphinx-search-engine/ From a40dd58469bf1c2d7781f834bac780eff4a8c605 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 16 Oct 2020 18:15:42 +0300 Subject: [PATCH 119/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index bcd6929b..38f07d35 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1238,6 +1238,7 @@ Articles types: | [Using hash values in SSIS to determine when to insert or update rows] | Koen Verbeeck | 2019-10-15 | [SSIS] | | [Capturing Queries Can Be A Pain] | Grant Fritchey | 2020-08-03 | [XE] | | [Building full-text indexes using the Sphinx search engine] | Hadi Fadlallah | 2020-08-04 | [DBA][DEV] | +| [Starting SQL: Measuring A Query] | Eric Darling | 2020-09-28 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2451,3 +2452,4 @@ Articles types: [Using hash values in SSIS to determine when to insert or update rows]:https://www.mssqltips.com/sqlservertip/3170/using-hash-values-in-ssis-to-determine-when-to-insert-or-update-rows/ [Capturing Queries Can Be A Pain]:https://www.scarydba.com/2020/08/03/capturing-queries-can-be-a-pain/ [Building full-text indexes using the Sphinx search engine]:https://www.sqlshack.com/building-full-text-indexes-using-the-sphinx-search-engine/ +[Starting SQL: Measuring A Query]:https://www.erikdarlingdata.com/starting-sql/starting-sql-measuring-a-query/ From 9b4a2e7d03b3159d22300d16650c32176b887416 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 16 Oct 2020 18:26:26 +0300 Subject: [PATCH 120/553] Add Using SET instead of SELECT when assigning variables recommendation --- ...me Convention and T-SQL Programming Style.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 58494227..4f7ffe3a 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -201,12 +201,13 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Recommended function | Not Recommended | Why | More details | -|----------------------|-----------------|-----------------------------------------------------------------------------------------------|--------------| -| [`<>`][12] | [`!=`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14],[15] | -| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | -| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| Recommended function | Not Recommended | Why | More details | +|----------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| [`<>`][12] | [`!=`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | +| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| [`SET`] | [`SEELCT`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -221,6 +222,10 @@ This is only recommendations! But it is consistent for choosing only 1 function [`SARGable`]:https://www.sqlshack.com/how-to-use-sargable-expressions-in-t-sql-queries-performance-advantages-and-examples/ [18]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ [19]:https://dba.stackexchange.com/q/132437/107045 +[`SET`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/set-local-variable-transact-sql +[`SEELCT`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/select-local-variable-transact-sql +[20]:https://assets.red-gate.com/community/books/defensive-database-programming.pdf +[21]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ **[⬆ back to top](#table-of-contents)** From 6d0d32461d824b244ddba6a156b888d63cba20e2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 17 Oct 2020 18:28:07 +0300 Subject: [PATCH 121/553] Add new good article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 38f07d35..838552f3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1239,6 +1239,7 @@ Articles types: | [Capturing Queries Can Be A Pain] | Grant Fritchey | 2020-08-03 | [XE] | | [Building full-text indexes using the Sphinx search engine] | Hadi Fadlallah | 2020-08-04 | [DBA][DEV] | | [Starting SQL: Measuring A Query] | Eric Darling | 2020-09-28 | [DBA][DEV] | +| [When to use SET vs SELECT when assigning values to variables in SQL Server] | Atif Shehzad | 2009-11-25 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2453,3 +2454,4 @@ Articles types: [Capturing Queries Can Be A Pain]:https://www.scarydba.com/2020/08/03/capturing-queries-can-be-a-pain/ [Building full-text indexes using the Sphinx search engine]:https://www.sqlshack.com/building-full-text-indexes-using-the-sphinx-search-engine/ [Starting SQL: Measuring A Query]:https://www.erikdarlingdata.com/starting-sql/starting-sql-measuring-a-query/ +[When to use SET vs SELECT when assigning values to variables in SQL Server]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ From be965b3988c43eae9560fdddc6ba78d4aeb583d9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 18 Oct 2020 21:50:20 +0300 Subject: [PATCH 122/553] Add useful info in best practice --- ...Server Name Convention and T-SQL Programming Style.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 4f7ffe3a..f021d2b8 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -204,10 +204,10 @@ This is only recommendations! But it is consistent for choosing only 1 function | Recommended function | Not Recommended | Why | More details | |----------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| | [`<>`][12] | [`!=`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14],[15] | -| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour | [16],[17] | -| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | -| [`SET`] | [`SEELCT`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21] | +| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14][15] | +| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to triming string | [16][17] | +| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18][19] | +| [`SET`] | [`SEELCT`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20][21][22] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -226,6 +226,7 @@ This is only recommendations! But it is consistent for choosing only 1 function [`SEELCT`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/select-local-variable-transact-sql [20]:https://assets.red-gate.com/community/books/defensive-database-programming.pdf [21]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ +[22]:http://vyaskn.tripod.com/differences_between_set_and_select.htm **[⬆ back to top](#table-of-contents)** From 23781db9a398dfe121b69dcab5ddb4bf0751fe91 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 19 Oct 2020 10:14:05 +0300 Subject: [PATCH 123/553] Add useful info --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index f021d2b8..1366a6b1 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -284,7 +284,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. - More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/) and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). + More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/), [here](https://www.brentozar.com/archive/2015/12/give-your-t-sql-a-semicolonoscopy/), and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. From 482b947d8730ba430a20b9dad6a977cc169767b8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 20 Oct 2020 10:14:28 +0300 Subject: [PATCH 124/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 838552f3..a59e194a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1240,6 +1240,7 @@ Articles types: | [Building full-text indexes using the Sphinx search engine] | Hadi Fadlallah | 2020-08-04 | [DBA][DEV] | | [Starting SQL: Measuring A Query] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [When to use SET vs SELECT when assigning values to variables in SQL Server] | Atif Shehzad | 2009-11-25 | [DBA][DEV] | +| [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?] | Narayana Vyas Kondreddi | 2005-10-29 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2455,3 +2456,4 @@ Articles types: [Building full-text indexes using the Sphinx search engine]:https://www.sqlshack.com/building-full-text-indexes-using-the-sphinx-search-engine/ [Starting SQL: Measuring A Query]:https://www.erikdarlingdata.com/starting-sql/starting-sql-measuring-a-query/ [When to use SET vs SELECT when assigning values to variables in SQL Server]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ +[What is the difference between SET and SELECT when assigning values to variables, in T-SQL?]:http://vyaskn.tripod.com/differences_between_set_and_select.htm From 248113f43f2191711455a8dac831d4953e09934c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 21 Oct 2020 10:59:23 +0300 Subject: [PATCH 125/553] dd awesome checkdb article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a59e194a..3bc4ac92 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1241,6 +1241,7 @@ Articles types: | [Starting SQL: Measuring A Query] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [When to use SET vs SELECT when assigning values to variables in SQL Server] | Atif Shehzad | 2009-11-25 | [DBA][DEV] | | [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?] | Narayana Vyas Kondreddi | 2005-10-29 | [DBA][DEV] | +| [CHECKDB From Every Angle: Consistency Checking Options for a VLDB] | Paul Randal | 2007-11-19 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2457,3 +2458,4 @@ Articles types: [Starting SQL: Measuring A Query]:https://www.erikdarlingdata.com/starting-sql/starting-sql-measuring-a-query/ [When to use SET vs SELECT when assigning values to variables in SQL Server]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?]:http://vyaskn.tripod.com/differences_between_set_and_select.htm +[CHECKDB From Every Angle: Consistency Checking Options for a VLDB]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-consistency-checking-options-for-a-vldb/ From 7cc1cd90aef10ed7f6d436e13d80ef310003c1af Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 22 Oct 2020 11:00:37 +0300 Subject: [PATCH 126/553] Add another awesome checkdb article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3bc4ac92..e8baa08d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1241,6 +1241,7 @@ Articles types: | [Starting SQL: Measuring A Query] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [When to use SET vs SELECT when assigning values to variables in SQL Server] | Atif Shehzad | 2009-11-25 | [DBA][DEV] | | [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?] | Narayana Vyas Kondreddi | 2005-10-29 | [DBA][DEV] | +| [CHECKDB From Every Angle: How long will CHECKDB take to run?] | Paul Randal | 2007-11-15 | [DBA] | | [CHECKDB From Every Angle: Consistency Checking Options for a VLDB] | Paul Randal | 2007-11-19 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ @@ -2458,4 +2459,5 @@ Articles types: [Starting SQL: Measuring A Query]:https://www.erikdarlingdata.com/starting-sql/starting-sql-measuring-a-query/ [When to use SET vs SELECT when assigning values to variables in SQL Server]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?]:http://vyaskn.tripod.com/differences_between_set_and_select.htm +[CHECKDB From Every Angle: How long will CHECKDB take to run?]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-how-long-will-checkdb-take-to-run/ [CHECKDB From Every Angle: Consistency Checking Options for a VLDB]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-consistency-checking-options-for-a-vldb/ From 274ac2077d70930c83f13f0a046adb509b8fbedb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 23 Oct 2020 11:18:34 +0300 Subject: [PATCH 127/553] Update trace flag info --- SQL Server Trace Flag.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index a2cc6158..9b9113e6 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -78,6 +78,7 @@ Source links: - Pavel Málek ([t](https://twitter.com/malekpav)) - Andrew Pruski ([b](https://dbafromthecold.com/) | [t](https://twitter.com/dbafromthecold)) - Josh Darnell ([b](https://joshthecoder.com/) | [t](https://twitter.com/josh_the_coder)) +- Andrzej Kukula @@ -2076,8 +2077,6 @@ Link: [KB917825] Function: Shrink will run faster with this trace flag if there are LOB pages that need conversion and/or compaction, because that actions will be skipped.
Link: http://blogs.msdn.com/b/psssql/archive/2008/03/28/how-it-works-sql-server-2005-dbcc-shrink-may-take-longer-than-sql-server-2000.aspx -*Thanks to: Andrzej Kukula* - #### Trace Flag: 2549 @@ -2085,8 +2084,9 @@ Function: Forces the `DBCC CHECKDB` command to assume each database file is on a `DBCC CHECKDB` command builds an internal list of pages to read per unique disk drive across all database files. This logic determines unique disk drives based on the drive letter of the physical file name of each file. **Note: Do not use this trace flag unless you know that each file is based on a unique physical disk.** -**Note: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the PHYSICAL_ONLY option, some users may not see any improvement in performance. +**Note: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the `PHYSICAL_ONLY` option, some users may not see any improvement in performance. While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.**
+Link: [Minimizing the impact of DBCC CHECKDB] Link: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
Link: https://support.microsoft.com/kb/2634571
Link: https://support.microsoft.com/kb/2732669
@@ -2165,11 +2165,12 @@ Link: [KB917825] #### Trace Flag: 2562 -Function: Runs the DBCC CHECKDB command in a single "batch" regardless of the number of indexes in the database. -By default, the DBCC CHECKDB command tries to minimize TempDB resources by limiting the number of indexes or "facts" that it generates by using a "batches" concept. +Function: Runs the `DBCC CHECKDB` command in a single "batch" regardless of the number of indexes in the database. +By default, the `DBCC CHECKDB` command tries to minimize TempDB resources by limiting the number of indexes or "facts" that it generates by using a "batches" concept. But this trace flag forces all processing into one batch. One effect of using this trace flag is that the space requirements for TempDB may increase. TempDB may grow to as much as 5% or more of the user database that is being processed by the DBCC CHECKDB command. -**Note: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the PHYSICAL_ONLY option, some users may not see any improvement in performance. While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.**
+**Note: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the `PHYSICAL_ONLY` option, some users may not see any improvement in performance. While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.**
+Link: [Minimizing the impact of DBCC CHECKDB] Link: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
Link: https://support.microsoft.com/kb/2634571
Link: https://support.microsoft.com/kb/2732669
@@ -2185,7 +2186,7 @@ Function: Runs the `DBCC CHECKDB` command without data purity check unless `DATA For databases upgraded from earlier versions of SQL Server, column-value checks are not enabled by default until `DBCC CHECKDB WITH DATA_PURITY` has been run error free on the database at least once. After this, `DBCC CHECKDB` checks column-value integrity by default.**
Link: [Docs Trace Flags]
-Link: https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb
+Link: [Minimizing the impact of DBCC CHECKDB]
Link: https://support.microsoft.com/kb/2888996
Link: [KB2964518]
Scope: global only @@ -5504,3 +5505,4 @@ Scope: global only [SQL Server 2019 Aggressive Clustered Columnstore Cleanup]:https://www.tarynpivots.com/post/aggressive-clustered-columnstore-cleanup/ [KB153096]:https://support.microsoft.com/kb/153096 [SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html +[Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb From d17c5196b7c49b1bc71a606ce94b4cefc4ea9e46 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 24 Oct 2020 11:21:12 +0300 Subject: [PATCH 128/553] Update thanks to section --- SQL Server Trace Flag.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 9b9113e6..dd247eca 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -79,6 +79,8 @@ Source links: - Andrew Pruski ([b](https://dbafromthecold.com/) | [t](https://twitter.com/dbafromthecold)) - Josh Darnell ([b](https://joshthecoder.com/) | [t](https://twitter.com/josh_the_coder)) - Andrzej Kukula +- Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) +- Wilfred van Dijk @@ -4002,7 +4004,6 @@ Link: https://social.msdn.microsoft.com/forums/sqlserver/en-US/00250311-7991-47b Link: https://support.microsoft.com/kb/2476322
Link: https://www.brentozar.com/archive/2014/06/performance-tuning-sql-server-change-tracking
Link: https://blogs.technet.microsoft.com/smartinez/2013/03/06/sql-server-for-configmgr-2012-ebook-and-top-10-database-issues
-Thanks to: Wilfred van Dijk From c752c005c665100856567f67cfe90187e8bd78e7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 25 Oct 2020 11:33:35 +0300 Subject: [PATCH 129/553] Update KB2634571 link --- SQL Server Trace Flag.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index dd247eca..dfdef906 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -2090,7 +2090,7 @@ This logic determines unique disk drives based on the drive letter of the physic While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.**
Link: [Minimizing the impact of DBCC CHECKDB] Link: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
-Link: https://support.microsoft.com/kb/2634571
+Link: [KB2634571]
Link: https://support.microsoft.com/kb/2732669
Link: [Docs Trace Flags]
Link: [KB2964518]
@@ -2174,7 +2174,7 @@ One effect of using this trace flag is that the space requirements for TempDB ma **Note: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the `PHYSICAL_ONLY` option, some users may not see any improvement in performance. While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.**
Link: [Minimizing the impact of DBCC CHECKDB] Link: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
-Link: https://support.microsoft.com/kb/2634571
+Link: [KB2634571]
Link: https://support.microsoft.com/kb/2732669
Link: [Docs Trace Flags]
Link: [KB2964518]
@@ -5507,3 +5507,4 @@ Scope: global only [KB153096]:https://support.microsoft.com/kb/153096 [SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html [Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb +[KB2634571]:https://web.archive.org/web/20150303213855/http://support.microsoft.com/kb/2634571 From 210260f90795e2b5806c14f59f58d2432585e0a9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 26 Oct 2020 11:34:03 +0300 Subject: [PATCH 130/553] Another CheckDB article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e8baa08d..fd43602b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1243,6 +1243,7 @@ Articles types: | [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?] | Narayana Vyas Kondreddi | 2005-10-29 | [DBA][DEV] | | [CHECKDB From Every Angle: How long will CHECKDB take to run?] | Paul Randal | 2007-11-15 | [DBA] | | [CHECKDB From Every Angle: Consistency Checking Options for a VLDB] | Paul Randal | 2007-11-19 | [DBA] | +| [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts] | Aaron Bertrand | 2012-11-29 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2461,3 +2462,4 @@ Articles types: [What is the difference between SET and SELECT when assigning values to variables, in T-SQL?]:http://vyaskn.tripod.com/differences_between_set_and_select.htm [CHECKDB From Every Angle: How long will CHECKDB take to run?]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-how-long-will-checkdb-take-to-run/ [CHECKDB From Every Angle: Consistency Checking Options for a VLDB]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-consistency-checking-options-for-a-vldb/ +[Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb From 5906f2548852841e823360a88126d1c0ae3676fc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 27 Oct 2020 11:40:41 +0300 Subject: [PATCH 131/553] Lets read another DBCC CHECKDB article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fd43602b..74c1a2a1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1244,6 +1244,7 @@ Articles types: | [CHECKDB From Every Angle: How long will CHECKDB take to run?] | Paul Randal | 2007-11-15 | [DBA] | | [CHECKDB From Every Angle: Consistency Checking Options for a VLDB] | Paul Randal | 2007-11-19 | [DBA] | | [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts] | Aaron Bertrand | 2012-11-29 | [DBA] | +| [A faster CHECKDB – Part II] | Bob Ward | 2012-02-23 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2463,3 +2464,4 @@ Articles types: [CHECKDB From Every Angle: How long will CHECKDB take to run?]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-how-long-will-checkdb-take-to-run/ [CHECKDB From Every Angle: Consistency Checking Options for a VLDB]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-consistency-checking-options-for-a-vldb/ [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb +[A faster CHECKDB – Part II]:https://web.archive.org/web/20150315173540/http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx From ea5567fc5e78d5674087d877e47a43b0310ce772 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 28 Oct 2020 11:43:07 +0300 Subject: [PATCH 132/553] New checkdb article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 74c1a2a1..0be0e0ab 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1245,6 +1245,7 @@ Articles types: | [CHECKDB From Every Angle: Consistency Checking Options for a VLDB] | Paul Randal | 2007-11-19 | [DBA] | | [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts] | Aaron Bertrand | 2012-11-29 | [DBA] | | [A faster CHECKDB – Part II] | Bob Ward | 2012-02-23 | [DBA] | +| [A faster CHECKDB – Part III] | Bob Dorr | 2014-11-10 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2465,3 +2466,4 @@ Articles types: [CHECKDB From Every Angle: Consistency Checking Options for a VLDB]:https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-consistency-checking-options-for-a-vldb/ [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb [A faster CHECKDB – Part II]:https://web.archive.org/web/20150315173540/http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx +[A faster CHECKDB – Part III]:https://web.archive.org/web/20150206201933/http://blogs.msdn.com/b/psssql/archive/2014/11/10/a-faster-checkdb-part-iii.aspx From 0b3acc493bc6cbed7c544749f081862141abd01c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 29 Oct 2020 11:51:07 +0300 Subject: [PATCH 133/553] We need more checkdb articles --- Articles/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0be0e0ab..9e111a7e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1246,6 +1246,8 @@ Articles types: | [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts] | Aaron Bertrand | 2012-11-29 | [DBA] | | [A faster CHECKDB – Part II] | Bob Ward | 2012-02-23 | [DBA] | | [A faster CHECKDB – Part III] | Bob Dorr | 2014-11-10 | [DBA] | +| [A faster CHECKDB – Part III] | Bob Dorr | 2015-01-26 | [DBA] | +| [A faster CHECKDB – Part IV (SQL CLR UDTs)] | Bob Dorr | 2015-01-26 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2467,3 +2469,4 @@ Articles types: [Minimizing the impact of DBCC CHECKDB : DOs and DON'Ts]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb [A faster CHECKDB – Part II]:https://web.archive.org/web/20150315173540/http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx [A faster CHECKDB – Part III]:https://web.archive.org/web/20150206201933/http://blogs.msdn.com/b/psssql/archive/2014/11/10/a-faster-checkdb-part-iii.aspx +[A faster CHECKDB – Part IV (SQL CLR UDTs)]:https://web.archive.org/web/20150205043737/http://blogs.msdn.com/b/psssql/archive/2015/01/26/a-faster-checkdb-part-iv-sql-clr-udts.aspx From dae4a6f20e1b06329be0748a34cd057fc93616ba Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 30 Oct 2020 11:52:34 +0300 Subject: [PATCH 134/553] Latest checkdb article i hope --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9e111a7e..f5bb3910 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1248,6 +1248,7 @@ Articles types: | [A faster CHECKDB – Part III] | Bob Dorr | 2014-11-10 | [DBA] | | [A faster CHECKDB – Part III] | Bob Dorr | 2015-01-26 | [DBA] | | [A faster CHECKDB – Part IV (SQL CLR UDTs)] | Bob Dorr | 2015-01-26 | [DBA] | +| [Minimize performance impact of SQL Server DBCC CHECKDB] | Robert Pearl | 2011-06-02 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2470,3 +2471,4 @@ Articles types: [A faster CHECKDB – Part II]:https://web.archive.org/web/20150315173540/http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx [A faster CHECKDB – Part III]:https://web.archive.org/web/20150206201933/http://blogs.msdn.com/b/psssql/archive/2014/11/10/a-faster-checkdb-part-iii.aspx [A faster CHECKDB – Part IV (SQL CLR UDTs)]:https://web.archive.org/web/20150205043737/http://blogs.msdn.com/b/psssql/archive/2015/01/26/a-faster-checkdb-part-iv-sql-clr-udts.aspx +[Minimize performance impact of SQL Server DBCC CHECKDB]:https://www.mssqltips.com/sqlservertip/2399/minimize-performance-impact-of-sql-server-dbcc-checkdb/ From b93873f98ca79a4d35445519424ee07ed813d78a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 31 Oct 2020 11:55:39 +0300 Subject: [PATCH 135/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f5bb3910..67011d9c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1249,6 +1249,7 @@ Articles types: | [A faster CHECKDB – Part III] | Bob Dorr | 2015-01-26 | [DBA] | | [A faster CHECKDB – Part IV (SQL CLR UDTs)] | Bob Dorr | 2015-01-26 | [DBA] | | [Minimize performance impact of SQL Server DBCC CHECKDB] | Robert Pearl | 2011-06-02 | [DBA] | +| [Starting SQL: A Little More Fun With Logging Dynamic SQL] | Eric Darling | 2020-10-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2472,3 +2473,4 @@ Articles types: [A faster CHECKDB – Part III]:https://web.archive.org/web/20150206201933/http://blogs.msdn.com/b/psssql/archive/2014/11/10/a-faster-checkdb-part-iii.aspx [A faster CHECKDB – Part IV (SQL CLR UDTs)]:https://web.archive.org/web/20150205043737/http://blogs.msdn.com/b/psssql/archive/2015/01/26/a-faster-checkdb-part-iv-sql-clr-udts.aspx [Minimize performance impact of SQL Server DBCC CHECKDB]:https://www.mssqltips.com/sqlservertip/2399/minimize-performance-impact-of-sql-server-dbcc-checkdb/ +[Starting SQL: A Little More Fun With Logging Dynamic SQL]:https://www.erikdarlingdata.com/starting-sql/starting-sql-a-little-more-fun-with-logging-dynamic-sql/ From 897546e7b25f6eeb4e38f492bdc0a32960784c5c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 1 Nov 2020 12:03:43 +0300 Subject: [PATCH 136/553] Add SSMS 18.7.1 info --- SSMS/README.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index de8a8943..2eb51f4d 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -50,17 +50,17 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u ## Available Languages **SQL Server Management Studio 18.5 GA**: - [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x804) | - [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x404) | - [English (United States)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x409) | - [French](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x40c) | - [German](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x407) | - [Italian](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x410) | - [Japanese](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x411) | - [Korean](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x412) | - [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x416) | - [Russian](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x419) | - [Spanish](https://go.microsoft.com/fwlink/?linkid=2135491&clcid=0x40a) + [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x804) | + [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x404) | + [English (United States)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x409) | + [French](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x40c) | + [German](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x407) | + [Italian](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x410) | + [Japanese](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x411) | + [Korean](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x412) | + [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x416) | + [Russian](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x419) | + [Spanish](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x40a) ## SQL Server Management Studio Download Links and Release Info @@ -70,7 +70,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.6 GA Release] | **Latest GA** | 15.0.18338.0 | 2020-07-22 | 534 | +| [18.7.1 GA Release] | **Latest GA** | 15.0.18358.0 | 2020-07-27 | 635 | +| [18.6 GA Release] | | 15.0.18338.0 | 2020-07-22 | 534 | | [18.5.1 GA Release] | | 15.0.18333.0 | 2020-07-09 | 535 | | [18.5 GA Release] | | 15.0.18183.0 | 2020-04-07 | 535 | | [18.4 GA Release] | | 15.0.18206.0 | 2019-11-04 | 539 | @@ -113,6 +114,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | +[18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 [18.6 GA Release]:https://go.microsoft.com/fwlink/?linkid=2135491 [18.5.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2132606 [18.5 GA Release]:https://go.microsoft.com/fwlink/?linkid=2125901 From 54c7ea324a1d3b94079b71cf4712288ddf0866d8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 2 Nov 2020 12:06:07 +0300 Subject: [PATCH 137/553] Add SSMS 18.7 info --- SSMS/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SSMS/README.md b/SSMS/README.md index 2eb51f4d..876784cf 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -71,6 +71,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| | [18.7.1 GA Release] | **Latest GA** | 15.0.18358.0 | 2020-07-27 | 635 | +| [18.7. GA Release] | | 15.0.18357.0 | 2020-07-20 | 635 | | [18.6 GA Release] | | 15.0.18338.0 | 2020-07-22 | 534 | | [18.5.1 GA Release] | | 15.0.18333.0 | 2020-07-09 | 535 | | [18.5 GA Release] | | 15.0.18183.0 | 2020-04-07 | 535 | @@ -115,6 +116,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | [18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 +[18.7 GA Release]:https://go.microsoft.com/fwlink/?linkid=2146265 [18.6 GA Release]:https://go.microsoft.com/fwlink/?linkid=2135491 [18.5.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2132606 [18.5 GA Release]:https://go.microsoft.com/fwlink/?linkid=2125901 From 120adf8c196a36cca76619119ca3010507143f00 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 3 Nov 2020 12:24:37 +0300 Subject: [PATCH 138/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 67011d9c..90673916 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1250,6 +1250,8 @@ Articles types: | [A faster CHECKDB – Part IV (SQL CLR UDTs)] | Bob Dorr | 2015-01-26 | [DBA] | | [Minimize performance impact of SQL Server DBCC CHECKDB] | Robert Pearl | 2011-06-02 | [DBA] | | [Starting SQL: A Little More Fun With Logging Dynamic SQL] | Eric Darling | 2020-10-01 | [DBA][DEV] | +| [Allocation Order Scans] | Paul White | 2015-01-23 | [DBA][DEV] | +| [Parameter Sniffing in SQL Server 2019: Air_Quote_Actual Plans] | Brent Ozar | 2020-05-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2474,3 +2476,5 @@ Articles types: [A faster CHECKDB – Part IV (SQL CLR UDTs)]:https://web.archive.org/web/20150205043737/http://blogs.msdn.com/b/psssql/archive/2015/01/26/a-faster-checkdb-part-iv-sql-clr-udts.aspx [Minimize performance impact of SQL Server DBCC CHECKDB]:https://www.mssqltips.com/sqlservertip/2399/minimize-performance-impact-of-sql-server-dbcc-checkdb/ [Starting SQL: A Little More Fun With Logging Dynamic SQL]:https://www.erikdarlingdata.com/starting-sql/starting-sql-a-little-more-fun-with-logging-dynamic-sql/ +[Allocation Order Scans]:https://sqlperformance.com/2015/01/t-sql-queries/allocation-order-scans +[Parameter Sniffing in SQL Server 2019: Air_Quote_Actual Plans]:https://www.brentozar.com/archive/2019/04/parameter-sniffing-in-sql-server-2019-air_quote_actual-plans/ From 56e9210fccdae14c4006594c33de588001b6345b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 4 Nov 2020 12:32:50 +0300 Subject: [PATCH 139/553] Add new must read articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 90673916..5054797d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1252,6 +1252,9 @@ Articles types: | [Starting SQL: A Little More Fun With Logging Dynamic SQL] | Eric Darling | 2020-10-01 | [DBA][DEV] | | [Allocation Order Scans] | Paul White | 2015-01-23 | [DBA][DEV] | | [Parameter Sniffing in SQL Server 2019: Air_Quote_Actual Plans] | Brent Ozar | 2020-05-26 | [DBA][DEV] | +| [Guide For Set Up Of Telegraf For Monitoring Sql Server Xplat] | Tracy Boggiano | 2018-02-24 | [DBA] | +| [Azure Table Storage Tips for the RDBMS Developer] | Adrian Hills | 2020-10-21 | [AZ] | +| [sql_handle and the SQL Server batch text hash] | Paul White | 2020-10-11 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2478,3 +2481,6 @@ Articles types: [Starting SQL: A Little More Fun With Logging Dynamic SQL]:https://www.erikdarlingdata.com/starting-sql/starting-sql-a-little-more-fun-with-logging-dynamic-sql/ [Allocation Order Scans]:https://sqlperformance.com/2015/01/t-sql-queries/allocation-order-scans [Parameter Sniffing in SQL Server 2019: Air_Quote_Actual Plans]:https://www.brentozar.com/archive/2019/04/parameter-sniffing-in-sql-server-2019-air_quote_actual-plans/ +[Guide For Set Up Of Telegraf For Monitoring Sql Server Xplat]:https://tracyboggiano.com/archive/2018/02/setup-of-telegraf/ +[Azure Table Storage Tips for the RDBMS Developer]:https://www.sentryone.com/blog/azure-table-storage-tips-for-the-rdbms-developer +[sql_handle and the SQL Server batch text hash]:https://www.sql.kiwi/2020/10/sqlhandle-and-sql-server-batch-text-hash.html From f6d7eea195834afec5bff29bb05beb595bed54dc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 5 Nov 2020 12:43:39 +0300 Subject: [PATCH 140/553] Add 2533, 2534, 5235, 7926 errors --- Errors/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Errors/README.md b/Errors/README.md index fe6615a3..c70165d1 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -134,6 +134,8 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 1807 | Could not obtain exclusive lock on database ‘model’. Retry the operation later. … | [1807_link1] | | 1904 | The statistics on table has 65 columns in the key list … | [1904_link1] | | 1908 | Column '%.*ls' is partitioning column of the index '%.*ls'. Partition columns for a unique index … | [1908_link1][18] | +| 2533 | Table error: page %S_PGID allocated to object ID %d, index ID %d, partition ID %I64d, alloc unit ID … | [2533_link1][50] | +| 2534 | Table error: page %S_PGID, whose header indicates that it is allocated to object ID %d, index ID %d, … | [2534_link1][50] | | 2812 | Could not find stored procedure '%.*ls'. | [2812_link1][38] | | 3101 | Exclusive access could not be obtained because the database is in use. … | [3101_link1] | | 3154 | The backup set holds a backup of a database other than the existing … | [3154_link1] | @@ -162,6 +164,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 5123 | CREATE FILE encountered operating system error "%ls"(The system cannot find the path specified.) … | [5123_link1], [5123_link2] | | 5171 | %.*ls is not a primary database file. | [5171_link1][29] | | 5172 | The header for file '%ls' is not a valid database file header. The %ls property is incorrect. | [5172_link1][29] | +| 5235 | %lsDBCC %ls (%ls%ls%ls)%ls executed by %ls terminated abnormally due to error state %d. Elapsed time: … | [5235_link1][50] | | 5846 | Common language runtime (CLR) execution is not supported under lightweight pooling. Disable one of two … | [5846_link1] | | 6335 | XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels. | [6335_link1] | | 6348 | Specified collection '%.*ls' cannot be created because it already exists or you do not have permission. | [6348_link1][36] | @@ -172,6 +175,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 7357 | Cannot process the object "%ls". The OLE DB provider "%ls" for linked server "%ls" indicates that … | [7357_link1][2], [7357_link2][2] | | 7391 | The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" ... … | [7391_link2][2] | | 7719 | CREATE/ALTER partition function failed as only maximum of 1000 partitions can be created. … | [657_link1] | +| 7926 | Check statement aborted. The database could not be checked as a database snapshot could not be created … | [7926_link1][50] | | 8101 | An explicit value for the identity column in table '%.*ls' can only be specified when a column list is … | [8101_link1][40] | | 8107 | IDENTITY_INSERT is already ON for table '%.*ls.%.*ls.%.*ls'. Cannot perform SET operation for table '% … | [8107_link1][40] | | 8115 | Arithmetic overflow error converting %ls to data type %ls. | [8115_link1][24] | @@ -293,6 +297,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [47]:https://www.sqlshack.com/sql-varchar-data-type-deep-dive/ [48]:https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ [49]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ +[50]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ From 0577c1641e8bf1c6ffe64e56fb05c80a0bc27a2c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 6 Nov 2020 13:28:13 +0300 Subject: [PATCH 141/553] Add new must read articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5054797d..03f51906 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1255,6 +1255,9 @@ Articles types: | [Guide For Set Up Of Telegraf For Monitoring Sql Server Xplat] | Tracy Boggiano | 2018-02-24 | [DBA] | | [Azure Table Storage Tips for the RDBMS Developer] | Adrian Hills | 2020-10-21 | [AZ] | | [sql_handle and the SQL Server batch text hash] | Paul White | 2020-10-11 | [DBA][DEV] | +| [Navigating DBCC CHECKDB for VLDB] | Aaron Bertrand | 2020-11-05 | [DBA] | +| [Hidden Formatting Troubles with STR() (SQL Spackle)] | Jeff Moden | 2019-04-26 | [DBA][DEV] | +| [The What, Why, When, and How of Incremental Loads] | Tim Mitchell | 2020-07-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2484,3 +2487,6 @@ Articles types: [Guide For Set Up Of Telegraf For Monitoring Sql Server Xplat]:https://tracyboggiano.com/archive/2018/02/setup-of-telegraf/ [Azure Table Storage Tips for the RDBMS Developer]:https://www.sentryone.com/blog/azure-table-storage-tips-for-the-rdbms-developer [sql_handle and the SQL Server batch text hash]:https://www.sql.kiwi/2020/10/sqlhandle-and-sql-server-batch-text-hash.html +[Navigating DBCC CHECKDB for VLDB]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb +[Hidden Formatting Troubles with STR() (SQL Spackle)]:https://www.sqlservercentral.com/articles/hidden-formatting-troubles-with-str-sql-spackle +[The What, Why, When, and How of Incremental Loads]:https://www.timmitchell.net/post/2020/07/23/incremental-loads/ From 480e97cab6a35b5b629db4f96ae8b7a0a108072b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 7 Nov 2020 13:32:53 +0300 Subject: [PATCH 142/553] Add not use STR function recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 1366a6b1..8b084035 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -208,6 +208,7 @@ This is only recommendations! But it is consistent for choosing only 1 function | [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to triming string | [16][17] | | [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18][19] | | [`SET`] | [`SEELCT`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20][21][22] | +| [`CAST`][10] | [`STR`] | `SET` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead | [23] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -227,6 +228,8 @@ This is only recommendations! But it is consistent for choosing only 1 function [20]:https://assets.red-gate.com/community/books/defensive-database-programming.pdf [21]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ [22]:http://vyaskn.tripod.com/differences_between_set_and_select.htm +[23]:https://www.sqlservercentral.com/articles/hidden-formatting-troubles-with-str-sql-spackle +[24]:https://docs.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql **[⬆ back to top](#table-of-contents)** From d451493be9b4d5cd8f1c66a4a673362db2c67289 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 8 Nov 2020 13:39:05 +0300 Subject: [PATCH 143/553] Add new good artiles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 03f51906..f9586aca 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1258,6 +1258,9 @@ Articles types: | [Navigating DBCC CHECKDB for VLDB] | Aaron Bertrand | 2020-11-05 | [DBA] | | [Hidden Formatting Troubles with STR() (SQL Spackle)] | Jeff Moden | 2019-04-26 | [DBA][DEV] | | [The What, Why, When, and How of Incremental Loads] | Tim Mitchell | 2020-07-23 | [DBA][DEV] | +| [How Do I Know If My Query Is Good Enough for Production?] | Brent Ozar | 2020-08-12 | [DBA][DEV] | +| [How to Find Out Whose Queries are Using The Most CPU] | Brent Ozar | 2020-08-10 | [DBA][DEV] | +| [Limitations of SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-23 | [B] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2490,3 +2493,6 @@ Articles types: [Navigating DBCC CHECKDB for VLDB]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb [Hidden Formatting Troubles with STR() (SQL Spackle)]:https://www.sqlservercentral.com/articles/hidden-formatting-troubles-with-str-sql-spackle [The What, Why, When, and How of Incremental Loads]:https://www.timmitchell.net/post/2020/07/23/incremental-loads/ +[How Do I Know If My Query Is Good Enough for Production?]:https://www.brentozar.com/archive/2020/08/how-do-i-know-if-my-query-is-good-enough-for-production/ +[How to Find Out Whose Queries are Using The Most CPU]:https://www.brentozar.com/archive/2020/08/how-to-find-out-whose-queries-are-using-the-most-cpu/ +[Limitations of SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5042/limitations-of-sql-server-native-backup-and-restore-in-amazon-rds/ From 9037d4d861344557699767a127fd352d99668acd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 9 Nov 2020 14:27:26 +0300 Subject: [PATCH 144/553] Add Disable_CEIP.ps1 script --- PowerShell/Disable_CEIP.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 PowerShell/Disable_CEIP.ps1 diff --git a/PowerShell/Disable_CEIP.ps1 b/PowerShell/Disable_CEIP.ps1 new file mode 100644 index 00000000..b13b3d62 --- /dev/null +++ b/PowerShell/Disable_CEIP.ps1 @@ -0,0 +1,21 @@ +$server = 'Server01' ,'Server02','Server03','Server04'; + +# Stop all CEIP services +invoke-command -computername $server {Get-Service |? name -Like "*TELEMETRY*" | ? status -eq "running" | Stop-Service}; + +# Disable all CEIP services +invoke-command -computername $server {Get-Service |? name -Like "*TELEMETRY*" | Set-Service -StartMode Disabled}; + +# Check service status (should see "stopped" and "disabled" +invoke-command -computername $server {Get-Service |? name -Like "*TELEMETRY*" | select -property name,starttype,status}; + +# Disable "Error Reporting" and "Customer Feedback" Registry Values +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'| Set-ItemProperty -Name EnableErrorReporting -Value 0}; +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'| Set-ItemProperty -Name CustomerFeedback -Value 0}; +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'| Set-ItemProperty -Name EnableErrorReporting -Value 0}; +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'| Set-ItemProperty -Name CustomerFeedback -Value 0}; + +# Check registry values (should see 0 for "EnableErrorReporting" and "CustomerFeedback") +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'}; +invoke-command -computername $server {Get-ChildItem 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server' -Recurse | Where-Object -Property Property -eq 'EnableErrorReporting'}; + \ No newline at end of file From 8afee52ee5570314860d7560db4f080c82c9da6b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 10 Nov 2020 14:30:42 +0300 Subject: [PATCH 145/553] Add useful articles and update script --- Articles/README.md | 4 ++++ PowerShell/Disable_CEIP.ps1 | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f9586aca..53940bbe 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1261,6 +1261,8 @@ Articles types: | [How Do I Know If My Query Is Good Enough for Production?] | Brent Ozar | 2020-08-12 | [DBA][DEV] | | [How to Find Out Whose Queries are Using The Most CPU] | Brent Ozar | 2020-08-10 | [DBA][DEV] | | [Limitations of SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-23 | [B] | +| [SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-18 | [B] | +| [What Is the SQL Server CEIP Service (telemetry)?] | Brent Ozar | 2020-10-07 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2496,3 +2498,5 @@ Articles types: [How Do I Know If My Query Is Good Enough for Production?]:https://www.brentozar.com/archive/2020/08/how-do-i-know-if-my-query-is-good-enough-for-production/ [How to Find Out Whose Queries are Using The Most CPU]:https://www.brentozar.com/archive/2020/08/how-to-find-out-whose-queries-are-using-the-most-cpu/ [Limitations of SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5042/limitations-of-sql-server-native-backup-and-restore-in-amazon-rds/ +[SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5041/sql-server-native-backup-and-restore-in-amazon-rds/ +[What Is the SQL Server CEIP Service?]:https://www.brentozar.com/archive/2020/10/what-is-the-sql-server-ceip-service/ diff --git a/PowerShell/Disable_CEIP.ps1 b/PowerShell/Disable_CEIP.ps1 index b13b3d62..c275bbd7 100644 --- a/PowerShell/Disable_CEIP.ps1 +++ b/PowerShell/Disable_CEIP.ps1 @@ -1,3 +1,18 @@ +#requires -version 2.0 + +<# +.SYNOPSIS + Disable SQL Server CEIP services + +.DESCRIPTION + Author: Eric Cobb + Create date: 2020-02-18 + http://www.sqlnuggets.com/blog/disable-telemetry-on-multiple-sql-servers-with-powershell/ + +.PARAMETER server + Server list where disable SEIP services +#> + $server = 'Server01' ,'Server02','Server03','Server04'; # Stop all CEIP services From 992ae49037eca933776b1e88bf2973dc60e1b611 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 11 Nov 2020 14:42:22 +0300 Subject: [PATCH 146/553] Add new awesome articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 53940bbe..6303a3c8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1263,6 +1263,8 @@ Articles types: | [Limitations of SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-23 | [B] | | [SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-18 | [B] | | [What Is the SQL Server CEIP Service (telemetry)?] | Brent Ozar | 2020-10-07 | [DBA] | +| [Maximum Simultaneous User Connections] | Michael J Swart | 2020-10-16 | [DBA] | +| [Find Database Connection Leaks in Your Application] | Michael J Swart | 2017-07-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2500,3 +2502,5 @@ Articles types: [Limitations of SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5042/limitations-of-sql-server-native-backup-and-restore-in-amazon-rds/ [SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5041/sql-server-native-backup-and-restore-in-amazon-rds/ [What Is the SQL Server CEIP Service?]:https://www.brentozar.com/archive/2020/10/what-is-the-sql-server-ceip-service/ +[Maximum Simultaneous User Connections]:http://www.sqlnuggets.com/blog/disable-telemetry-on-multiple-sql-servers-with-powershell/ +[Find Database Connection Leaks in Your Application]:https://sqlperformance.com/2017/07/sql-performance/find-database-connection-leaks From 56a7fc797862acc98250980736acc3b7c23c91dd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 12 Nov 2020 14:47:43 +0300 Subject: [PATCH 147/553] Add useful articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 6303a3c8..f5436708 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1265,6 +1265,8 @@ Articles types: | [What Is the SQL Server CEIP Service (telemetry)?] | Brent Ozar | 2020-10-07 | [DBA] | | [Maximum Simultaneous User Connections] | Michael J Swart | 2020-10-16 | [DBA] | | [Find Database Connection Leaks in Your Application] | Michael J Swart | 2017-07-07 | [DBA][DEV] | +| [How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers] | Eitan Blumin | 2020-10-05 | [DBA][DEV] | +| [Prevent Lock Escalation On Indexed Views] | Thomas Costers | 2019-10-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2504,3 +2506,5 @@ Articles types: [What Is the SQL Server CEIP Service?]:https://www.brentozar.com/archive/2020/10/what-is-the-sql-server-ceip-service/ [Maximum Simultaneous User Connections]:http://www.sqlnuggets.com/blog/disable-telemetry-on-multiple-sql-servers-with-powershell/ [Find Database Connection Leaks in Your Application]:https://sqlperformance.com/2017/07/sql-performance/find-database-connection-leaks +[How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers]:https://eitanblumin.com/2020/10/05/how-to-troubleshoot-threadpool-waits-and-deadlocked-schedulers/ +[Prevent Lock Escalation On Indexed Views]:https://kohera.be/blog/sql-server/prevent-lock-escalation-on-indexed-views/ From 01eb9944a8afa941bf98f46941f630c36710320f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 13 Nov 2020 14:52:10 +0300 Subject: [PATCH 148/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f5436708..2b2d1d6c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1267,6 +1267,8 @@ Articles types: | [Find Database Connection Leaks in Your Application] | Michael J Swart | 2017-07-07 | [DBA][DEV] | | [How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers] | Eitan Blumin | 2020-10-05 | [DBA][DEV] | | [Prevent Lock Escalation On Indexed Views] | Thomas Costers | 2019-10-30 | [DBA][DEV] | +| [Concatenating Strings in SQL Server] | Guy Glantser | 2020-11-10 | [DBA][DEV] | +| [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2508,3 +2510,5 @@ Articles types: [Find Database Connection Leaks in Your Application]:https://sqlperformance.com/2017/07/sql-performance/find-database-connection-leaks [How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers]:https://eitanblumin.com/2020/10/05/how-to-troubleshoot-threadpool-waits-and-deadlocked-schedulers/ [Prevent Lock Escalation On Indexed Views]:https://kohera.be/blog/sql-server/prevent-lock-escalation-on-indexed-views/ +[Concatenating Strings in SQL Server]:https://www.madeiradata.com/post/concatenating-strings +[Why Full Text’s CONTAINS Queries Are So Slow]:https://www.brentozar.com/archive/2020/11/why-full-texts-contains-queries-are-so-slow/ From 568aed0aa02481d25c5dc0233f3ea9cd77b8e5b8 Mon Sep 17 00:00:00 2001 From: Aleksandr Titenko Date: Fri, 13 Nov 2020 15:34:02 +0300 Subject: [PATCH 149/553] Add 7 new SQL Server Tools --- Utilities/README.md | 125 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 3 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 87b4cc6f..d54159eb 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **384** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **391** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - **[B]**: Backup solutions {16} @@ -16,12 +16,12 @@ Utility types (main purpose), in braces `{}` current counts: - **[MG]**: Migration tool {30} - **[MS]**: Management Studio (alternative for SSMS) {32} - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {5} + - **[S]**: Search tools {7} - **[SEC]**: Security tools {7} - **[SC]**: Structure compare {21} - **[ST]**: Statistics utilities {3} - **[T]**: Testing tools {7} - - **[?]**: Not yet classified {150} + - **[?]**: Not yet classified {155} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-------------------------|------------|----------------|------:| @@ -409,6 +409,13 @@ Utility types (main purpose), in braces `{}` current counts: | [SentryOne Test](#sentryone-test) | No | No | [T] | [SentryOne Test] | ? | SQL Sentry | | No | $828 | | [Code Quality and Security for T-SQL](#sonarsource) | No | No | [?] | [Code Quality and Security for T-SQL] | ? | SonarSource | | No | €120 | | [DBBALANCE](#dbbalance) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [DBBALANCE] | ? | DBBalance | | No | ? | +| [Convert SQL to Excel](#convert-sql-to-excel) | No | No | [?] | [Convert SQL to Excel] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Search string in Schema](#search-string-in-schema) | No | No | [S] | [Search string in Schema] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Search string in SQL](#search-string-in-sql) | No | No | [S] | [Search string in SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [SQL Table Scripter](#sql-table-scripter) | No | No | [?] | [SQL Table Scripter] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [SQLCLR Util](#sqlclr-util) | No | No | [?] | [SQLCLR Util] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Image To SQL](#image-to-sql) | No | No | [?] | [Image To SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [dbdiagram](#dbdiagram) | No | No | [?] | [dbdiagram] | ? | holistics.io | | Yes | $9/mo | ## SSMS @@ -6005,6 +6012,111 @@ Price: ? - Database Migration - Database Development + +## Convert SQL to Excel + +Download page: [Convert SQL to Excel]
+Release date: 2015-10-09
+Support Version: 2000-2014
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + + - Easy way to convert SQL table or a subset of table to Excel. No programming. + - Convert / export a SQL Table to Excel file (.xlsx or .xls format) + - Convert multiple tables (multiple query results) to multiple Excel worksheets. + - Allow flexible TSQL query which can have multiple SELECT statements or other complex query statements. + - Supports command line execution (unattended mode). Useful for periodical scheduling. + - Allow user defined Excel worksheet names. + + +## Search string in Schema + +Download page: [Search string in Schema]
+Release date: 2015-10-09
+Support Version: 2005-2012
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + + - This tool searches tables, columns, views, stored procedures, XPs, functions, triggers, constraints and SQL Agent Jobs in a database to find a given string. + - Simply input target server, target database, search keyword and you will get fast search results! + - Supports filterng by object type or schema user + - Supports easy switch between multiple SQL Servers. + - Supports SQL Agent Jobs search. + + +## Search string in SQL + +Download page: [Search string in SQL]
+Release date: 2015-10-09
+Support Version: 2005-2008
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + +This tool helps you to search all columns of all tables in a database for a string keyword. In order to increase performance, it examines string type columns only in all tables to search for a given keyword. + + +## SQL Table Scripter + +Download page: [SQL Table Scripter]
+Release date: 2015-10-09
+Support Version: 2005, 2008
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + + - Generates a CREATE SQL script for a table. + - Script can include all DRI (declarative referential integrity) such as Foreign Key, Constraints for the table. + - Script can include Indexes for the table. + - Generates INSERT SQL scripts for table data (optionally). + + +## SQLCLR Util + +Download page: [SQLCLR Util]
+Release date: 2015-10-09
+Support Version: 2005, 2014+r
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + + - generates DLL file from SQL CLR assembly in the SQL Server. When creating SQL CLR assembly with its DLL file, SQL Server saves the DLL binary into SQL Server system table. This tool help you to recreate DLL file easily from the SQL Server system table. + - generates CREATE ASSEMBLY script from a DLL file. Once CREATE script is generated, one can run the script without physical .DLL file. This method will be useful when one has no permission to access physical disk on the server because there is no need to copy the file to server. + + +## Image To SQL + +Download page: [Image To SQL]
+Release date: 2015-10-09
+Support Version: 2005,2008 or later
+Author: MSSQL.TOOLS
+Free version: Yes
+Price: No + + - Save any image file such as .JPG, .PNG, .BMP, .GIF to SQL Server table. + - Image file is saved to any varbinary column (or image column) + - User can specify input image file and table/column target in easy UI. + - User can specify where to save image file by setting primary key value(s) of the user table in easy UI. + + +## dbdiagram + +Download page: [dbdiagram]
+Release date: ?
+Support Version: ?
+Author: holistics.io
+Free version: Yes
+Price: &9/mo + +A free, simple tool to draw ER diagrams by just writing code. Designed for developers and data analysts. + - Generate SQL statements + - Export to Images and PDFs + - One Click Sharing + - Integrate with your SQL Databases + - Integrate with Popular Web Frameworks + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -6390,6 +6502,13 @@ Price: ? [Query Performance Insight for Azure SQL Database]:https://docs.microsoft.com/en-us/azure/azure-sql/database/query-performance-insight-use [Code Quality and Security for T-SQL]:https://www.sonarsource.com/tsql [DBBALANCE]:http://www.dbbalance.com +[Convert SQL to Excel]:http://mssql.tools/sql/Convert-SQL-to-Excel +[Search string in Schema]:http://mssql.tools/sql/Search-string-in-Schema +[Search string in SQL]:http://mssql.tools/sql/Search-string-in-SQL +[SQL Table Scripter]:http://mssql.tools/sql/SQL-Table-Scripter +[SQLCLR Util]:http://mssql.tools/sql/SQLCLR-Util +[Image To SQL]:http://mssql.tools/sql/Image-To-SQL +[dbdiagram]:https://dbdiagram.io/home [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 147d437404bc5e50f4a8470303372be42b42ae33 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 14 Nov 2020 14:56:03 +0300 Subject: [PATCH 150/553] Add new interesting articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2b2d1d6c..d2577b04 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1269,6 +1269,8 @@ Articles types: | [Prevent Lock Escalation On Indexed Views] | Thomas Costers | 2019-10-30 | [DBA][DEV] | | [Concatenating Strings in SQL Server] | Guy Glantser | 2020-11-10 | [DBA][DEV] | | [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-07 | [DBA][DEV] | +| [Migrating SSIS to Azure – an Overview] | Koen Verbeeck | 2020-11-03 | [AZ][MG] | +| [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2512,3 +2514,5 @@ Articles types: [Prevent Lock Escalation On Indexed Views]:https://kohera.be/blog/sql-server/prevent-lock-escalation-on-indexed-views/ [Concatenating Strings in SQL Server]:https://www.madeiradata.com/post/concatenating-strings [Why Full Text’s CONTAINS Queries Are So Slow]:https://www.brentozar.com/archive/2020/11/why-full-texts-contains-queries-are-so-slow/ +[Migrating SSIS to Azure – an Overview]:https://sqlkover.com/migrating-ssis-to-azure-an-overview/ +[(Video) How to Troubleshoot Someone Else’s Temp Table Contents]:https://www.brentozar.com/archive/2020/11/video-how-to-troubleshoot-someone-elses-temp-table-contents/ From d78c2fb3fdeafa72761752efda5e8c899a8fc8a8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 15 Nov 2020 14:58:47 +0300 Subject: [PATCH 151/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d2577b04..b674c1f0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1271,6 +1271,8 @@ Articles types: | [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-07 | [DBA][DEV] | | [Migrating SSIS to Azure – an Overview] | Koen Verbeeck | 2020-11-03 | [AZ][MG] | | [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-12 | [DBA][DEV] | +| [A Parameterization Puzzle With TOP: Part 1] | Eric Darling | 2020-10-21 | [DBA][DEV] | +| [A Parameterization Puzzle With TOP: Part 2] | Eric Darling | 2020-10-22 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2516,3 +2518,5 @@ Articles types: [Why Full Text’s CONTAINS Queries Are So Slow]:https://www.brentozar.com/archive/2020/11/why-full-texts-contains-queries-are-so-slow/ [Migrating SSIS to Azure – an Overview]:https://sqlkover.com/migrating-ssis-to-azure-an-overview/ [(Video) How to Troubleshoot Someone Else’s Temp Table Contents]:https://www.brentozar.com/archive/2020/11/video-how-to-troubleshoot-someone-elses-temp-table-contents/ +[A Parameterization Puzzle With TOP: Part 1]:https://www.erikdarlingdata.com/execution-plans/a-parameterization-puzzle-with-top-part-1/ +[A Parameterization Puzzle With TOP: Part 2]:https://www.erikdarlingdata.com/execution-plans/a-parameterization-puzzle-with-top-part-2/ From 84746d46cf55179f2e5f6c4fe47da7b96eb15549 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 16 Nov 2020 15:10:36 +0300 Subject: [PATCH 152/553] Add new useful articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b674c1f0..5744a54a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1273,6 +1273,8 @@ Articles types: | [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-12 | [DBA][DEV] | | [A Parameterization Puzzle With TOP: Part 1] | Eric Darling | 2020-10-21 | [DBA][DEV] | | [A Parameterization Puzzle With TOP: Part 2] | Eric Darling | 2020-10-22 | [DBA][DEV] | +| [T-SQL: Get The Text Between Two Delimiters] | Eric Darling | 2020-10-22 | [DBA][DEV] | +| [Explore dynamic management views for monitoring SQL Server Always On Availability Groups] | Rajendra Gupta | 2020-11-16 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2520,3 +2522,5 @@ Articles types: [(Video) How to Troubleshoot Someone Else’s Temp Table Contents]:https://www.brentozar.com/archive/2020/11/video-how-to-troubleshoot-someone-elses-temp-table-contents/ [A Parameterization Puzzle With TOP: Part 1]:https://www.erikdarlingdata.com/execution-plans/a-parameterization-puzzle-with-top-part-1/ [A Parameterization Puzzle With TOP: Part 2]:https://www.erikdarlingdata.com/execution-plans/a-parameterization-puzzle-with-top-part-2/ +[T-SQL: Get The Text Between Two Delimiters]:https://www.erikdarlingdata.com/sql-server/t-sql-get-the-text-between-two-delimiters/ +[Explore dynamic management views for monitoring SQL Server Always On Availability Groups]:https://www.sqlshack.com/explore-dynamic-management-views-for-monitoring-sql-server-always-on-availability-groups/ From 5c784bdce17d4f0e1bb52c11bc39ac860c934071 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 17 Nov 2020 17:27:43 +0300 Subject: [PATCH 153/553] Add nice articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5744a54a..4a06f382 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1275,6 +1275,8 @@ Articles types: | [A Parameterization Puzzle With TOP: Part 2] | Eric Darling | 2020-10-22 | [DBA][DEV] | | [T-SQL: Get The Text Between Two Delimiters] | Eric Darling | 2020-10-22 | [DBA][DEV] | | [Explore dynamic management views for monitoring SQL Server Always On Availability Groups] | Rajendra Gupta | 2020-11-16 | [DBA] | +| [Deploy SQLWATCH to SQL Server using GitHub Actions] | Kevin Chant | 2020-11-17 | [DBA] | +| [SQL Server table hints – WITH (NOLOCK) best practices] | Ahmad Yaseen | 2018-02-24 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2524,3 +2526,5 @@ Articles types: [A Parameterization Puzzle With TOP: Part 2]:https://www.erikdarlingdata.com/execution-plans/a-parameterization-puzzle-with-top-part-2/ [T-SQL: Get The Text Between Two Delimiters]:https://www.erikdarlingdata.com/sql-server/t-sql-get-the-text-between-two-delimiters/ [Explore dynamic management views for monitoring SQL Server Always On Availability Groups]:https://www.sqlshack.com/explore-dynamic-management-views-for-monitoring-sql-server-always-on-availability-groups/ +[Deploy SQLWATCH to SQL Server using GitHub Actions]:https://www.kevinrchant.com/2020/11/17/deploy-sqlwatch-to-sql-server-using-github-actions/ +[SQL Server table hints – WITH (NOLOCK) best practices]:https://www.sqlshack.com/understanding-impact-clr-strict-security-configuration-setting-sql-server-2017/ From 5f5098702376d029f605472811de44bab29001b8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 18 Nov 2020 17:11:32 +0300 Subject: [PATCH 154/553] Fix errors and add useful info --- ... Convention and T-SQL Programming Style.md | 69 ++++++++----------- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 8b084035..25656b2f 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -201,14 +201,15 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Recommended function | Not Recommended | Why | More details | -|----------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| -| [`<>`][12] | [`!=`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CAST`][10] | [`CONVERT`][10] | `CAST` is [`ANSI`] | [14][15] | -| [`COALECSE`] | [`ISNULL`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to triming string | [16][17] | -| [`DATEADD`] | [`DATEDIFF`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18][19] | -| [`SET`] | [`SEELCT`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20][21][22] | -| [`CAST`][10] | [`STR`] | `SET` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead | [23] | +| Not Recommended | Recommended | When and Why | More details | +|-----------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | +| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | +| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | +| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -224,12 +225,15 @@ This is only recommendations! But it is consistent for choosing only 1 function [18]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ [19]:https://dba.stackexchange.com/q/132437/107045 [`SET`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/set-local-variable-transact-sql -[`SEELCT`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/select-local-variable-transact-sql +[`SELECT`]:https://docs.microsoft.com/en-gb/sql/t-sql/language-elements/select-local-variable-transact-sql [20]:https://assets.red-gate.com/community/books/defensive-database-programming.pdf [21]:https://www.mssqltips.com/sqlservertip/1888/when-to-use-set-vs-select-when-assigning-values-to-variables-in-sql-server/ [22]:http://vyaskn.tripod.com/differences_between_set_and_select.htm +[`STR`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql [23]:https://www.sqlservercentral.com/articles/hidden-formatting-troubles-with-str-sql-spackle -[24]:https://docs.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql +[`ISNUMERIC`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql +[`TRY_CONVERT`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql +[24]:https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-avoid-using-isnumeric-function-e1029 **[⬆ back to top](#table-of-contents)** @@ -243,7 +247,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. ### General programming T-SQL style - For database objects names in code use only schema plus object name, do not hardcode server and database names in your code: - ``` + ```tsql /* good */ CREATE TABLE dbo.MyTable (MyColumn int); @@ -257,7 +261,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlstudies.com/2020/06/22/i-created-a-table-and-sql-created-a-schema-and-a-user/), [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query), [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - - Delimiters: **spaces** (not tabs) + - Delimiters: **spaces** (not tabs). - Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names. Main problems are: traffic issues, Memory Grants issues, Index usage issues. **Only one exception, see it below.** @@ -298,16 +302,16 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. More details [here](https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/). - Whenever you have data modification on non-temporary tables, is to use [explicit transactions] over [autocommit]. 1. If you have a stored procedure which is simply running a `SELECT` statement, use [autocommit]. - 2. If you have a stored procedure which performs data modification on non-temporary tables, use an [explicit transaction] only over the area which modifies data. + 2. If you have a stored procedure which performs data modification on non-temporary tables, use an [explicit transactions] only over the area which modifies data. 3. If you are working with non-global temporary tables beforehand, don’t include any modification of those inside the explicit transaction. - 4. In a [loop](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/while-transact-sql), choose whether you want to put the [explicit transaction] around the loop or inside it. In most cases, prefer to put the transaction inside the loop to minimize the amount of time that blocking other users. + 4. In a [loop](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/while-transact-sql), choose whether you want to put the [explicit transactions] around the loop or inside it. In most cases, prefer to put the transaction inside the loop to minimize the amount of time that blocking other users. 5. Outside of a stored procedure use [explicit transactions] if you’re doing something potentially risky. - 6. Watch out for nested transactions. In SQL Server, there’s very little utility in them and their behavior is weird.[Paul Randal explains in great detail just how broken they are](https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/). - More details [her](https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/). + 6. Watch out for nested transactions. In SQL Server, there’s very little utility in them and their behavior is weird. [Paul Randal explains in great detail just how broken they are](https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/). + More details [here](https://36chambers.wordpress.com/2020/08/10/transaction-modes-in-sql-server/). - Avoid using [Cross-Database Queries](https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/cross-database-queries) because it increase backup/restore complexity (you restore one database, then realise you don’t have log backups to bring the other database to the same point in time). Also Azure SQL Database does not support cross-database queries and you can not migrate into in future. - - Use `temp` tables to reduce network trafic, decrease query complexity and also to get better estimates for modification queries.More details [here](https://www.brentozar.com/archive/2020/04/how-to-get-better-estimates-for-modification-queries/). - `INFORMATION_SCHEMA` views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the sys.objects catalog view. + - Use `temp` tables to reduce network trafic, decrease query complexity and also to get better estimates for modification queries. More details [here](https://www.brentozar.com/archive/2020/04/how-to-get-better-estimates-for-modification-queries/). + `INFORMATION_SCHEMA` views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the `sys.objects` catalog view. - When more than one logical operator is used always use parentheses, even when they are not required. This can improve the readability of queries, and reduce the chance of making a subtle mistake because of operator precedence. There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver15#logical-operator-precedence). @@ -378,35 +382,20 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. More details [here](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql#best-practices). ```sql /* bad */ - SELECT ProductID, Name FROM Production.Production ORDER BY 2; + SELECT ProductID, Name FROM production.Production ORDER BY 2; /* good */ - SELECT ProductID, Name FROM Production.Production ORDER BY Name; + SELECT ProductID, Name FROM production.Production ORDER BY Name; ``` - - Avoid wrapping functions around columns specified in the WHERE and JOIN clauses. + - Avoid wrapping functions around columns specified in the `WHERE` and `JOIN` clauses. Doing so makes the columns non-deterministic and prevents the query processor from using indexes. - - Use `NULL` or `NOT NULL` for each column in a temporary table. The `ANSI_DFLT_ON` and `ANSI_DFLT_OFF` options control the way the Database Engine assigns the `NULL` or `NOT NULL` attributes to columns when these attributes are not specified in a `CREATE TABLE` or `ALTER TABLE` statement. + - Use `NULL` or `NOT NULL` for each column in a temporary table. The [`ANSI_NULL_DFLT_ON`] option control the way the Database Engine assigns the `NULL` or `NOT NULL` attributes to columns when these attributes are not specified in a `CREATE TABLE` or `ALTER TABLE` statement. If a connection executes a procedure with different settings for these options than the connection that created the procedure, the columns of the table created for the second connection can have different nullability and exhibit different behavior. If `NULL` or `NOT NULL` is explicitly stated for each column, the temporary tables are created by using the same nullability for all connections that execute the procedure. + [`ANSI_NULL_DFLT_ON`]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-ansi-null-dflt-on-transact-sql - Use modification statements that convert nulls and include logic that eliminates rows with null values from queries. Be aware that in Transact-SQL, `NULL` is not an empty or "nothing" value. It is a placeholder for an unknown value and can cause unexpected behavior, especially when querying for result sets or using AGGREGATE functions. - - Use the `UNION ALL` operator instead of the UNION or OR operators, unless there is a specific need for distinct values. + - Use the `UNION ALL` operator instead of the `UNION` or `OR` operators, unless there is a specific need for distinct values. The `UNION ALL` operator requires less processing overhead because duplicates are not filtered out of the result set. - - Avoid using [`ISNUMERIC`](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql) function. Use for SQL Server >= 2012 [`TRY_CONVERT`](https://docs.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql) function and for SQL Server < 2012 `LIKE` expression: - ```tsql - CASE WHEN STUFF(LTRIM(TapAngle),1,1,'') NOT LIKE '%[^-+.ED0123456789]%' /* is it a float? */ - AND LEFT(LTRIM(TapAngle),1) LIKE '[-.+0123456789]' - AND TapAngle LIKE '%[0123456789][ED][-+0123456789]%' - AND RIGHT(TapAngle ,1) LIKE N'[0123456789]' - THEN 'float' - WHEN STUFF(LTRIM(TapAngle),1,1,'') NOT LIKE '%[^.0123456789]%' /* is it numeric? */ - AND LEFT(LTRIM(TapAngle),1) LIKE '[-.+0123456789]' - AND TapAngle LIKE '%.%' AND TapAngle NOT LIKE '%.%.%' - AND TapAngle LIKE '%[0123456789]%' - THEN 'float' - ELSE NULL - END - ``` - More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-avoid-using-isnumeric-function-e1029). - Avoid using `INSERT INTO` a permanent table with `ORDER BY`. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-insert-permanent-table-order-pe020). - Avoid using shorthand (`wk, yyyy, d` etc.) with date/time operations, use full names: `month, day, year`. @@ -766,4 +755,4 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure [11]:https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql#best-practices [explicit transactions]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql [autocommit]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql -[`ANSI`](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) +[`ANSI`]:http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip From 309ede5ba75c965f0aab9947d505a85a6177e120 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 19 Nov 2020 15:59:10 +0300 Subject: [PATCH 155/553] Add new awesome articles --- Articles/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 4a06f382..93fe5e6f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1277,6 +1277,15 @@ Articles types: | [Explore dynamic management views for monitoring SQL Server Always On Availability Groups] | Rajendra Gupta | 2020-11-16 | [DBA] | | [Deploy SQLWATCH to SQL Server using GitHub Actions] | Kevin Chant | 2020-11-17 | [DBA] | | [SQL Server table hints – WITH (NOLOCK) best practices] | Ahmad Yaseen | 2018-02-24 | [DBA][DEV] | +| [Memory-Optimized TempDB Metadata in SQL Server 2019] | Aaron Bertrand | 2020-02-14 | [DBA] | +| [What permissions do temp stored procedures use?] | Kenneth Fisher | 2019-06-19 | [DBA][DEV] | +| [SQLskills SQL101: Should you kill that long-running transaction?] | Paul Randal | 2020-10-10 | [DBA][DEV] | +| [A quick and dirty scan of a list of instances using a dynamic linked server] | Kenneth Fisher | 2020-11-12 | [DBA] | +| [sp_whoisactive: Analyzing Tempdb Contention] | Adam Machanic | 2017-01-01 | [DBA][DEV] | +| [How to Choose Between RCSI and Snapshot Isolation Levels] | Little Kendra | 2018-02-18 | [DBA][DEV] | +| [Explore the SQL query table hint READPAST] | Rajendra Gupta | 2020-11-14 | [DBA][DEV] | +| [How Bad Statistics Cause Bad SQL Server Query Performance] | Brent Ozar | 2020-11-14 | [DBA][DEV] | +| [How Scalar User-Defined Functions Slow Down Queries] | Brent Ozar | 2020-11-14 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2528,3 +2537,12 @@ Articles types: [Explore dynamic management views for monitoring SQL Server Always On Availability Groups]:https://www.sqlshack.com/explore-dynamic-management-views-for-monitoring-sql-server-always-on-availability-groups/ [Deploy SQLWATCH to SQL Server using GitHub Actions]:https://www.kevinrchant.com/2020/11/17/deploy-sqlwatch-to-sql-server-using-github-actions/ [SQL Server table hints – WITH (NOLOCK) best practices]:https://www.sqlshack.com/understanding-impact-clr-strict-security-configuration-setting-sql-server-2017/ +[Memory-Optimized TempDB Metadata in SQL Server 2019]:https://www.mssqltips.com/sqlservertip/6230/memoryoptimized-tempdb-metadata-in-sql-server-2019/ +[What permissions do temp stored procedures use?]:https://sqlstudies.com/2019/06/19/what-permissions-do-temp-stored-procedures-use/ +[SQLskills SQL101: Should you kill that long-running transaction?]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-should-you-kill-that-long-running-transaction/ +[A quick and dirty scan of a list of instances using a dynamic linked server]:https://sqlstudies.com/2020/11/12/a-quick-and-dirty-scan-of-a-list-of-instances-using-a-dynamic-linked-server/ +[sp_whoisactive: Analyzing Tempdb Contention]:http://whoisactive.com/docs/21_tempdb/ +[How to Choose Between RCSI and Snapshot Isolation Levels]:https://littlekendra.com/2016/02/18/how-to-choose-rcsi-snapshot-isolation-levels/ +[Explore the SQL query table hint READPAST]:https://www.sqlshack.com/explore-the-sql-query-table-hint-readpast/ +[How Bad Statistics Cause Bad SQL Server Query Performance]:https://www.brentozar.com/archive/2020/11/how-bad-statistics-cause-bad-sql-server-query-performance/ +[How Scalar User-Defined Functions Slow Down Queries]:https://www.brentozar.com/archive/2020/11/how-scalar-user-defined-functions-slow-down-queries/ From 9acb2fb2e099210f63d16267042cfeb662e90493 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 20 Nov 2020 16:32:52 +0300 Subject: [PATCH 156/553] Add new awesome resources --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9eecaacb..3e034d02 100644 --- a/README.md +++ b/README.md @@ -387,6 +387,12 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [`sp_alter_column` stored procedure is able to alter a column with dependencies](https://github.com/segovoni/sp_alter_column) (by Sergio Govoni) - [Toolbox repository for Madeira's consultant team](https://github.com/MadeiraData/MadeiraToolbox) (by Madeira) - [`mssql-jobs-hadr` - maintain scheduled jobs on SQL Servers with either Availability Groups or Database Mirroring](https://github.com/MadeiraData/mssql-jobs-hadr) (by Eitan Blumin) + - [Fluent Migrator is a migration framework for .NET much like Ruby on Rails Migrations](https://github.com/fluentmigrator/fluentmigrator) (by Eivind Gussiås Løksetheloekset, Mark Junker, Tom Marien) + - [SQL Server in Docker](https://github.com/microsoft/mssql-docker) (by Microsoft) + - [ActiveRecord SQL Server Adapter - SQL Server Adapter For Rails](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter) (by rails-sqlserver) + - [EFCorePowerTools - Reverse engineering, model visualization and migrations UI for EF Core](https://github.com/ErikEJ/EFCorePowerTools) (by Erik Ejlskov Jensen) + - [SqlTableDependency - a high-level C# component used to audit, monitor and receive notifications on SQL Server's record table changes](https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency) (by Christian Del Bianco) + - [EFSecondLevelCache.Core - Entity Framework Core Second Level Caching Library (Redis)](https://github.com/VahidN/EFSecondLevelCache.Core) (by Vahid Nasiri) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 4d462d1d59a331625cdfec15e2d823247f84f546 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 21 Nov 2020 15:28:18 +0300 Subject: [PATCH 157/553] Add new must read articles --- Articles/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 93fe5e6f..c06d1d08 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1207,7 +1207,7 @@ Articles types: | [SQL Server Temporary Object Caching] | Paul White | 2017-05-02 | [DBA][DEV] | | [Dynamic Data Unmasking] | Joe Obbish | 2017-08-24 | [DBA][DEV] | | [3 Ways to Run DBCC CHECKDB Faster] | Brent Ozar | 2020-08-27 | [DBA][DEV] | -| [Back Up SQL Server 43%-67% Faster by Writing to Multiple Files.] | Brent Ozar | 2020-08-23 | [DBA][DEV] | +| [Back Up SQL Server 43%-67% Faster by Writing to Multiple Files] | Brent Ozar | 2020-08-23 | [DBA][DEV] | | [Bad Habits to Kick : Using SELECT * / omitting the column list] | Aaron Bertrand | 2009-10-10 | [DBA][DEV] | | [All The Problems With Select *] | Erik Darlling | 2019-12-10 | [DBA][DEV] | | [When Select * Doesn’t Matter] | Erik Darlling | 2019-11-18 | [DBA][DEV] | @@ -1286,6 +1286,11 @@ Articles types: | [Explore the SQL query table hint READPAST] | Rajendra Gupta | 2020-11-14 | [DBA][DEV] | | [How Bad Statistics Cause Bad SQL Server Query Performance] | Brent Ozar | 2020-11-14 | [DBA][DEV] | | [How Scalar User-Defined Functions Slow Down Queries] | Brent Ozar | 2020-11-14 | [DBA][DEV] | +| [Could verifying your backups be costing you money?] | Matt Robertshaw | 2020-01-01 | [AZ][B] | +| [Extended Events: System_health And A Long Running Query] | Grant Fritchey | 2020-05-09 | [XE] | +| [Altering an indexed view in SQL Server drops all indexes] | Little Kendra | 2020-03-02 | [DBA][DEV] | +| [Deprecated and discontinued features in SQL Server] | Randolph West | 2020-03-04 | [DBA][DEV] | +| [Query Store, Plan Forcing, And Drop/create] | Grant Fritchey | 2020-03-02 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2403,6 +2408,7 @@ Articles types: [Prevent Unexpected Failovers When Patching AGs]:https://joshthecoder.com/2020/05/21/prevent-unexpected-failovers-when-patching-ags.html [Updating Statistics Causes Parameter Sniffing]:https://www.brentozar.com/archive/2020/06/updating-statistics-causes-parameter-sniffing/ [The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ +[The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://blog.kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ [Are Statistics Being Used for inserted and deleted tables and table variables?]:https://community.idera.com/database-tools/blog/b/community_blog/posts/are-statistics-being-used [Tackling Imperial and US Customary Measurements in Databases]:https://www.red-gate.com/simple-talk/blogs/tackling-imperial-and-us-customary-measurements-in-databases/ [In-Memory OLTP Best Practices – Part 1]:https://devblogs.microsoft.com/premier-developer/in-memory-oltp-best-practices-part-1/ @@ -2436,7 +2442,7 @@ Articles types: [Security Best Practice: dny and revoke permissions granted to All Users by default - HIGHLY IMPORTANT!]:https://ariely.info/Blog/tabid/83/EntryId/241/Security-Best-Practice-dny-and-revoke-permissions-granted-to-All-Users-by-default-HIGHLY-IMPORTANT.aspx [Execute multiple jobs Synchronously from in a main job]:https://ariely.info/Blog/tabid/83/EntryId/250/Execute-multiple-jobs-Synchronously-from-in-a-main-job.aspx [The Trillion Row Operator]:https://www.erikdarlingdata.com/2020/08/the-trillion-row-operator/ -[Temporal Tables and Table Partitioning: Not If You Like Switching Partitions]:https://www.erikdarlingdata.com/2020/03/temporal-tables-and-table-partitioning-not-if-you-like-switching-partitions/ +[Temporal Tables and Table Partitioning: Not If You Like Switching Partitions]:https://www.erikdarlingdata.com/sql-server/temporal-tables-and-table-partitioning-not-if-you-like-switching-partitions/ [Long Running Query on Read-Only Replica that takes moments on the Primary]:https://dba.stackexchange.com/questions/237671/long-running-query-on-read-only-replica-that-takes-moments-on-the-primary/ [Date Tables are Great for Users, but Not So Great for Performance]:https://www.brentozar.com/archive/2020/08/date-tables-are-great-for-users-but-not-so-great-for-performance/ [Should I install SSMS on a server running SQL Server?]:https://am2.co/2020/04/should-i-install-ssms-on-a-server-running-sql-server/ @@ -2522,7 +2528,7 @@ Articles types: [How to Find Out Whose Queries are Using The Most CPU]:https://www.brentozar.com/archive/2020/08/how-to-find-out-whose-queries-are-using-the-most-cpu/ [Limitations of SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5042/limitations-of-sql-server-native-backup-and-restore-in-amazon-rds/ [SQL Server Native Backup and Restore in Amazon RDS]:https://www.mssqltips.com/sqlservertip/5041/sql-server-native-backup-and-restore-in-amazon-rds/ -[What Is the SQL Server CEIP Service?]:https://www.brentozar.com/archive/2020/10/what-is-the-sql-server-ceip-service/ +[What Is the SQL Server CEIP Service (telemetry)?]:https://www.brentozar.com/archive/2020/10/what-is-the-sql-server-ceip-service/ [Maximum Simultaneous User Connections]:http://www.sqlnuggets.com/blog/disable-telemetry-on-multiple-sql-servers-with-powershell/ [Find Database Connection Leaks in Your Application]:https://sqlperformance.com/2017/07/sql-performance/find-database-connection-leaks [How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers]:https://eitanblumin.com/2020/10/05/how-to-troubleshoot-threadpool-waits-and-deadlocked-schedulers/ @@ -2546,3 +2552,8 @@ Articles types: [Explore the SQL query table hint READPAST]:https://www.sqlshack.com/explore-the-sql-query-table-hint-readpast/ [How Bad Statistics Cause Bad SQL Server Query Performance]:https://www.brentozar.com/archive/2020/11/how-bad-statistics-cause-bad-sql-server-query-performance/ [How Scalar User-Defined Functions Slow Down Queries]:https://www.brentozar.com/archive/2020/11/how-scalar-user-defined-functions-slow-down-queries/ +[Could verifying your backups be costing you money?]:https://blog.coeo.com/verifying-backups-cost +[Extended Events: System_health And A Long Running Query]:https://www.scarydba.com/2020/03/09/extended-events-system_health-and-a-long-running-query/ +[Altering an indexed view in SQL Server drops all indexes]:https://littlekendra.com/2020/03/02/altering-an-indexed-view-in-sql-server-drops-all-indexes/ +[Deprecated and discontinued features in SQL Server]:https://bornsql.ca/blog/deprecated-and-discontinued-features-in-sql-server/ +[Query Store, Plan Forcing, And Drop/create]:https://www.scarydba.com/2020/03/02/query-store-plan-forcing-and-drop-create/ From 1f25f4d532ca96aec6325a58e03ee2e201eb5858 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 22 Nov 2020 15:28:48 +0300 Subject: [PATCH 158/553] Add SchemaQueryByUser XE --- Extended_Events/SchemaQueryByUser.sql | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Extended_Events/SchemaQueryByUser.sql diff --git a/Extended_Events/SchemaQueryByUser.sql b/Extended_Events/SchemaQueryByUser.sql new file mode 100644 index 00000000..18de9a75 --- /dev/null +++ b/Extended_Events/SchemaQueryByUser.sql @@ -0,0 +1,30 @@ +/* +Original link: https://gist.github.com/SQLDBAWithABeard/3a617e04de5db729e941a0fd6ebed7cc +Author: Rob Sewell +*/ + +/* Stop trace if started */ +IF EXISTS (SELECT * FROM sys.dm_xe_sessions WHERE name = 'SchemaQueryByUser') + ALTER EVENT SESSION SchemaQueryByUser ON SERVER STATE = STOP; + +/* Delete trace if exists */ +IF EXISTS (SELECT * FROM sys.server_event_sessions WHERE name = 'SchemaQueryByUser') + DROP EVENT SESSION AppExecutionTimeout ON SERVER; + +/* Create trace */ +CREATE EVENT SESSION SchemaQueryByUser ON SERVER +ADD EVENT sqlserver.sql_batch_completed(SET collect_batch_text=(1) + ACTION(sqlserver.database_name,sqlserver.session_server_principal_name) + WHERE ((((((((NOT ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[session_server_principal_name],N'EZCORP\Y%'))) + AND (([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%%')) + OR ([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[database_name],N'')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%SELECT CASE WHEN has_dbaccess%END%')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%SELECT case when @edition = N''SQL Azure''%')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%SERVERPROPERTY(%')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%HasMemoryOptimizedObjects from master.sys.master_files mf join master.sys.databases db on mf.database_id%')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%database_query_store_options%')))) + AND (NOT ([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%SET SHOWPLAN%'))))) +GO + +ALTER EVENT SESSION SchemaQueryByUser ON SERVER STATE = START; +GO From ca14479bf6c63a18a9813d9001b8a9040ce68842 Mon Sep 17 00:00:00 2001 From: Protiguous Date: Sun, 22 Nov 2020 13:42:38 -0700 Subject: [PATCH 159/553] Update and rename Create_2_Millions_Tables.sql to Create_2_Million_Tables.sql Changed tables to be created to be 2,147,483,647 - count of objects (not just tables) in database per the documentation link. --- Scripts/Create_2_Million_Tables.sql | 39 +++++++++++++++++++++++++ Scripts/Create_2_Millions_Tables.sql | 43 ---------------------------- 2 files changed, 39 insertions(+), 43 deletions(-) create mode 100644 Scripts/Create_2_Million_Tables.sql delete mode 100644 Scripts/Create_2_Millions_Tables.sql diff --git a/Scripts/Create_2_Million_Tables.sql b/Scripts/Create_2_Million_Tables.sql new file mode 100644 index 00000000..4863a99e --- /dev/null +++ b/Scripts/Create_2_Million_Tables.sql @@ -0,0 +1,39 @@ +/* +https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server +Database objects include objects such as tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. +The sum of the number of all objects in a database cannot exceed 2,147,483,647. +*/ +CREATE DATABASE [TwoMillion]; + +ALTER DATABASE [TwoMillion] SET RECOVERY SIMPLE WITH NO_WAIT; +GO + +USE [TwoMillion]; + +SET NOCOUNT ON; + +DECLARE @sql nvarchar(max) = N''; +DECLARE @i int = 1; + +SELECT @i = 2147483647 - COUNT(*) FROM [TwoMillion].sys.objects; +PRINT N'Creating ' + FORMAT(@i,'N0') + N' tables...'; + +WHILE @i > 0 +BEGIN + SET @i -= 1; + + SET @sql = N'CREATE TABLE [TwoMillion].dbo.t' + CONVERT(nvarchar(max),2147483648-@i) + N' (i int);'; + IF (@i % 10000) = 0 RAISERROR(@sql, 0, 1) WITH NOWAIT; + + EXEC sp_executesql @sql; +END; + +/* +ALTER DATABASE [TwoMillion] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; +GO + +USE master; +GO + +DROP DATABASE [TwoMillion]; +*/ diff --git a/Scripts/Create_2_Millions_Tables.sql b/Scripts/Create_2_Millions_Tables.sql deleted file mode 100644 index c8e1c902..00000000 --- a/Scripts/Create_2_Millions_Tables.sql +++ /dev/null @@ -1,43 +0,0 @@ -/* -https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-2017 -Database objects include objects such as tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. -The sum of the number of all objects in a database cannot exceed 2,147,483,647. -*/ - -CREATE DATABASE TwoMillions; -GO - -ALTER DATABASE TwoMillions SET RECOVERY SIMPLE WITH NO_WAIT; - -USE TwoMillions; -GO - - -SET NOCOUNT ON; - -DECLARE @tsql nvarchar(max) = N''; -DECLARE @tsqlTemplate nvarchar(max) = N'CREATE TABLE t_i_ (c_i_ int); INSERT INTO t_i_ VALUES(_i_);'; -DECLARE @i int = 1; - -SELECT @i = COUNT(*) + 1 FROM TwoMillions.sys.tables; - -WHILE @i < 2147483648 -BEGIN - SET @tsql = REPLACE(@tsqlTemplate, N'_i_', CAST(@i AS nvarchar(max))); - --RAISERROR(@tsql, 0, 1) WITH NOWAIT; - - EXEC sp_executesql @tsql; - SET @i = @i +1; - - IF (@i % 10000) = 0 RAISERROR(@i, 0, 1) WITH NOWAIT;; -END; - -/* -ALTER DATABASE TwoMillions SET SINGLE_USER WITH ROLLBACK IMMEDIATE; -GO - -USE master; -GO - -DROP DATABASE TwoMillions; -*/ From 3eef9d3e4f999aaa2fbe692d700a0a4a18544f10 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 23 Nov 2020 15:30:36 +0300 Subject: [PATCH 160/553] Add Get_Opened_Transactions_Info script --- Scripts/Get_Opened_Transactions_Info.sql | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Scripts/Get_Opened_Transactions_Info.sql diff --git a/Scripts/Get_Opened_Transactions_Info.sql b/Scripts/Get_Opened_Transactions_Info.sql new file mode 100644 index 00000000..dacc7a22 --- /dev/null +++ b/Scripts/Get_Opened_Transactions_Info.sql @@ -0,0 +1,46 @@ +/* + + Get opened transactions information + 1 data set with information about opened transactions. + 2017-01-01 by Paul Randal + 2020-11-19 by Konstantin Taranov + 1.1 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Get_Opened_Transactions_Info.sql + https://sqlstudies.com/2013/09/05/a-t-sql-query-to-get-current-job-activity/ + +*/ + +SELECT + s_tst.session_id + , s_es.login_name AS "Login Name" + , DB_NAME (s_tdt.database_id) AS "Database" + , s_tdt.database_transaction_begin_time AS "Begin Time" + , s_tdt.database_transaction_log_bytes_used AS "Log Bytes" + , s_tdt.database_transaction_log_bytes_reserved AS "Log Reserved Bytes" + , s_est.text AS "Last T-SQL Text" + , s_eqp.query_plan AS "Last Plan" +FROM + sys.dm_tran_database_transactions s_tdt +INNER JOIN + sys.dm_tran_session_transactions s_tst +ON + s_tst.transaction_id = s_tdt.transaction_id +INNER JOIN + sys.dm_exec_sessions s_es +ON + s_es.session_id = s_tst.session_id +INNER JOIN + sys.dm_exec_connections s_ec +ON + s_ec.session_id = s_tst.session_id +LEFT OUTER JOIN + sys.dm_exec_requests s_er +ON + s_er.session_id = s_tst.session_id +CROSS APPLY + sys.dm_exec_sql_text (s_ec.most_recent_sql_handle) AS s_est +OUTER APPLY + sys.dm_exec_query_plan (s_er.plan_handle) AS s_eqp +ORDER BY + s_tdt.database_transaction_begin_time ASC; +GO From 0ecf9edce1150be9946ad64dd30f28fd5b8363c9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 23 Nov 2020 15:49:11 +0300 Subject: [PATCH 161/553] Add useful recommendation for using hints --- ...rver Name Convention and T-SQL Programming Style.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 25656b2f..3c38ddf1 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -324,7 +324,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. ``` - Always use aliases for table names. More details [here](https://sqlinthewild.co.za/index.php/2019/04/23/no-this-is-not-a-bug-in-t-sql/). - - Avoid non-standard column and table aliases, use, if required, double-quotes for special characters and always `AS` keyword before alias: + - Avoid non-standard column and table aliases, use, if required, double-quotes for special characters and always `AS` keyword before alias: ```sql SELECT p.LastName AS "Last Name" @@ -409,6 +409,9 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. More details [here](https://bornsql.ca/blog/using-indexed-views-dont-forget-this-important-tip/). - Use [`LOOP JOIN`](https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query#arguments) and [`FAST 1`](https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query#arguments) query hints for deleting huge number of rows with `ON DELETE CASCADE` foreign keys specification. More details [here](https://dba.stackexchange.com/a/262116). + - If you use [hints] always use it with `WITH` keyword because omitting the `WITH` keyword is a deprecated feature and will be removed from future Microsoft SQL Server versions. + One benefit of using the `WITH` keyword is that you can specify multiple table hints using the WITH keyword against the same table. + More details [here](https://www.sqlshack.com/understanding-impact-clr-strict-security-configuration-setting-sql-server-2017/). - Avoid use of `SELECT…INTO` for production code, use instead `CREATE TABLE` + `INSERT INTO …` approach. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/use-selectinto-statement). - Use only ISO standard JOINS syntaxes. The *old style* Microsoft/Sybase `JOIN` style for SQL, which uses the `=*` and `*=` syntax, has been deprecated and is no longer used. Queries that use this syntax will fail when the database engine level is 10 (SQL Server 2008) or later (compatibility level 100). The ANSI-89 table citation list (`FROM tableA, tableB`) is still ISO standard for `INNER JOINs` only. Neither of these styles are worth using. @@ -435,6 +438,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - avoid truncation of string literals, simply ensure that one piece is converted to `nvarchar(max)`. Example: ```tsql + /* good */ DECLARE @nvcmaxVariable nvarchar(max); SET @nvcmaxVariable = CAST(N'ಠ russian anomaly ЯЁЪ ಠ ' AS nvarchar(max)) + N'something else' + N'another'; SELECT @nvcmaxVariable; @@ -514,7 +518,8 @@ ORDER BY t2.Value2; Recommendations from Microsoft: [Stored procedure Best practice][11] - - All stored procedures and functions should use `ALTER` statement and start with the object presence check (see example below) for saving GRANTs on your object. + - All stored procedures and functions should use `ALTER` statement and start with the object presence check (see example below) for saving `GRANTs` on your object. + Also if you use Query Store and plan forcing and `DROP` and then `CREATE` new object you loosing plan forcing, more details [here](https://www.scarydba.com/2020/03/02/query-store-plan-forcing-and-drop-create/). For SQL Server 2016 and higher you can use new `CREATE OR ALTER` statement. - `ALTER` statement should be preceded by 2 line breaks - Parameters name should be in **camelCase** @@ -756,3 +761,4 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure [explicit transactions]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql [autocommit]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql [`ANSI`]:http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip +[hints]https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql From 709e25e6babef9391486f69e44cb7cc89d77e560 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 24 Nov 2020 14:22:01 +0300 Subject: [PATCH 162/553] Add new interesting articles --- Articles/README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index c06d1d08..985be371 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -2,6 +2,7 @@ Articles types: - **[AZ]** Azure Articles + - **[AMZ]** Amazon AWS Articles - **[B]** Backup Articles - **[BENCH]** Benchmarking Articles - **[IDX]** Index Articles @@ -843,7 +844,7 @@ Articles types: | [Compress Big Tables] | Max Vernon | 2019-08-22 | [DBA][DEV] | | [Hardening SQL Server Security] | Mitch Wheat | 2019-08-21 | [DBA][SEC] | | [Splitting Strings With OPENJSON] | Dave Mason | 2019-05-06 | [DEV][X] | -| [How to migrate to Amazon RDS for SQL Server using transactional replication] | Richard Waymire | 2018-05-17 | [DBA][MG] | +| [How to migrate to Amazon RDS for SQL Server using transactional replication] | Richard Waymire | 2018-05-17 | [AMZ][MG] | | [The Hardest Part Of Query Tuning: Logical Equivalence] | Erik Darling | 2019-08-13 | [DBA][DEV] | | [SQL Injection: What is it? Causes and exploits] | Ed Pollack | 2019-08-30 | [SEC] | | [SQL Injection: Detection and prevention] | Ed Pollack | 2019-08-30 | [SEC] | @@ -960,7 +961,7 @@ Articles types: | [PCI Best Practices Guide for SQL Server DBAs] | Tibor Nagy | 2015-05-08 | [DBA][SEC] | | [SQL Server Security Checklist] | Tibor Nagy | 2014-02-06 | [DBA][SEC] | | [Replace Model SQL Server Database with a User Database] | Daniel Farina | 2019-12-13 | [DBA] | -| [SQL Server Linux installation for Amazon EC2 instance with Red Hat OS] | Rajendra Gupta | 2020-01-09 | [DBA] | +| [SQL Server Linux installation for Amazon EC2 instance with Red Hat OS] | Rajendra Gupta | 2020-01-09 | [AMZ | | [Departure of a SQL Server Administrator – What to Check?] | Thomas Rushton | 2020-01-03 | [DBA] | | [The Curious Case of… transactions rolling back during DBCC CHECKDB] | Paul Randal | 2020-01-15 | [DBA] | | [Don’t install SQL Server from a mounted ISO] | Randolph West | 2020-01-15 | [DBA] | @@ -1260,8 +1261,8 @@ Articles types: | [The What, Why, When, and How of Incremental Loads] | Tim Mitchell | 2020-07-23 | [DBA][DEV] | | [How Do I Know If My Query Is Good Enough for Production?] | Brent Ozar | 2020-08-12 | [DBA][DEV] | | [How to Find Out Whose Queries are Using The Most CPU] | Brent Ozar | 2020-08-10 | [DBA][DEV] | -| [Limitations of SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-23 | [B] | -| [SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-18 | [B] | +| [Limitations of SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-23 | [AMZ][B] | +| [SQL Server Native Backup and Restore in Amazon RDS] | Sadequl Hussain | 2017-08-18 | [AMZ][B] | | [What Is the SQL Server CEIP Service (telemetry)?] | Brent Ozar | 2020-10-07 | [DBA] | | [Maximum Simultaneous User Connections] | Michael J Swart | 2020-10-16 | [DBA] | | [Find Database Connection Leaks in Your Application] | Michael J Swart | 2017-07-07 | [DBA][DEV] | @@ -1290,7 +1291,12 @@ Articles types: | [Extended Events: System_health And A Long Running Query] | Grant Fritchey | 2020-05-09 | [XE] | | [Altering an indexed view in SQL Server drops all indexes] | Little Kendra | 2020-03-02 | [DBA][DEV] | | [Deprecated and discontinued features in SQL Server] | Randolph West | 2020-03-04 | [DBA][DEV] | -| [Query Store, Plan Forcing, And Drop/create] | Grant Fritchey | 2020-03-02 | [DBA][DEV] | +| [Query Store, Plan Forcing, And Drop/create] | Grant Fritchey | 2020-03-02 | [QS] | +| [Uncommon SQL in SQL Server] | Shane O'Neill | 2020-11-20 | [DBA][DEV] | +| [Configure SQL Server Replication between AWS RDS SQL Server and On-premises SQL Server] | Rajendra Gupta | 2020-11-12 | [AMZ] | +| [Import data into Azure SQL database from AWS Redshift] | Rahul Mehta | 2020-11-10 | [AMZ][AZ] | +| [When You’re Troubleshooting Blocking, Look at Query #2, Too.] | Brent Ozar | 2020-11-19 | [DBA][DEV] | +| [Finding the One Query to Tune in a Multi-Query Batch] | Brent Ozar | 2020-11-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2557,3 +2563,8 @@ Articles types: [Altering an indexed view in SQL Server drops all indexes]:https://littlekendra.com/2020/03/02/altering-an-indexed-view-in-sql-server-drops-all-indexes/ [Deprecated and discontinued features in SQL Server]:https://bornsql.ca/blog/deprecated-and-discontinued-features-in-sql-server/ [Query Store, Plan Forcing, And Drop/create]:https://www.scarydba.com/2020/03/02/query-store-plan-forcing-and-drop-create/ +[Uncommon SQL in SQL Server]:https://nocolumnname.blog/2020/11/20/uncommon-sql/ +[Configure SQL Server Replication between AWS RDS SQL Server and On-premises SQL Server]:https://www.sqlshack.com/configure-sql-server-replication-between-aws-rds-sql-server-and-on-premises-sql-server/ +[Import data into Azure SQL database from AWS Redshift]:https://www.sqlshack.com/import-data-into-azure-sql-database-from-aws-redshift/ +[When You’re Troubleshooting Blocking, Look at Query #2, Too.]:https://www.brentozar.com/archive/2020/11/when-youre-troubleshooting-blocking-look-at-query-2-too/ +[Finding the One Query to Tune in a Multi-Query Batch]:https://www.brentozar.com/archive/2020/11/finding-the-one-query-to-tune-in-a-multi-query-batch/ From 578fd95a889437b00df7e96baf074b2ccbdd978a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 25 Nov 2020 14:22:38 +0300 Subject: [PATCH 163/553] Add useful info --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e034d02..0fba61bb 100644 --- a/README.md +++ b/README.md @@ -393,6 +393,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [EFCorePowerTools - Reverse engineering, model visualization and migrations UI for EF Core](https://github.com/ErikEJ/EFCorePowerTools) (by Erik Ejlskov Jensen) - [SqlTableDependency - a high-level C# component used to audit, monitor and receive notifications on SQL Server's record table changes](https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency) (by Christian Del Bianco) - [EFSecondLevelCache.Core - Entity Framework Core Second Level Caching Library (Redis)](https://github.com/VahidN/EFSecondLevelCache.Core) (by Vahid Nasiri) + - [Dotmim.Sync - a brand new database synchronization, multi platform, multi databases, developed on top of .Net Standard 2.0](https://github.com/Mimetis/Dotmim.Sync) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) @@ -538,7 +539,7 @@ BIML Bloggers - https://github.com/benkeen/generatedata - https://sourceforge.net/projects/dbmonster/ - https://sourceforge.net/projects/spawner/ - - [Tools for Generating Mock Data?](https://stackoverflow.com/q/591892) + - [Tools for Generating Mock Data](https://stackoverflow.com/q/591892) - https://mockaroo.com - https://anonymize.strd.co/ @@ -622,6 +623,7 @@ R: - [Pro SQL Server Internals](https://www.amazon.co.uk/dp/1484219635/) 840 pages (by Dmitri Korotkevitch) - [Pro SQL Server Always On Availability Groups](https://www.amazon.co.uk/dp/B01M3U6WRM/) 332 pages (by Uttam Parui, Vivek Sanil) - [Refactoring Legacy T-SQL for Improved Performance: Modern Practices for SQL Server](https://www.amazon.co.uk/dp/1484255801/) 260 pages (by Lisa Bohm) +- [Hands-On SQL Server 2019 Analysis Services](https://www.packtpub.com/product/hands-on-sql-server-2019-analysis-services/9781800204768) (by Steve Hughes) **[⬆ back to top](#table-of-contents)** From 79b15e0d822fb34ab93f89aeed1f28a8fd554fce Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 26 Nov 2020 08:32:40 +0300 Subject: [PATCH 164/553] Add Devart Transaction Log and Beekeeper Studio --- Utilities/README.md | 885 +++++++++++++++++++++++--------------------- 1 file changed, 464 insertions(+), 421 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index d54159eb..13f3627e 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,8 +1,8 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **391** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **393** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {16} + - **[B]**: Backup solutions {17} - **[BI]**: Business Intelligence Solutions {4} - **[D]**: Documentation solutions {8} - **[DA]**: Database Architecture {20} @@ -13,8 +13,8 @@ Utility types (main purpose), in braces `{}` current counts: - **[G]**: Data generation {4} - **[J]**: Job managers {4} - **[M]**: Monitoring and alerting Tools {27} - - **[MG]**: Migration tool {30} - - **[MS]**: Management Studio (alternative for SSMS) {32} + - **[MG]**: Migration tool {31} + - **[MS]**: Management Studio (alternative for SSMS) {33} - **[REC]**: Recovery tools {13} - **[S]**: Search tools {7} - **[SEC]**: Security tools {7} @@ -23,404 +23,406 @@ Utility types (main purpose), in braces `{}` current counts: - **[T]**: Testing tools {7} - **[?]**: Not yet classified {155} -| Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | -|------------------------------------------------------------------|-------------------------------|-----------|----------|---------------------------------------------|------------|-------------------------|------------|----------------|------:| -| [SSMS](#ssms) | No | No | [MS] | [SSMS] | 2020-04-07 | Microsoft | | Yes | No | -| [Azure Data Studio](#ads) | PostgreSQL | Linux,Mac | [MS] | [Azure Data Studio] | 2020-05-20 | Microsoft | [MIT] | Open Source | No | -| [bcp Utility](#bcp) | No | No | [I] | [bcp Utility] | 2012-02-11 | Microsoft | | Yes | No | -| [sqlcmd Utility](#sqlcmd-utility) | No | No | [I] | [sqlcmd Utility] | 2016-08-23 | Microsoft | | Yes | No | -| [mssql-cli](#mssql-cli) | No | Linux,Mac | [?] | [mssql-cli] | 2020-05-01 | Microsoft | [BSD-3] | Open Source | No | -| [RML Utilities for SQL Server](#rml) | No | No | [T] | [RML Utilities for SQL Server] | 2014-12-12 | Microsoft | | Yes | No | -| [GraphView](#graphview) | No | No | [?] | [GraphView] | 2016-02-23 | Microsoft | | Yes | No | -| [Baseline Security Analyze](#baseline-security-analyze) | No | No | [SEC] | [Baseline Security Analyze] | 2015-01-09 | Microsoft | | Yes | No | -| [tablediff Utility](#tablediff-utility) | No | No | [I] | [tablediff Utility] | - | Microsoft | | Yes | No | -| [Microsoft Log Parser](#microsoft-log-parser) | No | No | [?] | [Microsoft Log Parser] | - | Microsoft | | Yes | No | -| [Log Parser Lizard GUI](#log-parser-lizard-gui) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Log Parser Lizard GUI] | 2017-06-01 | Lizard Labs | | Yes | $59 | -| [Diskspd](#diskspd) | No | No | [T] | [Diskspd] | 2015-12-14 | Microsoft | | Yes | No | -| [HammerDB](#hammerdb) | No | No | [T] | [HammerDB] | 2015-05-04 | Open Source | | Yes | No | -| [Exchange Server Error Code Look-up](#error-code-look-up) | No | No | [?] | [Exchange Server Error Code Look-up] | 2004-05-10 | Microsoft | | Yes | No | -| [LINQPad](#linqpad) | No | No | [?] | [LINQPad] | 2016-01-02 | Joseph Albahari | | Non-commercial | $45 | -| [SqlDynamite](#sqldynamite) | No | No | [S] | [SqlDynamite] | 2016-04-06 | Anatoly Sova | | Yes | No | -| [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | -| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | -| [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | -| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | -| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | -| [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | -| [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | -| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Sybase](#sybasetosql) | No | No | [MG] | [Migration Assistant for Sybase] | 2017-02-17 | Microsoft | | Yes | No | -| [dta Utility](#dta-utility) | No | No | [I] | [dta Utility] | - | Microsoft | | Yes | No | -| [osql Utility](#osql-utility) | No | No | [I] | [osql Utility] | - | Microsoft | | Yes | No | -| [sqldiag Utility](#sqldiag-utility) | No | No | [I] | [sqldiag Utility] | - | Microsoft | | Yes | No | -| [sqldumper Utility](#sqldumper-utility) | No | No | [I] | [sqldumper Utility] | - | Microsoft | | Yes | No | -| [SqlLocalDB Utility](#sqllocaldb-utility) | No | No | [I] | [SqlLocalDB Utility] | - | Microsoft | | Yes | No | -| [sqllogship Utility](#sqllogship-utility) | No | No | [I] | [sqllogship Utility] | - | Microsoft | | Yes | No | -| [sqlservr Application](#sqlservr-application) | No | No | [I] | [sqlservr Application] | - | Microsoft | | Yes | No | -| [sqlps Utility](#sqlps-utility) | No | No | [I] | [sqlps Utility] | - | Microsoft | | Yes | No | -| [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | -| [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | -| [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | -| [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | -| [SQL Server 2005 Best Practices Analyzer](#bpa-2005) | No | No | [?] | [BPA 2005] | 2008-08-13 | Microsoft | | Yes | No | -| [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | -| [SQL Server 2008 R2 Best Practices Analyzer](#bpa-2008) | No | No | [?] | [BPA 2008] | 2010-06-18 | Microsoft | | Yes | No | -| [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | -| [Elastic database tools](#elastic-database-tools) | No | No | [?] | [Elastic database tools] | ? | Microsoft | | Yes | No | -| [Microsoft Sync Framework](#microsoft-sync-framework) | No | No | [?] | [Microsoft Sync Framework] | 2020-04-22 | Microsoft | | Yes | No | -| [Query Performance Insight for Azure SQL Database](#query-perf) | No | No | [?] | [Query Performance Insight for Azure SQL Database]| ? | Microsoft | | Yes | No | -| [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | -| [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | -| [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | -| [Red Gate SQL Monitor](#red-gate-sql-monitor) | No | No | [M] | [Red Gate SQL Monitor] | 2015-10-15 | Red Gate | | No | $1495 | -| [Red Gate SQL Backup Pro](#red-gate-sql-backup-pro) | No | No | [B] | [Red Gate SQL Backup Pro] | 2014-07-08 | Red Gate | | No | $995 | -| [Red Gate SQL Doc](#red-gate-sql-doc) | No | No | [D] | [Red Gate SQL Doc] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Data Generator](#red-gate-sql-data-generator) | No | No | [G] | [Red Gate SQL Data Generator] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Dependency Tracker](#sql-dependency-tracker) | No | No | [?] | [Red Gate SQL Dependency Tracker] | 2016-04-26 | Red Gate | | No | $369 | -| [Red Gate SQL Multi Script](#red-gate-sql-multi-script) | No | No | [?] | [Red Gate SQL Multi Script] | 2016-04-15 | Red Gate | | No | $245 | -| [Red Gate SQL Index Manager](#red-gate-sql-index-manager) | No | No | [IDX] | [Red Gate SQL Index Manager] | ? | Red Gate | | No | $149 | -| [Red Gate SQL Comparison SDK](#red-gate-sql-comparison-sdk) | No | No | [DC],[SC]| [Red Gate SQL Comparison SDK] | 2016-02-22 | Red Gate | | No | $895 | -| [Red Gate SQL Clone](#red-gate-sql-clone) | No | No | [?] | [Red Gate SQL Clone] | 2017-02-27 | Red Gate | | No | $6955 | -| [Red Gate SQL Provision](#red-gate-sql-provision) | No | No | [?] | [Red Gate SQL Provision] | 2018-02-26 | Red Gate | | No | $2955 | -| [Red Gate Data Masker](#red-gate-data-masker) | Oracle | No | [?] | [Red Gate SQL Data Masker] | 2018-02-26 | Red Gate | | No | $2395 | -| [DLM Automation](#dlm-automation) | No | No | [?] | [DLM Automation] | ? | Red Gate | | No | ? | -| [ReadyRoll](#readyroll) | No | No | [?] | [ReadyRoll] | 2016-01-03 | Red Gate | | No | $345 | -| [Rapid Database Extractor](#rapid-database-extractor) | Oracle | No | [?] | [Rapid Database Extractor] | 2016-11-03 | Idera | | Yes | No | -| [SQL XEvent Profiler](#sql-xevent-profiler) | No | No | [?] | [SQL XEvent Profiler] | 2014-03-14 | Idera | | Yes | No | -| [SQL Check](#sql-check) | No | No | [?] | [SQL Check] | 2015-09-24 | Idera | | Yes | No | -| [SQL Fragmentation Analyzer](#sql-fragmentation-analyzer) | No | No | [?] | [SQL Fragmentation Analyzer] | 2012-11-16 | Idera | | Yes | No | -| [SQL Heat Map](#sql-heat-map) | No | No | [?] | [SQL Heat Map] | 2016-01-27 | Idera | | Yes | No | -| [SQL Hekaton Memory Check](#sql-hekaton-memory-check) | No | No | [?] | [SQL Hekaton Memory Check] | 2015-06-10 | Idera | | Yes | No | -| [SQL Page Viewer](#sql-page-viewer) | No | No | [?] | [SQL Page Viewer] | 2014-08-25 | Idera | | Yes | No | -| [SQL Update Statistics](#sql-update-statistics) | No | No | [ST] | [SQL Update Statistics] | 2015-12-14 | Idera | | Yes | No | -| [SQL Statistics Aggregator](#sql-statistics-aggregator) | No | No | [ST] | [SQL Statistics Aggregator] | 2015-05-18 | Idera | | Yes | No | -| [SQL Backup Status Reporter](#sql-backup-status-reporter) | No | No | [B] | [SQL Backup Status Reporter] | 2015-08-07 | Idera | | Yes | No | -| [SQL Integrity Check](#sql-integrity-check) | No | No | [?] | [SQL Integrity Check] | 2013-08-26 | Idera | | Yes | No | -| [SQL Job Manager](#sql-job-manager) | No | No | [J] | [SQL Job Manager] | 2012-03-19 | Idera | | Yes | No | -| [Azure SQL Database Backup](#azure-sql-database-backup) | No | No | [B] | [Azure SQL Database Backup] | 2012-10-02 | Idera | | Yes | No | -| [SQL Column Search](#sql-column-search) | No | No | [S] | [SQL Column Search] | 2015-11-17 | Idera | | Yes | No | -| [SQL Permissions Extractor](#sql-permissions-extractor) | No | No | [?] | [SQL Permissions Extractor] | 2015-08-07 | Idera | | Yes | No | -| [SQL BI Check](#sql-bi-check) | No | No | [BI] | [SQL BI Check] | 2016-04-13 | Idera | | Yes | No | -| [SQL Inventory Check](#sql-inventory-check) | No | No | [?] | [SQL Inventory Check] | 2016-03-24 | Idera | | Yes | No | -| [SQL Diagnostic Manager](#sql-diagnostic-manager) | No | No | [?] | [SQL Diagnostic Manager] | ? | Idera | | No | $1747 | -| [SQL Safe Backup](#sql-safe-backup) | No | No | [B] | [SQL Safe Backup] | 2016-09-08 | Idera | | No | $907 | -| [SQL Compliance Manager](#sql-compliance-manager) | No | No | [?] | [SQL Compliance Manager] | 2015-09-08 | Idera | | No | $2657 | -| [SQL Inventory Manager](#sql-inventory-manager) | No | No | [?] | [SQL Inventory Manager] | 2016-04-22 | Idera | | No | $3195 | -| [SQL Virtual Database](#sql-virtual-database) | No | No | [?] | [SQL Virtual Database] | 2016-03-24 | Idera | | No | $625 | -| [SQL Secure](#sql-secure) | No | No | [?] | [SQL Secure] | 2016-04-19 | Idera | | No | $907 | -| [SQL Doctor](#sql-doctor) | No | No | [?] | [SQL Doctor] | 2015-12-17 | Idera | | No | $625 | -| [SQL Admin Toolset](#sql-admin-toolset) | No | No | [?] | [SQL Admin Toolset] | 2016-01-13 | Idera | | No | $395 | -| [SQL Defrag Manager](#sql-defrag-manager) | No | No | [?] | [SQL Defrag Manager] | 2016-03-10 | Idera | | No | $1495 | -| [DBArtisan](#dbartisan) | No | No | [?] | [DBArtisan] | ? | Idera | | No | $3122 | -| [SQL BI Manager](#sql-bi-manager) | No | No | [BI] | [SQL BI Manager] | 2015-09-08 | Idera | | No | $697 | -| [SQL Enterprise Job Manager](#sql-enterprise-job-manager) | No | No | [J] | [SQL Enterprise Job Manager] | 2015-09-08 | Idera | | No | $697 | -| [DB Optimizer](#db-optimizer) | No | No | [?] | [DB Optimizer] | ? | Idera | | No | $1420 | -| [SQL Query Store Optimizer](#sql-query-store-optimizer) | No | No | [?] | [SQL Query Store Optimizer] | 2016-07-01 | Idera | | Yes | No | -| [Rapid SQL](#rapid-sql) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Rapid SQL] | ? | Idera | | No | $710 | -| [SQL Comparison Toolset](#sql-comparison-toolset) | No | No | [DC],[SC]| [SQL Comparison Toolset] | ? | Idera | | No | $745 | -| [ER/Studio Data Architect](#erstudio-data-architect) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ER/Studio Data Architect] | | Idera | | No | $1287 | -| [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | -| [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | -| [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | -| [SQL Data Profiler](#sql-data-profiler) | No | No | [?] | [SQL Data Profiler] | ? | Idera | | No | ? | -| [SQL Instance Check](#sql-instance-check) | No | No | [M] | [SQL Instance Check] | ? | Idera | | Yes | ? | -| [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | -| [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | -| [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | -| [dbForge Query Builder](#dbforge-query-builder) | No | No | [?] | [dbForge Query Builder] | 2019-10-10 | Devart | Shareware | No | $100 | -| [dbForge Event Profiler](#dbforge-event-profiler) | No | No | [M] | [dbForge Event Profiler] | 2019-10-10 | Devart | Freeware | Yes | No | -| [dbForge SQL Decryptor](#dbforge-sql-decryptor) | No | No | [SEC] | [dbForge SQL Decryptor] | 2017-09-19 | Devart | Freeware | Yes | No | -| [dbForge Studio](#dbforge-studio) | No | No | [MS] | [dbForge Studio] | 2019-10-10 | Devart | Shareware | Yes | $250 | -| [dbForge Fusion](#dbforge-fusion) | No | No | [?] | [dbForge Fusion] | 2019-11-08 | Devart | Shareware | No | $150 | -| [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | -| [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | -| [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | -| [dbForge Complete](#dbforge-complete) | No | No | [?] | [dbForge Complete] | 2020-09-01 | Devart | Shareware | No | $199 | -| [dbForge SQL Azure Backup](#dbforge-sql-azure-backup) | No | No | [B] | [dbForge SQL Azure Backup] | 2013-04-18 | Devart | Freeware | Yes | No | -| [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | -| [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | -| [SQL Server Compression Estimator](#compression-estimator) | No | No | [?] | [SQL Server Compression Estimator] | 2011-06-02 | Bob Tavlor | | Yes | No | -| [ClearTrace](#cleartrace) | No | No | [M] | [ClearTrace] | 2016-07-07 | Bill Graziano | | Yes | No | -| [ClearTraceXE](#cleartracexe) | No | No | [M] | [ClearTraceXE] | 2019-09-04 | Bill Graziano | | Yes | No | -| [Security Explorer](#security-explorer) | No | No | [SEC] | [Security Explorer] | 2015-06-25 | Quest Software | | No | $850 | -| [LiteSpeed for SQL Server](#litespeed-for-sql-server) | No | No | [?] | [LiteSpeed for SQL Server] | 2015-07-31 | Quest Software | | No | ? | -| [Toad for SQL Server](#toad-for-sql-server) | No | No | [MS] | [Toad for SQL Server] | 2015-05-12 | Quest Software | | No | ? | -| [Quest Spotlight on SQL Server Enterprise](#quest-spotlight) | No | No | [?] | [Quest Spotlight] | 2016-03-10 | Quest Software | | No | $2561 | -| [Quest Foglight](#quest-foglight) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Quest Foglight] | 2019-08-29 | Quest Software | | No | $8203 | -| [Quest Enterprise Reporter](#quest-enterprise-reporter) | No | No | [?] | [Quest Enterprise Reporter] | ? | Quest Software | | No | $511 | -| [SQL Scripter](#sql-scripter) | No | No | [?] | [SQL Scripter] | 2013-02-24 | Thomas Hinsenkamp | | No | €99 | -| [Simple Dynamic Scheduler](#simple-dynamic-scheduler) | No | No | [?] | [Simple Dynamic Scheduler] | 2016-05-02 | Miljan Radovic | | Yes | No | -| [ApexSQL Audit](#apexsql-audit) | No | No | [?] | [ApexSQL Audit] | 2017-07-11 | ApexSQL | | No | $1699 | -| [ApexSQL Backup](#apexsql-backup) | No | No | [B] | [ApexSQL Backup] | 2017-10-12 | ApexSQL | | No | $499 | -| [ApexSQL Defrag](#apexsql-defrag) | No | No | [IDX] | [ApexSQL Defrag] | 2017-06-29 | ApexSQL | | No | $499 | -| [ApexSQL Log](#apexsql-log) | No | No | [?] | [ApexSQL Log] | 2017-05-24 | ApexSQL | | No | $1999 | -| [ApexSQL Monitor](#apexsql-monitor) | No | No | [M] | [ApexSQL Monitor] | 2017-10-05 | ApexSQL | | No | $499 | -| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2019-12-02 | ApexSQL | | Yes | No | -| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2020-02-19 | ApexSQL | | Yes | No | -| [ApexSQL Recover](#apexsql-recover) | No | No | [REC] | [ApexSQL Recover] | 2017-10-26 | ApexSQL | | No | $1999 | -| [ApexSQL Build](#apexsql-build) | No | No | [?] | [ApexSQL Build] | 2017-05-15 | ApexSQL | | No | $399 | -| [ApexSQL Clean](#apexsql-clean) | No | No | [?] | [ApexSQL Clean] | 2017-09-28 | ApexSQL | | No | $399 | -| [ApexSQL Data Diff](#apexsql-data-diff) | No | No | [DC] | [ApexSQL Data Diff] | 2017-10-26 | ApexSQL | | No | $399 | -| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2020-03-12 | ApexSQL | | Yes | No | -| [ApexSQL Diff](#apexsql-diff) | No | No | [SC] | [ApexSQL Diff] | 2017-10-26 | ApexSQL | | No | $399 | -| [ApexSQL Doc](#apexsql-doc) | No | No | [D] | [ApexSQL Doc] | 2017-09-06 | ApexSQL | | No | $299 | -| [ApexSQL Generate](#apexsql-generate) | No | No | [G] | [ApexSQL Generate] | 2017-07-13 | ApexSQL | | No | $499 | -| [ApexSQL Script](#apexsql-script) | No | No | [?] | [ApexSQL Script] | 2016-05-10 | ApexSQL | | No | $249 | -| [ApexSQL Trigger](#apexsql-trigger) | No | No | [?] | [ApexSQL Trigger] | 2017-06-01 | ApexSQL | | No | $1999 | -| [ApexSQL Trigger Veiwer](#apexsql-trigger-viewer) | No | No | [?] | [ApexSQL Trigger Viewer] | 2017-06-01 | ApexSQL | | Yes | No | -| [ApexSQL Snapshot Utility](#apexsql-snapshot-utility) | No | No | [?] | [ApexSQL Snapshot Utility] | 2016-01-12 | ApexSQL | | Yes | No | -| [ApexSQL Model](#apexsql-model) | No | No | [DA] | [ApexSQL Model] | 2019-05-22 | ApexSQL | | Yes | No | -| [ApexSQL Analyze](#apexsql-analyze) | No | No | [?] | [ApexSQL Analyze] | 2017-12-13 | ApexSQL | | No | $299 | -| [ApexSQL BI Monitor](#apexsql-bi-monitor) | No | No | [BI],[M] | [ApexSQL BI Monitor] | 2018-05-18 | ApexSQL | | No | $499 | -| [ApexSQL VM Monitor](#apexsql-vm-monitor) | No | No | [M] | [ApexSQL VM Monitor] | 2018-05-09 | ApexSQL | | No | $999 | -| [ApexSQL Job](#apexsql-job) | No | No | [J] | [ApexSQL Job] | 2018-03-29 | ApexSQL | | No | $499 | -| [ApexSQL Enforce](#apexsqlL-enforce) | No | No | [?] | [ApexSQL Enforce] | 2018-07-19 | ApexSQL | | No | $299 | -| [ApexSQL CI/CD toolkit](#apexsql-ci-cd) | No | No | [?] | [ApexSQL CI/CD toolkit] | 2020-05-21 | ApexSQL | | Yes | No | -| [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | -| [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | -| [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | -| [ApexSQL Search](#apexsql-search) | No | No | [S] | [ApexSQL Search] | 2020-07-30 | ApexSQL | | Yes | No | -| [ApexSQL Source Control](#apexsql-source-control) | No | No | [?] | [ApexSQL Source Control] | 2020-01-20 | ApexSQL | | No | $299 | -| [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | -| [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | -| [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | -| [SqlDiffFramework](#sqldiffframework) | No | No | [SC] | [SqlDiffFramework] | 2012-04-17 | Michael Sorens | | Yes | No | -| [DataGrip](#datagrip) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [DataGrip] | 2017-02-21 | Jet Brains | | No | $89 | -| [Pssdiag and Sqldiag Manager](#pssdiag-and-sqldiag-manager) | No | No | [?] | [Pssdiag and Sqldiag Manager] | 2017-01-06 | Jack Li | | Yes | No | -| [SQL Nexus Tool](#sql-nexus-tool) | No | No | [?] | [SQL Nexus Tool] | 2016-11-20 | Jack Li | | Yes | No | -| [DBSophic Qure Profiler](#dbsophic-qure-profiler) | No | No | [?] | [DBSophic Qure Profiler] | ? | DBSophic | | No | $300 | -| [DBSophic Qure Optimizer](#dbsophic-qure-optimizer) | No | No | [?] | [DBSophic Qure Optimizer] | ? | DBSophic | | No | ? | -| [RestoreChecker](#restorechecker) | No | No | [?] | [RestoreChecker] | 2015-01-15 | SQLServerUtilities | | No | $99 | -| [SQLScripter](#sqlscripter) | No | No | [?] | [SQLScripter] | 2009-08-24 | SQLServerUtilities | | No | $99 | -| [SQLC](#sqlc) | No | No | [DC],[SC]| [SQLC] | 2017-11-19 | David Ingleton | | Yes | No | -| [Database Performance Analyzer](#dpa-solarwinds) | Oracle, MySQL, Other | Linux | [M] | [Database Performance Analyzer] | ? | SolarWinds | | No | $1995 | -| [Database Performance Analyzer for MSSQL](#dpa-solarwinds-mssql) | No | No | [M] | [Database Performance Analyzer for MSSQL] | ? | SolarWinds | | No | $1995 | -| [SQL Enlight](#sql-enlight) | No | No | [MS] | [SQL Enlight] | 2016-04-25 | UbitSoft | | No | $295 | -| [Aireforge Studio](#aireforge-studio) | No | No | [MG],[SC]| [Aireforge Studio] | 2019-08-08 | AireForge | | Yes | $299 | -| [HexaTier](#hexatier) | No | No | [?] | [HexaTier] | ? | HexaTier | | No | ? | -| [SoftTree SQL Assistant](#softtree-sql-assistant) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [SoftTree SQL Assistant] | 2017-12-17 | SoftTree | | No | $215 | -| [DB Audit and Security 360](#db-audit-and-security-360) | Oracle,MySQL,Other | No | [SEC] | [DB Audit and Security 360] | 2015-02-07 | SoftTree | | No | $499 | -| [EMS SQL Management Studio](#ems-management-studio) | No | No | [MS] | [EMS SQL Management Studio] | 2016-05-26 | EMS | | No | $257 | -| [EMS SQL Backup](#ems-sql-backup) | No | No | [B] | [EMS SQL Backup] | 2016-04-13 | EMS | | Yes | $82 | -| [EMS SQL Administrator](#ems-sql-administrator) | No | No | [?] | [EMS SQL Administrator] | 2015-04-14 | EMS | | Yes | $135 | -| [EMS SQL Manager](#ems-sql-manager) | No | No | [?] | [EMS SQL Manager] | 2016-05-26 | EMS | | Yes | $135 | -| [EMS Data Export](#ems-data-export) | No | No | [?] | [EMS Data Export] | 2016-04-29 | EMS | | No | $47 | -| [EMS Data Import](#ems-data-import) | No | No | [?] | [EMS Data Import] | 2016-04-14 | EMS | | No | $47 | -| [EMS Data Pump](#ems-data-pump) | No | No | [?] | [EMS Data Pump] | 2016-11-03 | EMS | | No | $47 | -| [EMS Data Generator](#ems-generator) | No | No | [G] | [EMS Data Generator] | 2010-07-10 | EMS | | No | $47 | -| [EMS DB Comparer](#ems-bd-comparer) | No | No | [SC] | [EMS DB Comparer] | 2015-07-24 | EMS | | No | $47 | -| [EMS DB Extract](#ems-bd-extract) | No | No | [?] | [EMS DB Extract] | 2008-10-16 | EMS | | No | $47 | -| [EMS SQL Query](#ems-sql-query) | No | No | [?] | [EMS SQL Query] | 2012-03-29 | EMS | | No | $47 | -| [EMS Data Comparer](#ems-data-comparer) | No | No | [DC] | [EMS Data Comparer] | 2012-11-16 | EMS | | No | $47 | -| [NitroAccelerator](#nitroaccelerator) | No | No | [?] | [NitroAccelerator] | 2016-07-10 | Nitrosphere | | No | $1265 | -| [ERwin Data Modeler](#erwin-data-modeler) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERwin Data Modeler] | 2016-06-03 | ERwin | | No | $810 | -| [Toad Data Point](#toad-data-point) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Toad Data Point] | 2016-06-16 | Quest Software | | No | ? | -| [SQL Power Architect](#sql-power-architect) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [SQL Power Architect] | 2016-02-11 | SQLPower | | Yes | $995 | -| [DbWrench](#dbwrench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbWrench] | 2019-09-17 | Nizana Systems | | No | $99 | -| [Navicat Data Modeler](#navicat-data-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Navicat Data Modeler] | 2016-08-01 | PremiumSoft | | No | $199 | -| [DeZign for Databases](#dezign-for-databases) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [DeZign for Databases] | 2019-04-01 | Datanamic | | No | €29/mo| -| [ERDesigner NG](#erdesigner-ng) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [ERDesigner NG] | 2013-04-10 | Mirko Sertic | | Open Source | No | -| [Vertabelo](#vertabelo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Vertabelo] | ? | Vertabelo | | No | $948 | -| [dbDiffo](#dbdiffo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [dbDiffo] | ? | Contenet Ltd | | Yes | No | -| [SQL DXP](#sql-dxp) | Oracle,MySQL | No | [DC],[SC]| [SQL DXP] | 2016-06-20 | SQL Delta | | No | $530 | -| [Aqua Data Studio](#aqua-data-studio) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Aqua Data Studio] | 2016-07-06 | AquaFold | | No | $499 | -| [RazorSQL](#razorsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [RazorSQL] | 2019-09-26 | Richardson Software | | No | $100 | -| [SQL Pretty Printer](#sql-pretty-printer) | No | No | [?] | [SQL Pretty Printer] | 2016-02-19 | Gudu Software | | No | $50 | -| [Database .NET](#database-net) | Oracle,MySQL,PostgreSQL,Other | No | [MS],[SC]| [Database .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $69 | -| [dbMigration .NET](#dbmegration-net) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [dbMigration .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $49 | -| [Is It SQL](#is-it-sql) | No | No | [M] | [Is It SQL] | 2017-04-06 | Bill Graziano | | Non-commercial | No | -| [Database Experimentation Assistant](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2020-03-20 | Microsoft | | Yes | No | -| [Data Platform Studio](#dps) | No | No | [MG] | [Data Platform Studio] | ? | Red Gate Software | | Yes | ? | -| [Flyway](#flyway) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Flyway] | 2018-01-30 | boxfuse | [Apache] | Open Source | $950 | -| [Liquibase](#liquibase) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Liquibase] | 2018-04-11 | Liquibase | [Apache] | Open Source | No | -| [My Batis](#my-batis) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [My Batis] | 2018-03-20 | My Batis | [Apache] | Open Source | No | -| [SentryOne Plan Explorer](#sentryone-plan-explorer) | No | No | [?] | [SentryOne Plan Explorer] | 2017-05-25 | SentryOne | | Yes | No | -| [SQL Sentry](#sql-sentry) | No | No | [M] | [SQL Sentry] | 2016-12-07 | SentryOne | | No | ? | -| [DBmaestro TeamWork](#dbmaestro-teamwork) | Oracle | No | [?] | [DBmaestro TeamWork] | ? | DBmaestro | | No | ? | -| [xSQL Schema Compare](#xsql-schema-compare) | No | No | [SC] | [xSQL Schema Compare] | 2017-03-01 | xSQL Software | Shareware | Yes | $399 | -| [xSQL Data Compare](#xsql-data-compare) | No | No | [DK] | [xSQL Data Compare] | 2017-06-26 | xSQL Software | Shareware | Yes | $399 | -| [xSQL Script Executor](#xsql-script-executor) | MySQL,DB2,SQL Server CE | No | [?] | [xSQL Script Executor] | 2015-02-25 | xSQL Software | Freeware | Yes | $249 | -| [xSQL Builder](#xsql-builder) | No | No | [?] | [xSQL Builder] | 2017-03-15 | xSQL Software | Shareware | No | $799 | -| [xSQL Documenter](#xsql-documenter) | Oracle,MySQL,SQLite,Other | No | [D] | [xSQL Documenter] | 2017-01-04 | xSQL Software | Shareware | No | $199 | -| [xSQL Profiler](#xsql-profiler) | No | No | [?] | [xSQL Profiler] | 2017-06-28 | xSQL Software | Shareware | Yes | $999 | -| [xSQL Schema Compare SDK](#xsql-schema-compare-sdk) | No | No | [SC] | [xSQL Schema Compare SDK] | 2017-10-25 | xSQL Software | Shareware | No | $1499 | -| [xSQL RSS Reporter](#xsql-rss-reporter) | No | No | [D] | [xSQL RSS Reporter] | 2014-11-25 | xSQL Software | Shareware | No | $169 | -| [xSQL Database Searcher](#xsql-database-sercher) | No | No | [S] | [xSQL Database Searcher] | 2017-05-09 | xSQL Software | Freeware | Yes | No | -| [Cloud-based DB Monitoring Platform](#cbmp) | No | Mobile | [M] | [Cloud-based DB Monitoring Platform] | ? | SQLTreeo | | No | €180 | -| [SchemaCrawler](#schema-crawler) | Oracle,MySQL,PostgreSQL,Other | Yes | [D],[SC] | [SchemaCrawler] | 2017-02-27 | Sualeh Fatehi | | Open Source | No | -| [SA MaaS Microsoft SQL Server](#sa-maas) | No | No | [M] | [SA MaaS Microsoft SQL Server] | ? | SENTINELAGENT | | No | ? | -| [SSIS Framework](#ssis-framework) | No | No | [ETL] | [SSIS Framework] | 2017-01-07 | Andy Leonard | | Yes | ? | -| [SSIS Catalog Browser](#ssis-browser) | No | No | [ETL] | [SSIS Catalog Browser] | 2019-04-23 | Andy Leonard | | Yes | No | -| [BimlExpress Metadata Framework](#bimlexpress) | No | No | [?] | [BimlExpress Metadata Framework] | 2017-01-06 | Andy Leonard | | Yes | No | -| [MS Kerberos Configuration Manager](#mkcm) | No | No | [?] | [MS Kerberos Configuration Manager] | 2017-01-31 | Microsoft | | Yes | No | -| [Spotlight](#spotlight) | No | No | [M] | [Spotlight] | ? | Quest Software | | Yes | ? | -| [DBConvert Studio](#dbconvert-studio) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [DBConvert Studio] | 2020-05-11 | Slotix | | No | $499 | -| [DbDefence](#dbdefence) | No | No | [?] | [DbDefence] | 2017-03-01 | ActiveCrypt Software | | Yes | $698 | -| [SQL Server Migration Assistant for MySQL](#ssma-mysql) | MySQL | No | [MG] | [SQL Server Migration Assistant for MySQL] | 2017-02-17 | Microsoft | | Yes | No | -| [sqlcmd for Mac and Linux](#sqlcmd) | No | Linux,Mac | [?] | [sqlcmd for Mac and Linux] | 2017-01-26 | Soheil Rashidi | | Open Source | No | -| [SQL Migrator](#sql-migrator) | No | No | [MG] | [SQL Migrator] | ? | Datamate Technology | | ? | ? | -| [MS FoxPro to MS SQL Migration and Sync](#foxpro-sqlserver) | No | No | [MG] | [MS FoxPro to MS SQL Migration and Sync] | 2019-04-25 | Slotix | | No | $149 | -| [MySQL to MS SQL Migration and Sync](#mysql-sqlserver) | No | No | [MG] | [MySQL to MS SQL Migration and Sync] | 2018-10-03 | Slotix | | No | $149 | -| [Oracle to MS SQL Migration and Sync](#oracle-sqlserver) | No | No | [MG] | [Oracle to MS SQL Migration and Sync] | 2020-02-12 | Slotix | | No | $149 | -| [PostgreSQL to MS SQL Migration and Sync](#postgresql-sqlserver) | No | No | [MG] | [PostgreSQL to MS SQL Migration and Sync] | 2019-10-24 | Slotix | | No | $149 | -| [MS Excel to MS SQL Migration](#msexcel-sqlserver) | No | No | [MG] | [MS Excel to MS SQL Migration] | 2018-02-23 | Slotix | | No | $149 | -| [SQLite to MS SQL Migration and Sync](#sqllite-sqlserver) | No | No | [MG] | [SQLite to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | -| [IBM DB2 to MS SQL Migration and Sync](#db2-sqlserver) | No | No | [MG] | [IBM DB2 to MS SQL Migration and Sync] | 2019-07-09 | Slotix | | No | $149 | -| [MS Access to MS SQL Migration and Sync](#access-sqlserver) | No | No | [MG] | [MS Access to MS SQL Migration and Sync] | 2020-01-15 | Slotix | | No | $149 | -| [Firebird to MS SQL Migration and Sync](#firebird-sqlserver) | No | No | [MG] | [Firebird to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | -| [SQLines SQL Converter](#sqllines-converter) | No | No | [MG] | [SQLines SQL Converter] | ? | Dmtolpeko | | Open Source | No | -| [SQLite & SQL Server Compact Toolbox](#sqlite-sqlserver-toolbox) | No | No | [?] | [SQLite & SQL Server Compact Toolbox] | ? | ErikEJ | | Open Source | No | -| [SqlPad](#sqlpad) | Postgres,MySQL,Crate,Vertica | No | [MS] | [SqlPad] | ? | Rickbergfalk | | Open Source | No | -| [Html-query-plan](#html-query-plan) | No | No | [?] | [Html-query-plan] | ? | JustinPealing | | Open Source | No | -| [SqlQueryStress](#sql-query-stress) | No | No | [?] | [SqlQueryStress] | ? | Adam Machanic | | Open Source | No | -| [SQL Server Migration Assistant for DB2](#ssma-db2) | DB2 | No | [MG] | [SQL Server Migration Assistant for DB2] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Oracle](#ssma-oracle) | Oracle | No | [MG] | [SQL Server Migration Assistant for Oracle] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for Access](#ssma-access) | Access | No | [MG] | [SQL Server Migration Assistant for Access] | 2017-02-17 | Microsoft | | Yes | No | -| [SQL Server Migration Assistant for SAP ASE](#ssma-sap) | SAP ASE | No | [MG] | [SQL Server Migration Assistant for SAP ASE]| 2020-06-29 | Microsoft | | Yes | No | -| [mssql for Visual Studio Code](#mssql-for-vs-code) | No | Linux,Mac | [MS] | [mssql for Visual Studio Code] | 2017-05-02 | Microsoft | | Open Source | No | -| [Microsoft Assessment and Planning](#map) | No | No | [?] | [Microsoft Assessment and Planning] | 2017-02-10 | Microsoft | | Yes | No | -| [mssql-scripter](#mssql-scripter) | No | Linux,Mac | [?] | [mssql-scripter] | ? | Microsoft | | Open Source | No | -| [DBFS](#dbfs) | No | Linux | [M] | [DBFS] | ? | Microsoft | | Open Source | No | -| [comparator](#pumpet-comparator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [comparator] | 2017-06-06 | Pumpet | [LGPL-3.0] | Open Source | No | -| [Navicat for SQL Server](#navicat-for-sql-server) | No | Mac | [MS] | [Navicat for SQL Server] | 2017-06-14 | PremiumSoft | | No | $699 | -| [Navicat Premium](#navicat-premium) | Oracle,MySQL,PostgreSQL,Other | Mac | [MS] | [Navicat Premium] | 2017-06-14 | PremiumSoft | | No | $1299 | -| [DbVisualizer](#dbvisualizer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS],[DA]| [DbVisualizer] | 2017-08-22 | DbVis Software AB. | | Yes | $197 | -| [DbSchema](#dbschema) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbSchema] | 2017-06-19 | Wise Coders Solutions | | Yes | $127 | -| [DBGhost](#dbghost) | No | No | [?] | [DBGhost] | 2017-01-31 | Innovartis Ltd | | No | £430 | -| [SQLAutomate](#sqlautomate) | Oracle,MySQL,Other | No | [?] | [SQLAutomate] | 2017-06-19 | OnLine ToolWorks     | | No | $99 | -| [BimlExpress](#bimlexpress) | No | No | [?] | [BimlExpress] | ? | Varigence   | | No | No | -| [BI Developer Extensions](#bi-developer-extensions) | No | No | [?] | [BI Developer Extensions] | 2019-04-29 | Microsoft   | | Open Source | No | -| [Azure Data Warehouse Migration Utility](#azure-migration) | No | No | [MG] | [Azure Data Warehouse Migration Utility] | ? | Microsoft | | ? | ? | -| [Benchmark Factory](#benchmark-factory) | Oracle,MySQL,Other | No | [T] | [Benchmark Factory] | ? | Quest Software | | No | $4413 | -| [manduka](#manduka) | Oracle | Linux,Mac | [?] | [manduka] | 2017-03-08 | Virtusa Corporation | | Yes | No | -| [PowerBI Desktop](#powerbi-desktop) | Oracle,MySQL,PostgreSQL,Other | No | [BI] | [PowerBI Desktop] | 2017-07-11 | Microsoft | | Yes | ? | -| [Stellar Phoenix SQL Database Repair](#stellar-phoenix) | No | No | [REC] | [Stellar Phoenix SQL Database Repair] | 2017-07-05 | Stellar Technology | | No | $349 | -| [DataNumen SQL Recovery](#datanumen-sql-recovery) | No | No | [REC] | [DataNumen SQL Recovery] | 2017-03-20 | DataNumen | | No | $500 | -| [Recovery Toolbox for SQL Server](#recovery-toolbox) | No | No | [REC] | [Recovery Toolbox for SQL Server] | ? | Recovery Toolbox | Shareware | No | $99 | -| [SQL MDF Viewer](#sql-mdf-viewer) | No | No | [?] | [SQL MDF Viewer] | ? | SysTools | Shareware | No | $129 | -| [SQL MDF Recovery Tool](#sql-mdf-recovery-tool) | No | No | [REC] | [SQL MDF Recovery Tool] | ? | SysTools | Shareware | No | $129 | -| [SQL Passord Recovery](#sql-password-recovery) | No | No | [REC] | [SQL Passord Recovery] | ? | SysTools | Shareware | No | $69 | -| [SQL Decryptor](#sql-decryptor) | No | No | [SEC] | [SQL Decryptor] | ? | SysTools | Shareware | No | $69 | -| [SQL Backup Database Recovery](#sql-backup-database-recovery) | No | No | [REC] | [SQL Backup Database Recovery] | ? | SysTools | Shareware | No | $149 | -| [SQL Log File Viewer](#sql-log-file-viewer) | No | No | [?] | [SQL Log File Viewer] | ? | SysTools | Shareware | No | $999 | -| [DAX Studio](#dax-studio) | No | No | [?] | [DAX Studio] | ? | Sqlbi | Freeware | Yes | No | -| [SQL Cop](#sql-cop) | No | No | [?] | [SQL Cop] | ? | LessThanDot | Freeware | Yes | No | -| [Dataedo](#dataedo) | Oracle,MySQL | No | [D] | [Dataedo] | 2017-09-15 | Logic Systems | Shareware | Yes | $239 | -| [Azure Database Migration Service](#azure-db-migration) | Oracle,MySQL, Other | Online | [MG] | [Azure Database Migration Service] | 2017-12-01 | Microsoft | | Yes | No | -| [FlowHeater](#flowheater) | Oracle,MySQL,PostgreSQL,Other | No | [ETL] | [FlowHeater] | 2017-10-02 | FlowHeater GmbH | Shareware | No | $79 | -| [EDIS](#edis) | No | No | [ETL] | [EDIS] | ? | SQL ETL | Shareware | Yes | $599 | -| [SchemaSpy](#schemaspy) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [D] | [SchemaSpy] | 2018-08-05 | Rafal Kasa | [MIT] | Open Source | No | -| [Adminer](#adminer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Adminer] | 2019-08-27 | Jakub Vrána | [Apache] | Open Source | No | -| [Full Convert](#full-convert) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Full Convert] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | -| [Replicator](#replicator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [Replicator] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | -| [JackDB](#jackdb) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [JackDB] | ? | JackDB | | No | $48 | -| [SQL Workbench](#sql-workbench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQL Workbench] | 2018-08-20 | Thomas Kellerer | | Yes | No | -| [Valentina Studio](#valentina-studio) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Valentina Studio] | 2018-09-24 | Paradigma Software | | Yes | $200 | -| [SQL Plus Dot Net](#sql-plus-dot-net) | No | No | [?] | [SQL Plus Dot Net] | ? | SQL+.NET | | No | ? | -| [SQLIndexManager](#sqlindexmanager) | No | No | [IDX] | [SQLIndexManager] | 2019-05-19 | Sergey Syrovatchenko | | Open Source | No | -| [JAMS Enterprise Job Scheduling](#jams-job) | No | No | [J] | [JAMS Enterprise Job Scheduling] | 2019-08-20 | HelpSystems | | No | ? | -| [Stitch Data Loader](#stitch) | Oracle,MySQL,PostgreSQL,Other | Online | [ETL] | [Stitch Data Loader] | 2019-09-20 | Talend | | No | ? | -| [Talend Data Integration](#talend-integration) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Integration] | 2019-06-20 | Talend | [Apache] | Yes | ? | -| [Talend Data Preparation](#talend-preparation) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Preparation] | 2018-06-05 | Talend | [Apache] | Yes | ? | -| [Pentaho Data Integration](#pentaho) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [ETL] | [Pentaho Data Integration] | 2019-06-20 | Hitachi Vantara | Shareware | No | ? | -| [Studio3T](#studio3t) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [Studio3T] | 2019-09-19 | Studio 3T | Shareware | No | $150 | -| [SQLGrease](#sqlgrease) | No | Online | [M] | [SQLGrease] | 2019-09-20 | SQLGrease | Shareware | No | $948 | -| [QuickDBD](#quickdbd) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [QuickDBD] | ? | Dovetail Technologies | | Yes | $95 | -| [DB Designer](#dbdesigner) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [DB Designer] | ? | DB Designer | | Yes | $180 | -| [ESF Database Migration Toolkit](#esf) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [ESF Database Migration Toolkit] | 2019-10-23 | DBSofts Inc | Shareware | No | $322 | -| [MS SQL Migration Toolkit](#msskit) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [MS SQL Migration Toolkit] | 2019-04-22 | Intelligent Converters | Shareware | No | $99 | -| [DatabasesSpy](#databasespy) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [DatabaseSpy] | 2019-10-09 | Altova | Shareware | No | €109 | -| [DiffDog](#diffdog) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [DiffDog] | 2019-10-09 | Altova | Shareware | No | €109 | -| [ERBuilder data modeler](#erbuilder) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERBuilder data modeler] | 2019-11-14 | Softbuilder | | Yes | $99 | -| [SQLDatabaseStudio](#sqldatabasestudio) | No | No | [MS] | [SQLDatabaseStudio] | 2017-05-10 | Jan Pivarcek | | Yes | $215 | -| [Enterprise Architect](#ea) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Enterprise Architect] | 2019-10-31 | Sparx Systems Pty Ltd | Shareware | No | $225 | -| [MogwaiERDesignerNG](#mogwai) | Oracle,MySQL,PostgreSQL | No | [DA] | [MogwaiERDesignerNG] | 2019-08-22 | Mirko Sertic | [LGPL-3.0] | Open Source | No | -| [Xcase](#xcase) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Xcase] | 2018-06-19 | Resolution Software | Shareware | No | $799 | -| [Oracle SQL Developer Data Modeler](#oracle-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Oracle SQL Developer Data Modeler] | 2019-08-01 | Oracle | Shareware | Yes | No | -| [Exportizer](#exportizer) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Exportizer] | 2019-11-17 | Vitaliy Levchenko | Shareware | No | $29 | -| [Reportizer](#reportizer) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Reportizer] | 2019-09-10 | Vitaliy Levchenko | Shareware | No | $39 | -| [Database Tour](#database-tour) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Database Tour] | 2019-11-20 | Vitaliy Levchenko | Shareware | No | $49 | -| [Ispirer MnMATK](#mnmatk) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Ispirer MnMATK] | ? | Ispirer Systems | Shareware | No | ? | -| [SQL Database Recovery](#sql-database-recovery) | No | No | [REC] | [SQL Database Recovery] | 2019-09-10 | KernelApps Private | Shareware | No | $399 | -| [SysTools SQL Log Analyzer](#log-analzyer) | No | No | [M][REC] | [SysTools SQL Log Analyzer] | 2019-01-01 | SysTools | Shareware | No | $999 | -| [SysTools SQL Server Recovery Manager](#systools-rec-manager) | No | No | [REC] | [SysTools SQL Log Analyzer] | 2017-01-01 | SysTools | Shareware | No | $1499 | -| [SysTools SQL Recovery](#systools-recovery) | No | No | [REC] | [SysTools SQL Recovery] | 2019-01-01 | SysTools | Shareware | No | $249 | -| [SQL Backup Recovery](#systools-backup-recovery) | No | No | [REC] | [SQL Backup Recovery] | 2018-01-01 | SysTools | Shareware | No | $149 | -| [SysTools SQL Password Recovery](#systools-password-recovery) | No | No | [REC] | [SysTools SQL Password Recovery] | 2018-01-01 | SysTools | Shareware | No | $69 | -| [SysTools SQL Decryptor](#systools-sql-decryptor) | No | No | [SEC] | [SysTools SQL Decryptor] | 2019-01-01 | SysTools | Shareware | No | $69 | -| [SysTools SQL Server Database Migrator](#systools-migrator) | No | No | [MG] | [SysTools SQL Server Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $249 | -| [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | -| [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | -| [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | -| [Veeam Explorer for Microsoft SQL Server](#veeam-explorer) | ? | ? | [B] | [Veeam Explorer for Microsoft SQL Server] | ? | Veeam | Shareware | No | ? | -| [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | -| [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | -| [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | -| [DbViewSharp](#dbviewsharp) | No | No | [MS] | [DbViewSharp] | 2014-08-08 | David Moore | [MIT] | Yes | No | -| [DTSQL](#dtsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [DTSQL] | 2017-08-18 | DigerTech Inc | Shareware | Yes | $69 | -| [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | -| [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | -| [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | -| [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | -| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell | | Yes | No | -| [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | -| [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | -| [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | -| [SQLDBSize](#sqldbsize) | No | No | [?] | [SQLDBSize] | ? | Mohamed Bouarroudj | | Yes | No | -| [SQLines Data](#sqlines-data) | Oracle,MySQL,PostgreSQL,Other | Linux |[MG],[ETL]| [SQLines Data] | 2019-05-29 | SQLines | | Open Source | No | -| [SqlDbAid](#sqldbaid) | No | No | [?] | [SqlDbAid] | 2018-02-10 | Miken | | Yes | No | -| [sqlectron](#sqlectron) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [sqlectron] | 2018-09-06 | sqlectron | | Open Source | No | -| [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | -| [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | -| [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | -| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions | | Yes | No | -| [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | -| [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | -| [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | -| [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | -| [POPSQL](#popsql) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [POPSQL] | 2020-08-01 | PopSQL | | Yes | $10 | -| [Azure Blob Studio 2011](#azure-blob-studio-2011) | No | No | [?] | [Azure Blob Studio 2011] | 2010-12-25 | Alessandro Del Sole | | Yes | No | -| [Azure Explorer](#azure-explorer) | No | No | [?] | [Azure Explorer] | ? | Monza Cloud | | Yes | No | -| [Azure SQL Agent](#azure-sql-agent) | No | No | [?] | [Azure SQL Agent] | ? | ? | [MIT] | Open Source | No | -| [Azure SQL Database DTU Calculator](#azure-sql-dtu-calculator) | No | No | [?] | [Azure SQL Database DTU Calculator] | ? | Justin Henriksen | [MIT] | Open Source | No | -| [Azure SQL Database Stress Test Tool](#azure-sql-stress-test) | No | No | [T] | [Azure SQL Database Stress Test Tool] | ? | Kiyoaki Tsurutani | [MIT] | Open Source | No | -| [Azure SQL Dev Cloner](#azure-sql-dev-cloner) | No | No | [?] | [Azure SQL Dev Cloner] | ? | ? | [MIT] | Open Source | No | -| [Azure User Management Console](#azure-user-management-console) | No | No | [?] | [Azure User Management Console] | ? | ? | [Apache] | Open Source | No | -| [CloudMonix SQL Azure Database Management](#cloudmonix-azure-man)| No | No | [?] | [CloudMonix SQL Azure Database Management] | ? | CloudMonix | | No | $15 | -| [DB Ghost Change Manager Professional](#db-ghost-change-manager) | No | No | [?] | [DB Ghost Change Manager Professional] | ? | Innovartis Ltd | | No | £430 | -| [MSSQL-Maestro](#mssql-maestro) | No | No | [MS] | [MSSQL-Maestro] | 2017-06-29 | SQL Maestro Group | | No | $229 | -| [MSSQLMerge](#mssqlmerge) | No | No | [?] | [MSSQLMerge] | ? | Konstantin Semenenkov | | Yes | $50 | -| [SQL Backup and FTP](#sql-backup-and-ftp) | MySQL,PostgreSQL | Linux | [B] | [SQL Backup and FTP] | ? | Pranas.NET | | Yes | $129 | -| [SQL Bak](#sql-bak) | MySQL,PostgreSQL | Linux | [B] | [SQL Bak] | ? | Pranas.NET | | Yes | $9 | -| [SQL Bulk Tools](#sql-bulk-tools) | No | No | [?] | [SQL Bulk Tools] | ? | Greg Taylor | [MIT] | Open Source | No | -| [SQL Data Examiner](#sql-data-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Data Examiner] | ? | Intelligent Database Solutions | | No | $400 | -| [SQL Examiner](#sql-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Examiner] | ? | Intelligent Database Solutions | | No | $400 | -| [SQL Database Backup](#sql-database-backup) | No | No | [B] | [SQL Database Backup] | ? | Richard Astbury | [MIT] | Open Source | No | -| [SQL Database Copy](#sql-database-copy) | No | No | [MG] | [SQL Database Copy] | 2017-07-25 | ryanovic | [MIT] | Open Source | No | -| [SQL Delta Duo for SQL Server](#sql-delta-duo-for-sql-server) | No | No | [?] | [SQL Delta Duo for SQL Server] | ? | The Australian Software Company | | No | $370 | -| [SQL Trace Replay](#sql-trace-replay) | No | No | [?] | [SQL Trace Replay] | ? | Mikhail Shilkov | [MIT] | Open Source | No | -| [SQL Workload Profiler](#sql-workload-profiler) | No | No | [?] | [SQL Workload Profiler] | 2014-10-01 | Chris Bailiss | | Yes | No | -| [SQLDBdiff](#sqldbdiff) | No | Linux | [?] | [SQLDBdiff] | ? | SQLDBtools | | Yes | $60 | -| [SQL Backup Master](#sql-backup-master) | No | No | [B] | [SQL Backup Master] | ? | Key Metric Software | | Yes | $49 | -| [Handy Backup Server](#handy-backup-server) | Oracle,MySQL,PostgreSQL,Other | Linux | [B] | [Handy Backup Server] | 2019-03-11 | Novosoft | | No | $39 | -| [EaseUS Todo Backup Server](#easeus-todo-backup-server) | No | No | [B] | [EaseUS Todo Backup Server] | ? | EaseUS | | No | $39 | -| [SqlBackupFree](#sqlbackupfree) | No | No | [B] | [SqlBackupFree] | ? | pranas.net | | Yes | No | -| [ERDPlus](#erdplus) | No | No | [?] | [ERDPlus] | 2020-05-24 | ERDPlus | | ? | ? | -| [SentryOne Test](#sentryone-test) | No | No | [T] | [SentryOne Test] | ? | SQL Sentry | | No | $828 | -| [Code Quality and Security for T-SQL](#sonarsource) | No | No | [?] | [Code Quality and Security for T-SQL] | ? | SonarSource | | No | €120 | -| [DBBALANCE](#dbbalance) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [DBBALANCE] | ? | DBBalance | | No | ? | -| [Convert SQL to Excel](#convert-sql-to-excel) | No | No | [?] | [Convert SQL to Excel] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [Search string in Schema](#search-string-in-schema) | No | No | [S] | [Search string in Schema] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [Search string in SQL](#search-string-in-sql) | No | No | [S] | [Search string in SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [SQL Table Scripter](#sql-table-scripter) | No | No | [?] | [SQL Table Scripter] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [SQLCLR Util](#sqlclr-util) | No | No | [?] | [SQLCLR Util] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [Image To SQL](#image-to-sql) | No | No | [?] | [Image To SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | -| [dbdiagram](#dbdiagram) | No | No | [?] | [dbdiagram] | ? | holistics.io | | Yes | $9/mo | +| Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | +|------------------------------------------------------------------|-------------------------------|-----------|----------|----------------------------------------------------|------------|-------------------------|------------|----------------|------:| +| [SSMS](#ssms) | No | No | [MS] | [SSMS] | 2020-10-27 | Microsoft | Freeware | Yes | No | +| [Azure Data Studio](#ads) | PostgreSQL | Linux,Mac | [MS] | [Azure Data Studio] | 2020-11-12 | Microsoft | [MIT] | Open Source | No | +| [bcp Utility](#bcp) | No | No | [I] | [bcp Utility] | 2012-02-11 | Microsoft | | Yes | No | +| [sqlcmd Utility](#sqlcmd-utility) | No | No | [I] | [sqlcmd Utility] | 2016-08-23 | Microsoft | | Yes | No | +| [mssql-cli](#mssql-cli) | No | Linux,Mac | [?] | [mssql-cli] | 2020-05-01 | Microsoft | [BSD-3] | Open Source | No | +| [RML Utilities for SQL Server](#rml) | No | No | [T] | [RML Utilities for SQL Server] | 2014-12-12 | Microsoft | | Yes | No | +| [GraphView](#graphview) | No | No | [?] | [GraphView] | 2016-02-23 | Microsoft | | Yes | No | +| [Baseline Security Analyze](#baseline-security-analyze) | No | No | [SEC] | [Baseline Security Analyze] | 2015-01-09 | Microsoft | | Yes | No | +| [tablediff Utility](#tablediff-utility) | No | No | [I] | [tablediff Utility] | - | Microsoft | | Yes | No | +| [Microsoft Log Parser](#microsoft-log-parser) | No | No | [?] | [Microsoft Log Parser] | - | Microsoft | | Yes | No | +| [Log Parser Lizard GUI](#log-parser-lizard-gui) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Log Parser Lizard GUI] | 2017-06-01 | Lizard Labs | | Yes | $59 | +| [Diskspd](#diskspd) | No | No | [T] | [Diskspd] | 2015-12-14 | Microsoft | | Yes | No | +| [HammerDB](#hammerdb) | No | No | [T] | [HammerDB] | 2015-05-04 | Open Source | | Yes | No | +| [Exchange Server Error Code Look-up](#error-code-look-up) | No | No | [?] | [Exchange Server Error Code Look-up] | 2004-05-10 | Microsoft | | Yes | No | +| [LINQPad](#linqpad) | No | No | [?] | [LINQPad] | 2016-01-02 | Joseph Albahari | | Non-commercial | $45 | +| [SqlDynamite](#sqldynamite) | No | No | [S] | [SqlDynamite] | 2016-04-06 | Anatoly Sova | | Yes | No | +| [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | +| [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | +| [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | +| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | +| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | +| [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | +| [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | +| [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Sybase](#sybasetosql) | No | No | [MG] | [Migration Assistant for Sybase] | 2017-02-17 | Microsoft | | Yes | No | +| [dta Utility](#dta-utility) | No | No | [I] | [dta Utility] | - | Microsoft | | Yes | No | +| [osql Utility](#osql-utility) | No | No | [I] | [osql Utility] | - | Microsoft | | Yes | No | +| [sqldiag Utility](#sqldiag-utility) | No | No | [I] | [sqldiag Utility] | - | Microsoft | | Yes | No | +| [sqldumper Utility](#sqldumper-utility) | No | No | [I] | [sqldumper Utility] | - | Microsoft | | Yes | No | +| [SqlLocalDB Utility](#sqllocaldb-utility) | No | No | [I] | [SqlLocalDB Utility] | - | Microsoft | | Yes | No | +| [sqllogship Utility](#sqllogship-utility) | No | No | [I] | [sqllogship Utility] | - | Microsoft | | Yes | No | +| [sqlservr Application](#sqlservr-application) | No | No | [I] | [sqlservr Application] | - | Microsoft | | Yes | No | +| [sqlps Utility](#sqlps-utility) | No | No | [I] | [sqlps Utility] | - | Microsoft | | Yes | No | +| [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | +| [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | +| [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | +| [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | +| [SQL Server 2005 Best Practices Analyzer](#bpa-2005) | No | No | [?] | [BPA 2005] | 2008-08-13 | Microsoft | | Yes | No | +| [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | +| [SQL Server 2008 R2 Best Practices Analyzer](#bpa-2008) | No | No | [?] | [BPA 2008] | 2010-06-18 | Microsoft | | Yes | No | +| [SQL Server 2012 Best Practices Analyzer](#bpa-2012) | No | No | [?] | [BPA 2012] | 2012-06-04 | Microsoft | | Yes | No | +| [Elastic database tools](#elastic-database-tools) | No | No | [?] | [Elastic database tools] | ? | Microsoft | | Yes | No | +| [Microsoft Sync Framework](#microsoft-sync-framework) | No | No | [?] | [Microsoft Sync Framework] | 2020-04-22 | Microsoft | | Yes | No | +| [Query Performance Insight for Azure SQL Database](#query-perf) | No | No | [?] | [Query Performance Insight for Azure SQL Database] | ? | Microsoft | | Yes | No | +| [Microsoft Assessment and Planning (MAP) Toolkit](#map) | No | No | [MG] | [Microsoft Assessment and Planning (MAP) Toolkit] | 2020-05-26 | Microsoft | | Yes | No | +| [DLM Dashboard](#dlm-dashboard) | No | No | [M] | [DLM Dashboard] | 2016-04-27 | Red Gate | | Yes | No | +| [Red Gate SQL Compare](#red-gate-sql-compare) | No | No | [DC] | [Red Gate SQL Compare] | 2016-10-31 | Red Gate | | No | $495 | +| [Red Gate SQL Data Compare](#red-gate-sql-data-compare) | No | No | [SC] | [Red Gate SQL Data Compare] | 2016-05-09 | Red Gate | | No | $495 | +| [Red Gate SQL Monitor](#red-gate-sql-monitor) | No | No | [M] | [Red Gate SQL Monitor] | 2015-10-15 | Red Gate | | No | $1495 | +| [Red Gate SQL Backup Pro](#red-gate-sql-backup-pro) | No | No | [B] | [Red Gate SQL Backup Pro] | 2014-07-08 | Red Gate | | No | $995 | +| [Red Gate SQL Doc](#red-gate-sql-doc) | No | No | [D] | [Red Gate SQL Doc] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Data Generator](#red-gate-sql-data-generator) | No | No | [G] | [Red Gate SQL Data Generator] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Dependency Tracker](#sql-dependency-tracker) | No | No | [?] | [Red Gate SQL Dependency Tracker] | 2016-04-26 | Red Gate | | No | $369 | +| [Red Gate SQL Multi Script](#red-gate-sql-multi-script) | No | No | [?] | [Red Gate SQL Multi Script] | 2016-04-15 | Red Gate | | No | $245 | +| [Red Gate SQL Index Manager](#red-gate-sql-index-manager) | No | No | [IDX] | [Red Gate SQL Index Manager] | ? | Red Gate | | No | $149 | +| [Red Gate SQL Comparison SDK](#red-gate-sql-comparison-sdk) | No | No | [DC],[SC]| [Red Gate SQL Comparison SDK] | 2016-02-22 | Red Gate | | No | $895 | +| [Red Gate SQL Clone](#red-gate-sql-clone) | No | No | [?] | [Red Gate SQL Clone] | 2017-02-27 | Red Gate | | No | $6955 | +| [Red Gate SQL Provision](#red-gate-sql-provision) | No | No | [?] | [Red Gate SQL Provision] | 2018-02-26 | Red Gate | | No | $2955 | +| [Red Gate Data Masker](#red-gate-data-masker) | Oracle | No | [?] | [Red Gate SQL Data Masker] | 2018-02-26 | Red Gate | | No | $2395 | +| [DLM Automation](#dlm-automation) | No | No | [?] | [DLM Automation] | ? | Red Gate | | No | ? | +| [ReadyRoll](#readyroll) | No | No | [?] | [ReadyRoll] | 2016-01-03 | Red Gate | | No | $345 | +| [Rapid Database Extractor](#rapid-database-extractor) | Oracle | No | [?] | [Rapid Database Extractor] | 2016-11-03 | Idera | | Yes | No | +| [SQL XEvent Profiler](#sql-xevent-profiler) | No | No | [?] | [SQL XEvent Profiler] | 2014-03-14 | Idera | | Yes | No | +| [SQL Check](#sql-check) | No | No | [?] | [SQL Check] | 2015-09-24 | Idera | | Yes | No | +| [SQL Fragmentation Analyzer](#sql-fragmentation-analyzer) | No | No | [?] | [SQL Fragmentation Analyzer] | 2012-11-16 | Idera | | Yes | No | +| [SQL Heat Map](#sql-heat-map) | No | No | [?] | [SQL Heat Map] | 2016-01-27 | Idera | | Yes | No | +| [SQL Hekaton Memory Check](#sql-hekaton-memory-check) | No | No | [?] | [SQL Hekaton Memory Check] | 2015-06-10 | Idera | | Yes | No | +| [SQL Page Viewer](#sql-page-viewer) | No | No | [?] | [SQL Page Viewer] | 2014-08-25 | Idera | | Yes | No | +| [SQL Update Statistics](#sql-update-statistics) | No | No | [ST] | [SQL Update Statistics] | 2015-12-14 | Idera | | Yes | No | +| [SQL Statistics Aggregator](#sql-statistics-aggregator) | No | No | [ST] | [SQL Statistics Aggregator] | 2015-05-18 | Idera | | Yes | No | +| [SQL Backup Status Reporter](#sql-backup-status-reporter) | No | No | [B] | [SQL Backup Status Reporter] | 2015-08-07 | Idera | | Yes | No | +| [SQL Integrity Check](#sql-integrity-check) | No | No | [?] | [SQL Integrity Check] | 2013-08-26 | Idera | | Yes | No | +| [SQL Job Manager](#sql-job-manager) | No | No | [J] | [SQL Job Manager] | 2012-03-19 | Idera | | Yes | No | +| [Azure SQL Database Backup](#azure-sql-database-backup) | No | No | [B] | [Azure SQL Database Backup] | 2012-10-02 | Idera | | Yes | No | +| [SQL Column Search](#sql-column-search) | No | No | [S] | [SQL Column Search] | 2015-11-17 | Idera | | Yes | No | +| [SQL Permissions Extractor](#sql-permissions-extractor) | No | No | [?] | [SQL Permissions Extractor] | 2015-08-07 | Idera | | Yes | No | +| [SQL BI Check](#sql-bi-check) | No | No | [BI] | [SQL BI Check] | 2016-04-13 | Idera | | Yes | No | +| [SQL Inventory Check](#sql-inventory-check) | No | No | [?] | [SQL Inventory Check] | 2016-03-24 | Idera | | Yes | No | +| [SQL Diagnostic Manager](#sql-diagnostic-manager) | No | No | [?] | [SQL Diagnostic Manager] | ? | Idera | | No | $1747 | +| [SQL Safe Backup](#sql-safe-backup) | No | No | [B] | [SQL Safe Backup] | 2016-09-08 | Idera | | No | $907 | +| [SQL Compliance Manager](#sql-compliance-manager) | No | No | [?] | [SQL Compliance Manager] | 2015-09-08 | Idera | | No | $2657 | +| [SQL Inventory Manager](#sql-inventory-manager) | No | No | [?] | [SQL Inventory Manager] | 2016-04-22 | Idera | | No | $3195 | +| [SQL Virtual Database](#sql-virtual-database) | No | No | [?] | [SQL Virtual Database] | 2016-03-24 | Idera | | No | $625 | +| [SQL Secure](#sql-secure) | No | No | [?] | [SQL Secure] | 2016-04-19 | Idera | | No | $907 | +| [SQL Doctor](#sql-doctor) | No | No | [?] | [SQL Doctor] | 2015-12-17 | Idera | | No | $625 | +| [SQL Admin Toolset](#sql-admin-toolset) | No | No | [?] | [SQL Admin Toolset] | 2016-01-13 | Idera | | No | $395 | +| [SQL Defrag Manager](#sql-defrag-manager) | No | No | [?] | [SQL Defrag Manager] | 2016-03-10 | Idera | | No | $1495 | +| [DBArtisan](#dbartisan) | No | No | [?] | [DBArtisan] | ? | Idera | | No | $3122 | +| [SQL BI Manager](#sql-bi-manager) | No | No | [BI] | [SQL BI Manager] | 2015-09-08 | Idera | | No | $697 | +| [SQL Enterprise Job Manager](#sql-enterprise-job-manager) | No | No | [J] | [SQL Enterprise Job Manager] | 2015-09-08 | Idera | | No | $697 | +| [DB Optimizer](#db-optimizer) | No | No | [?] | [DB Optimizer] | ? | Idera | | No | $1420 | +| [SQL Query Store Optimizer](#sql-query-store-optimizer) | No | No | [?] | [SQL Query Store Optimizer] | 2016-07-01 | Idera | | Yes | No | +| [Rapid SQL](#rapid-sql) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Rapid SQL] | ? | Idera | | No | $710 | +| [SQL Comparison Toolset](#sql-comparison-toolset) | No | No | [DC],[SC]| [SQL Comparison Toolset] | ? | Idera | | No | $745 | +| [ER/Studio Data Architect](#erstudio-data-architect) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ER/Studio Data Architect] | | Idera | | No | $1287 | +| [DB Change Manager](#db-change-manager) | Oracle,MySQL,PostgreSQL,Other | No | [SC] | [DB Change Manager] | ? | Idera | | No | $1420 | +| [Uptime Infrastructure Monitor](#uim) | No | Linux | [?] | [Uptime Infrastructure Monitor] | ? | Idera | | No | ? | +| [Powershell Scripts](#powershell-scripts) | No | No | [?] | [Powershell Scripts] | ? | Idera | | No | ? | +| [SQL Data Profiler](#sql-data-profiler) | No | No | [?] | [SQL Data Profiler] | ? | Idera | | No | ? | +| [SQL Instance Check](#sql-instance-check) | No | No | [M] | [SQL Instance Check] | ? | Idera | | Yes | ? | +| [dbForge Schema Compare](#dbforge-schema-compare) | No | No | [SC] | [dbForge Schema Compare] | 2019-10-10 | Devart | Shareware | No | $150 | +| [dbForge Data Compare](#dbforge-data-compare) | No | No | [DC] | [dbForge Data Compare] | 2019-10-10 | Devart | Shareware | No | $150 | +| [dbForge Data Generator](#dbforge-data-generator) | No | No | [G] | [dbForge Data Generator] | 2019-10-10 | Devart | Shareware | No | $250 | +| [dbForge Query Builder](#dbforge-query-builder) | No | No | [?] | [dbForge Query Builder] | 2019-10-10 | Devart | Shareware | No | $100 | +| [dbForge Event Profiler](#dbforge-event-profiler) | No | No | [M] | [dbForge Event Profiler] | 2019-10-10 | Devart | Freeware | Yes | No | +| [dbForge SQL Decryptor](#dbforge-sql-decryptor) | No | No | [SEC] | [dbForge SQL Decryptor] | 2017-09-19 | Devart | Freeware | Yes | No | +| [dbForge Studio](#dbforge-studio) | No | No | [MS] | [dbForge Studio] | 2019-10-10 | Devart | Shareware | Yes | $250 | +| [dbForge Fusion](#dbforge-fusion) | No | No | [?] | [dbForge Fusion] | 2019-11-08 | Devart | Shareware | No | $150 | +| [dbForge Documenter](#dbforge-documenter) | No | No | [D] | [dbForge Documenter] | 2020-04-23 | Devart | Shareware | No | $150 | +| [dbForge SSIS Data Flow Components](#dbforge-ssis) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [dbForge SSIS Data Flow Components] | 2020-03-31 | Devart | Shareware | No | $500 | +| [dbForge DevOps Automation for SQL Server](#dbforge-devops) | No | No | [?] | [dbForge DevOps Automation for SQL Server] | 2020-01-27 | Devart | Shareware | No | $900 | +| [dbForge Complete](#dbforge-complete) | No | No | [?] | [dbForge Complete] | 2020-09-01 | Devart | Shareware | No | $199 | +| [dbForge SQL Azure Backup](#dbforge-sql-azure-backup) | No | No | [B] | [dbForge SQL Azure Backup] | 2013-04-18 | Devart | Freeware | Yes | No | +| [Devart Transaction Log](#devart-transaction-log) | No | No | [B] | [Devart Transaction Log] | 2020-10-19 | Devart | Freeware | No | $600 | +| [Devart Excel Add-in for SQL Server](#devart-excel-addin) | No | No | [?] | [Devart Excel Add-in for SQL Server] | 2020-04-13 | Devart | Shareware | No | $250 | +| [dbMonitor](#dbmonitor) | Oracle,MySQL,PostgreSQL,Other | No | [M] | [dbMonitor] | 2012-11-01 | Devart | Freeware | Yes | No | +| [SQL Server Compression Estimator](#compression-estimator) | No | No | [?] | [SQL Server Compression Estimator] | 2011-06-02 | Bob Tavlor | | Yes | No | +| [ClearTrace](#cleartrace) | No | No | [M] | [ClearTrace] | 2016-07-07 | Bill Graziano | | Yes | No | +| [ClearTraceXE](#cleartracexe) | No | No | [M] | [ClearTraceXE] | 2019-09-04 | Bill Graziano | | Yes | No | +| [Security Explorer](#security-explorer) | No | No | [SEC] | [Security Explorer] | 2015-06-25 | Quest Software | | No | $850 | +| [LiteSpeed for SQL Server](#litespeed-for-sql-server) | No | No | [?] | [LiteSpeed for SQL Server] | 2015-07-31 | Quest Software | | No | ? | +| [Toad for SQL Server](#toad-for-sql-server) | No | No | [MS] | [Toad for SQL Server] | 2015-05-12 | Quest Software | | No | ? | +| [Quest Spotlight on SQL Server Enterprise](#quest-spotlight) | No | No | [?] | [Quest Spotlight] | 2016-03-10 | Quest Software | | No | $2561 | +| [Quest Foglight](#quest-foglight) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Quest Foglight] | 2019-08-29 | Quest Software | | No | $8203 | +| [Quest Enterprise Reporter](#quest-enterprise-reporter) | No | No | [?] | [Quest Enterprise Reporter] | ? | Quest Software | | No | $511 | +| [SQL Scripter](#sql-scripter) | No | No | [?] | [SQL Scripter] | 2013-02-24 | Thomas Hinsenkamp | | No | €99 | +| [Simple Dynamic Scheduler](#simple-dynamic-scheduler) | No | No | [?] | [Simple Dynamic Scheduler] | 2016-05-02 | Miljan Radovic | | Yes | No | +| [ApexSQL Audit](#apexsql-audit) | No | No | [?] | [ApexSQL Audit] | 2017-07-11 | ApexSQL | | No | $1699 | +| [ApexSQL Backup](#apexsql-backup) | No | No | [B] | [ApexSQL Backup] | 2017-10-12 | ApexSQL | | No | $499 | +| [ApexSQL Defrag](#apexsql-defrag) | No | No | [IDX] | [ApexSQL Defrag] | 2017-06-29 | ApexSQL | | No | $499 | +| [ApexSQL Log](#apexsql-log) | No | No | [?] | [ApexSQL Log] | 2017-05-24 | ApexSQL | | No | $1999 | +| [ApexSQL Monitor](#apexsql-monitor) | No | No | [M] | [ApexSQL Monitor] | 2017-10-05 | ApexSQL | | No | $499 | +| [ApexSQL Plan](#apexsql-plan) | No | No | [?] | [ApexSQL Plan] | 2019-12-02 | ApexSQL | | Yes | No | +| [ApexSQL Propagate](#apexsql-propagate) | No | No | [?] | [ApexSQL Propagate] | 2020-02-19 | ApexSQL | | Yes | No | +| [ApexSQL Recover](#apexsql-recover) | No | No | [REC] | [ApexSQL Recover] | 2017-10-26 | ApexSQL | | No | $1999 | +| [ApexSQL Build](#apexsql-build) | No | No | [?] | [ApexSQL Build] | 2017-05-15 | ApexSQL | | No | $399 | +| [ApexSQL Clean](#apexsql-clean) | No | No | [?] | [ApexSQL Clean] | 2017-09-28 | ApexSQL | | No | $399 | +| [ApexSQL Data Diff](#apexsql-data-diff) | No | No | [DC] | [ApexSQL Data Diff] | 2017-10-26 | ApexSQL | | No | $399 | +| [ApexSQL Decrypt](#apexsql-decrypt) | No | No | [SEC] | [ApexSQL Decrypt] | 2020-03-12 | ApexSQL | | Yes | No | +| [ApexSQL Diff](#apexsql-diff) | No | No | [SC] | [ApexSQL Diff] | 2017-10-26 | ApexSQL | | No | $399 | +| [ApexSQL Doc](#apexsql-doc) | No | No | [D] | [ApexSQL Doc] | 2017-09-06 | ApexSQL | | No | $299 | +| [ApexSQL Generate](#apexsql-generate) | No | No | [G] | [ApexSQL Generate] | 2017-07-13 | ApexSQL | | No | $499 | +| [ApexSQL Script](#apexsql-script) | No | No | [?] | [ApexSQL Script] | 2016-05-10 | ApexSQL | | No | $249 | +| [ApexSQL Trigger](#apexsql-trigger) | No | No | [?] | [ApexSQL Trigger] | 2017-06-01 | ApexSQL | | No | $1999 | +| [ApexSQL Trigger Veiwer](#apexsql-trigger-viewer) | No | No | [?] | [ApexSQL Trigger Viewer] | 2017-06-01 | ApexSQL | | Yes | No | +| [ApexSQL Snapshot Utility](#apexsql-snapshot-utility) | No | No | [?] | [ApexSQL Snapshot Utility] | 2016-01-12 | ApexSQL | | Yes | No | +| [ApexSQL Model](#apexsql-model) | No | No | [DA] | [ApexSQL Model] | 2019-05-22 | ApexSQL | | Yes | No | +| [ApexSQL Analyze](#apexsql-analyze) | No | No | [?] | [ApexSQL Analyze] | 2017-12-13 | ApexSQL | | No | $299 | +| [ApexSQL BI Monitor](#apexsql-bi-monitor) | No | No | [BI],[M] | [ApexSQL BI Monitor] | 2018-05-18 | ApexSQL | | No | $499 | +| [ApexSQL VM Monitor](#apexsql-vm-monitor) | No | No | [M] | [ApexSQL VM Monitor] | 2018-05-09 | ApexSQL | | No | $999 | +| [ApexSQL Job](#apexsql-job) | No | No | [J] | [ApexSQL Job] | 2018-03-29 | ApexSQL | | No | $499 | +| [ApexSQL Enforce](#apexsqlL-enforce) | No | No | [?] | [ApexSQL Enforce] | 2018-07-19 | ApexSQL | | No | $299 | +| [ApexSQL CI/CD toolkit](#apexsql-ci-cd) | No | No | [?] | [ApexSQL CI/CD toolkit] | 2020-05-21 | ApexSQL | | Yes | No | +| [ApexSQL Compare](#apexsql-compare) | No | No | [?] | [ApexSQL Compare] | 2020-03-17 | ApexSQL | | Yes | No | +| [ApexSQL Complete](#apexsql-complete) | No | No | [?] | [ApexSQL Complete] | 2020-05-28 | ApexSQL | | Yes | No | +| [ApexSQL Refactor](#apexsql-refactor) | No | No | [?] | [ApexSQL Refactor] | 2020-06-09 | ApexSQL | | Yes | No | +| [ApexSQL Search](#apexsql-search) | No | No | [S] | [ApexSQL Search] | 2020-07-30 | ApexSQL | | Yes | No | +| [ApexSQL Source Control](#apexsql-source-control) | No | No | [?] | [ApexSQL Source Control] | 2020-01-20 | ApexSQL | | No | $299 | +| [DBBest T-SQL Analyzer](#dbbest-t-sql-analyzer) | No | No | [?] | [DBBest T-SQL Analyzer] | 2015-03-13 | DBBest | | No | $89 | +| [DBBest Database Compare Suite](#dbbest-database-compare-suite) | No | No | [SC],[DC]| [DBBest Database Compare Suite] | 2015-09-04 | DBBest | | No | $349 | +| [Advanced Query Tool](#advanced-query-tool) | No | No | [?] | [Advanced Query Tool] | 2015-03-18 | Cardett Associates | | No | $180 | +| [SqlDiffFramework](#sqldiffframework) | No | No | [SC] | [SqlDiffFramework] | 2012-04-17 | Michael Sorens | | Yes | No | +| [DataGrip](#datagrip) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [DataGrip] | 2017-02-21 | Jet Brains | | No | $89 | +| [Pssdiag and Sqldiag Manager](#pssdiag-and-sqldiag-manager) | No | No | [?] | [Pssdiag and Sqldiag Manager] | 2017-01-06 | Jack Li | | Yes | No | +| [SQL Nexus Tool](#sql-nexus-tool) | No | No | [?] | [SQL Nexus Tool] | 2016-11-20 | Jack Li | | Yes | No | +| [DBSophic Qure Profiler](#dbsophic-qure-profiler) | No | No | [?] | [DBSophic Qure Profiler] | ? | DBSophic | | No | $300 | +| [DBSophic Qure Optimizer](#dbsophic-qure-optimizer) | No | No | [?] | [DBSophic Qure Optimizer] | ? | DBSophic | | No | ? | +| [RestoreChecker](#restorechecker) | No | No | [?] | [RestoreChecker] | 2015-01-15 | SQLServerUtilities | | No | $99 | +| [SQLScripter](#sqlscripter) | No | No | [?] | [SQLScripter] | 2009-08-24 | SQLServerUtilities | | No | $99 | +| [SQLC](#sqlc) | No | No | [DC],[SC]| [SQLC] | 2017-11-19 | David Ingleton | | Yes | No | +| [Database Performance Analyzer](#dpa-solarwinds) | Oracle, MySQL, Other | Linux | [M] | [Database Performance Analyzer] | ? | SolarWinds | | No | $1995 | +| [Database Performance Analyzer for MSSQL](#dpa-solarwinds-mssql) | No | No | [M] | [Database Performance Analyzer for MSSQL] | ? | SolarWinds | | No | $1995 | +| [SQL Enlight](#sql-enlight) | No | No | [MS] | [SQL Enlight] | 2016-04-25 | UbitSoft | | No | $295 | +| [Aireforge Studio](#aireforge-studio) | No | No | [MG],[SC]| [Aireforge Studio] | 2019-08-08 | AireForge | | Yes | $299 | +| [HexaTier](#hexatier) | No | No | [?] | [HexaTier] | ? | HexaTier | | No | ? | +| [SoftTree SQL Assistant](#softtree-sql-assistant) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [SoftTree SQL Assistant] | 2017-12-17 | SoftTree | | No | $215 | +| [DB Audit and Security 360](#db-audit-and-security-360) | Oracle,MySQL,Other | No | [SEC] | [DB Audit and Security 360] | 2015-02-07 | SoftTree | | No | $499 | +| [EMS SQL Management Studio](#ems-management-studio) | No | No | [MS] | [EMS SQL Management Studio] | 2016-05-26 | EMS | | No | $257 | +| [EMS SQL Backup](#ems-sql-backup) | No | No | [B] | [EMS SQL Backup] | 2016-04-13 | EMS | | Yes | $82 | +| [EMS SQL Administrator](#ems-sql-administrator) | No | No | [?] | [EMS SQL Administrator] | 2015-04-14 | EMS | | Yes | $135 | +| [EMS SQL Manager](#ems-sql-manager) | No | No | [?] | [EMS SQL Manager] | 2016-05-26 | EMS | | Yes | $135 | +| [EMS Data Export](#ems-data-export) | No | No | [?] | [EMS Data Export] | 2016-04-29 | EMS | | No | $47 | +| [EMS Data Import](#ems-data-import) | No | No | [?] | [EMS Data Import] | 2016-04-14 | EMS | | No | $47 | +| [EMS Data Pump](#ems-data-pump) | No | No | [?] | [EMS Data Pump] | 2016-11-03 | EMS | | No | $47 | +| [EMS Data Generator](#ems-generator) | No | No | [G] | [EMS Data Generator] | 2010-07-10 | EMS | | No | $47 | +| [EMS DB Comparer](#ems-bd-comparer) | No | No | [SC] | [EMS DB Comparer] | 2015-07-24 | EMS | | No | $47 | +| [EMS DB Extract](#ems-bd-extract) | No | No | [?] | [EMS DB Extract] | 2008-10-16 | EMS | | No | $47 | +| [EMS SQL Query](#ems-sql-query) | No | No | [?] | [EMS SQL Query] | 2012-03-29 | EMS | | No | $47 | +| [EMS Data Comparer](#ems-data-comparer) | No | No | [DC] | [EMS Data Comparer] | 2012-11-16 | EMS | | No | $47 | +| [NitroAccelerator](#nitroaccelerator) | No | No | [?] | [NitroAccelerator] | 2016-07-10 | Nitrosphere | | No | $1265 | +| [ERwin Data Modeler](#erwin-data-modeler) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERwin Data Modeler] | 2016-06-03 | ERwin | | No | $810 | +| [Toad Data Point](#toad-data-point) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Toad Data Point] | 2016-06-16 | Quest Software | | No | ? | +| [SQL Power Architect](#sql-power-architect) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [SQL Power Architect] | 2016-02-11 | SQLPower | | Yes | $995 | +| [DbWrench](#dbwrench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbWrench] | 2019-09-17 | Nizana Systems | | No | $99 | +| [Navicat Data Modeler](#navicat-data-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Navicat Data Modeler] | 2016-08-01 | PremiumSoft | | No | $199 | +| [DeZign for Databases](#dezign-for-databases) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [DeZign for Databases] | 2019-04-01 | Datanamic | | No | €29/mo| +| [ERDesigner NG](#erdesigner-ng) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [ERDesigner NG] | 2013-04-10 | Mirko Sertic | | Open Source | No | +| [Vertabelo](#vertabelo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Vertabelo] | ? | Vertabelo | | No | $948 | +| [dbDiffo](#dbdiffo) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [dbDiffo] | ? | Contenet Ltd | | Yes | No | +| [SQL DXP](#sql-dxp) | Oracle,MySQL | No | [DC],[SC]| [SQL DXP] | 2016-06-20 | SQL Delta | | No | $530 | +| [Aqua Data Studio](#aqua-data-studio) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Aqua Data Studio] | 2016-07-06 | AquaFold | | No | $499 | +| [RazorSQL](#razorsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [RazorSQL] | 2019-09-26 | Richardson Software | | No | $100 | +| [SQL Pretty Printer](#sql-pretty-printer) | No | No | [?] | [SQL Pretty Printer] | 2016-02-19 | Gudu Software | | No | $50 | +| [Database .NET](#database-net) | Oracle,MySQL,PostgreSQL,Other | No | [MS],[SC]| [Database .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $69 | +| [dbMigration .NET](#dbmegration-net) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [dbMigration .NET] | 2018-08-20 | fish's dotNET | | Non-commercial | $49 | +| [Is It SQL](#is-it-sql) | No | No | [M] | [Is It SQL] | 2017-04-06 | Bill Graziano | | Non-commercial | No | +| [Database Experimentation Assistant](#dea) | No | No | [T] | [Database Experimentation Assistant] | 2020-03-20 | Microsoft | | Yes | No | +| [Data Platform Studio](#dps) | No | No | [MG] | [Data Platform Studio] | ? | Red Gate Software | | Yes | ? | +| [Flyway](#flyway) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Flyway] | 2018-01-30 | boxfuse | [Apache] | Open Source | $950 | +| [Liquibase](#liquibase) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Liquibase] | 2018-04-11 | Liquibase | [Apache] | Open Source | No | +| [My Batis](#my-batis) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [My Batis] | 2018-03-20 | My Batis | [Apache] | Open Source | No | +| [SentryOne Plan Explorer](#sentryone-plan-explorer) | No | No | [?] | [SentryOne Plan Explorer] | 2017-05-25 | SentryOne | | Yes | No | +| [SQL Sentry](#sql-sentry) | No | No | [M] | [SQL Sentry] | 2016-12-07 | SentryOne | | No | ? | +| [DBmaestro TeamWork](#dbmaestro-teamwork) | Oracle | No | [?] | [DBmaestro TeamWork] | ? | DBmaestro | | No | ? | +| [xSQL Schema Compare](#xsql-schema-compare) | No | No | [SC] | [xSQL Schema Compare] | 2017-03-01 | xSQL Software | Shareware | Yes | $399 | +| [xSQL Data Compare](#xsql-data-compare) | No | No | [DK] | [xSQL Data Compare] | 2017-06-26 | xSQL Software | Shareware | Yes | $399 | +| [xSQL Script Executor](#xsql-script-executor) | MySQL,DB2,SQL Server CE | No | [?] | [xSQL Script Executor] | 2015-02-25 | xSQL Software | Freeware | Yes | $249 | +| [xSQL Builder](#xsql-builder) | No | No | [?] | [xSQL Builder] | 2017-03-15 | xSQL Software | Shareware | No | $799 | +| [xSQL Documenter](#xsql-documenter) | Oracle,MySQL,SQLite,Other | No | [D] | [xSQL Documenter] | 2017-01-04 | xSQL Software | Shareware | No | $199 | +| [xSQL Profiler](#xsql-profiler) | No | No | [?] | [xSQL Profiler] | 2017-06-28 | xSQL Software | Shareware | Yes | $999 | +| [xSQL Schema Compare SDK](#xsql-schema-compare-sdk) | No | No | [SC] | [xSQL Schema Compare SDK] | 2017-10-25 | xSQL Software | Shareware | No | $1499 | +| [xSQL RSS Reporter](#xsql-rss-reporter) | No | No | [D] | [xSQL RSS Reporter] | 2014-11-25 | xSQL Software | Shareware | No | $169 | +| [xSQL Database Searcher](#xsql-database-sercher) | No | No | [S] | [xSQL Database Searcher] | 2017-05-09 | xSQL Software | Freeware | Yes | No | +| [Cloud-based DB Monitoring Platform](#cbmp) | No | Mobile | [M] | [Cloud-based DB Monitoring Platform] | ? | SQLTreeo | | No | €180 | +| [SchemaCrawler](#schema-crawler) | Oracle,MySQL,PostgreSQL,Other | Yes | [D],[SC] | [SchemaCrawler] | 2017-02-27 | Sualeh Fatehi | | Open Source | No | +| [SA MaaS Microsoft SQL Server](#sa-maas) | No | No | [M] | [SA MaaS Microsoft SQL Server] | ? | SENTINELAGENT | | No | ? | +| [SSIS Framework](#ssis-framework) | No | No | [ETL] | [SSIS Framework] | 2017-01-07 | Andy Leonard | | Yes | ? | +| [SSIS Catalog Browser](#ssis-browser) | No | No | [ETL] | [SSIS Catalog Browser] | 2019-04-23 | Andy Leonard | | Yes | No | +| [BimlExpress Metadata Framework](#bimlexpress) | No | No | [?] | [BimlExpress Metadata Framework] | 2017-01-06 | Andy Leonard | | Yes | No | +| [MS Kerberos Configuration Manager](#mkcm) | No | No | [?] | [MS Kerberos Configuration Manager] | 2017-01-31 | Microsoft | | Yes | No | +| [Spotlight](#spotlight) | No | No | [M] | [Spotlight] | ? | Quest Software | | Yes | ? | +| [DBConvert Studio](#dbconvert-studio) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [DBConvert Studio] | 2020-05-11 | Slotix | | No | $499 | +| [DbDefence](#dbdefence) | No | No | [?] | [DbDefence] | 2017-03-01 | ActiveCrypt Software | | Yes | $698 | +| [SQL Server Migration Assistant for MySQL](#ssma-mysql) | MySQL | No | [MG] | [SQL Server Migration Assistant for MySQL] | 2017-02-17 | Microsoft | | Yes | No | +| [sqlcmd for Mac and Linux](#sqlcmd) | No | Linux,Mac | [?] | [sqlcmd for Mac and Linux] | 2017-01-26 | Soheil Rashidi | | Open Source | No | +| [SQL Migrator](#sql-migrator) | No | No | [MG] | [SQL Migrator] | ? | Datamate Technology | | ? | ? | +| [MS FoxPro to MS SQL Migration and Sync](#foxpro-sqlserver) | No | No | [MG] | [MS FoxPro to MS SQL Migration and Sync] | 2019-04-25 | Slotix | | No | $149 | +| [MySQL to MS SQL Migration and Sync](#mysql-sqlserver) | No | No | [MG] | [MySQL to MS SQL Migration and Sync] | 2018-10-03 | Slotix | | No | $149 | +| [Oracle to MS SQL Migration and Sync](#oracle-sqlserver) | No | No | [MG] | [Oracle to MS SQL Migration and Sync] | 2020-02-12 | Slotix | | No | $149 | +| [PostgreSQL to MS SQL Migration and Sync](#postgresql-sqlserver) | No | No | [MG] | [PostgreSQL to MS SQL Migration and Sync] | 2019-10-24 | Slotix | | No | $149 | +| [MS Excel to MS SQL Migration](#msexcel-sqlserver) | No | No | [MG] | [MS Excel to MS SQL Migration] | 2018-02-23 | Slotix | | No | $149 | +| [SQLite to MS SQL Migration and Sync](#sqllite-sqlserver) | No | No | [MG] | [SQLite to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | +| [IBM DB2 to MS SQL Migration and Sync](#db2-sqlserver) | No | No | [MG] | [IBM DB2 to MS SQL Migration and Sync] | 2019-07-09 | Slotix | | No | $149 | +| [MS Access to MS SQL Migration and Sync](#access-sqlserver) | No | No | [MG] | [MS Access to MS SQL Migration and Sync] | 2020-01-15 | Slotix | | No | $149 | +| [Firebird to MS SQL Migration and Sync](#firebird-sqlserver) | No | No | [MG] | [Firebird to MS SQL Migration and Sync] | 2016-08-18 | Slotix | | No | $149 | +| [SQLines SQL Converter](#sqllines-converter) | No | No | [MG] | [SQLines SQL Converter] | ? | Dmtolpeko | | Open Source | No | +| [SQLite & SQL Server Compact Toolbox](#sqlite-sqlserver-toolbox) | No | No | [?] | [SQLite & SQL Server Compact Toolbox] | ? | ErikEJ | | Open Source | No | +| [SqlPad](#sqlpad) | Postgres,MySQL,Crate,Vertica | No | [MS] | [SqlPad] | ? | Rickbergfalk | | Open Source | No | +| [Html-query-plan](#html-query-plan) | No | No | [?] | [Html-query-plan] | ? | JustinPealing | | Open Source | No | +| [SqlQueryStress](#sql-query-stress) | No | No | [?] | [SqlQueryStress] | ? | Adam Machanic | | Open Source | No | +| [SQL Server Migration Assistant for DB2](#ssma-db2) | DB2 | No | [MG] | [SQL Server Migration Assistant for DB2] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Oracle](#ssma-oracle) | Oracle | No | [MG] | [SQL Server Migration Assistant for Oracle] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for Access](#ssma-access) | Access | No | [MG] | [SQL Server Migration Assistant for Access] | 2017-02-17 | Microsoft | | Yes | No | +| [SQL Server Migration Assistant for SAP ASE](#ssma-sap) | SAP ASE | No | [MG] | [SQL Server Migration Assistant for SAP ASE] | 2020-06-29 | Microsoft | | Yes | No | +| [mssql for Visual Studio Code](#mssql-for-vs-code) | No | Linux,Mac | [MS] | [mssql for Visual Studio Code] | 2017-05-02 | Microsoft | | Open Source | No | +| [mssql-scripter](#mssql-scripter) | No | Linux,Mac | [?] | [mssql-scripter] | ? | Microsoft | | Open Source | No | +| [DBFS](#dbfs) | No | Linux | [M] | [DBFS] | ? | Microsoft | | Open Source | No | +| [comparator](#pumpet-comparator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [comparator] | 2017-06-06 | Pumpet | [LGPL-3.0] | Open Source | No | +| [Navicat for SQL Server](#navicat-for-sql-server) | No | Mac | [MS] | [Navicat for SQL Server] | 2017-06-14 | PremiumSoft | | No | $699 | +| [Navicat Premium](#navicat-premium) | Oracle,MySQL,PostgreSQL,Other | Mac | [MS] | [Navicat Premium] | 2017-06-14 | PremiumSoft | | No | $1299 | +| [DbVisualizer](#dbvisualizer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS],[DA]| [DbVisualizer] | 2017-08-22 | DbVis Software AB. | | Yes | $197 | +| [DbSchema](#dbschema) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbSchema] | 2017-06-19 | Wise Coders Solutions | | Yes | $127 | +| [DBGhost](#dbghost) | No | No | [?] | [DBGhost] | 2017-01-31 | Innovartis Ltd | | No | £430 | +| [SQLAutomate](#sqlautomate) | Oracle,MySQL,Other | No | [?] | [SQLAutomate] | 2017-06-19 | OnLine ToolWorks     | | No | $99 | +| [BimlExpress](#bimlexpress) | No | No | [?] | [BimlExpress] | ? | Varigence   | | No | No | +| [BI Developer Extensions](#bi-developer-extensions) | No | No | [?] | [BI Developer Extensions] | 2019-04-29 | Microsoft   | | Open Source | No | +| [Azure Data Warehouse Migration Utility](#azure-migration) | No | No | [MG] | [Azure Data Warehouse Migration Utility] | ? | Microsoft | | ? | ? | +| [Benchmark Factory](#benchmark-factory) | Oracle,MySQL,Other | No | [T] | [Benchmark Factory] | ? | Quest Software | | No | $4413 | +| [manduka](#manduka) | Oracle | Linux,Mac | [?] | [manduka] | 2017-03-08 | Virtusa Corporation | | Yes | No | +| [PowerBI Desktop](#powerbi-desktop) | Oracle,MySQL,PostgreSQL,Other | No | [BI] | [PowerBI Desktop] | 2017-07-11 | Microsoft | | Yes | ? | +| [Stellar Phoenix SQL Database Repair](#stellar-phoenix) | No | No | [REC] | [Stellar Phoenix SQL Database Repair] | 2017-07-05 | Stellar Technology | | No | $349 | +| [DataNumen SQL Recovery](#datanumen-sql-recovery) | No | No | [REC] | [DataNumen SQL Recovery] | 2017-03-20 | DataNumen | | No | $500 | +| [Recovery Toolbox for SQL Server](#recovery-toolbox) | No | No | [REC] | [Recovery Toolbox for SQL Server] | ? | Recovery Toolbox | Shareware | No | $99 | +| [SQL MDF Viewer](#sql-mdf-viewer) | No | No | [?] | [SQL MDF Viewer] | ? | SysTools | Shareware | No | $129 | +| [SQL MDF Recovery Tool](#sql-mdf-recovery-tool) | No | No | [REC] | [SQL MDF Recovery Tool] | ? | SysTools | Shareware | No | $129 | +| [SQL Passord Recovery](#sql-password-recovery) | No | No | [REC] | [SQL Passord Recovery] | ? | SysTools | Shareware | No | $69 | +| [SQL Decryptor](#sql-decryptor) | No | No | [SEC] | [SQL Decryptor] | ? | SysTools | Shareware | No | $69 | +| [SQL Backup Database Recovery](#sql-backup-database-recovery) | No | No | [REC] | [SQL Backup Database Recovery] | ? | SysTools | Shareware | No | $149 | +| [SQL Log File Viewer](#sql-log-file-viewer) | No | No | [?] | [SQL Log File Viewer] | ? | SysTools | Shareware | No | $999 | +| [DAX Studio](#dax-studio) | No | No | [?] | [DAX Studio] | ? | Sqlbi | Freeware | Yes | No | +| [SQL Cop](#sql-cop) | No | No | [?] | [SQL Cop] | ? | LessThanDot | Freeware | Yes | No | +| [Dataedo](#dataedo) | Oracle,MySQL | No | [D] | [Dataedo] | 2017-09-15 | Logic Systems | Shareware | Yes | $239 | +| [Azure Database Migration Service](#azure-db-migration) | Oracle,MySQL, Other | Online | [MG] | [Azure Database Migration Service] | 2017-12-01 | Microsoft | | Yes | No | +| [FlowHeater](#flowheater) | Oracle,MySQL,PostgreSQL,Other | No | [ETL] | [FlowHeater] | 2017-10-02 | FlowHeater GmbH | Shareware | No | $79 | +| [EDIS](#edis) | No | No | [ETL] | [EDIS] | ? | SQL ETL | Shareware | Yes | $599 | +| [SchemaSpy](#schemaspy) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [D] | [SchemaSpy] | 2018-08-05 | Rafal Kasa | [MIT] | Open Source | No | +| [Adminer](#adminer) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Adminer] | 2019-08-27 | Jakub Vrána | [Apache] | Open Source | No | +| [Full Convert](#full-convert) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Full Convert] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | +| [Replicator](#replicator) | Oracle,MySQL,PostgreSQL,Other | No | [DC] | [Replicator] | 2018-08-20 | Spectral Core | Shareware | Yes | $699 | +| [JackDB](#jackdb) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [JackDB] | ? | JackDB | | No | $48 | +| [SQL Workbench](#sql-workbench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQL Workbench] | 2018-08-20 | Thomas Kellerer | | Yes | No | +| [Valentina Studio](#valentina-studio) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Valentina Studio] | 2018-09-24 | Paradigma Software | | Yes | $200 | +| [SQL Plus Dot Net](#sql-plus-dot-net) | No | No | [?] | [SQL Plus Dot Net] | ? | SQL+.NET | | No | ? | +| [SQLIndexManager](#sqlindexmanager) | No | No | [IDX] | [SQLIndexManager] | 2019-05-19 | Sergey Syrovatchenko | | Open Source | No | +| [JAMS Enterprise Job Scheduling](#jams-job) | No | No | [J] | [JAMS Enterprise Job Scheduling] | 2019-08-20 | HelpSystems | | No | ? | +| [Stitch Data Loader](#stitch) | Oracle,MySQL,PostgreSQL,Other | Online | [ETL] | [Stitch Data Loader] | 2019-09-20 | Talend | | No | ? | +| [Talend Data Integration](#talend-integration) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Integration] | 2019-06-20 | Talend | [Apache] | Yes | ? | +| [Talend Data Preparation](#talend-preparation) | Oracle,MySQL,PostgreSQL,Other | Mac | [ETL] | [Talend Data Preparation] | 2018-06-05 | Talend | [Apache] | Yes | ? | +| [Pentaho Data Integration](#pentaho) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [ETL] | [Pentaho Data Integration] | 2019-06-20 | Hitachi Vantara | Shareware | No | ? | +| [Studio3T](#studio3t) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MG] | [Studio3T] | 2019-09-19 | Studio 3T | Shareware | No | $150 | +| [SQLGrease](#sqlgrease) | No | Online | [M] | [SQLGrease] | 2019-09-20 | SQLGrease | Shareware | No | $948 | +| [QuickDBD](#quickdbd) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [QuickDBD] | ? | Dovetail Technologies | | Yes | $95 | +| [DB Designer](#dbdesigner) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [DB Designer] | ? | DB Designer | | Yes | $180 | +| [ESF Database Migration Toolkit](#esf) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [ESF Database Migration Toolkit] | 2019-10-23 | DBSofts Inc | Shareware | No | $322 | +| [MS SQL Migration Toolkit](#msskit) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [MS SQL Migration Toolkit] | 2019-04-22 | Intelligent Converters | Shareware | No | $99 | +| [DatabasesSpy](#databasespy) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [DatabaseSpy] | 2019-10-09 | Altova | Shareware | No | €109 | +| [DiffDog](#diffdog) | Oracle,MySQL,PostgreSQL,Other | No | [DC],[SC]| [DiffDog] | 2019-10-09 | Altova | Shareware | No | €109 | +| [ERBuilder data modeler](#erbuilder) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERBuilder data modeler] | 2019-11-14 | Softbuilder | | Yes | $99 | +| [SQLDatabaseStudio](#sqldatabasestudio) | No | No | [MS] | [SQLDatabaseStudio] | 2017-05-10 | Jan Pivarcek | | Yes | $215 | +| [Enterprise Architect](#ea) | Oracle,MySQL,PostgreSQL,Other | Online | [DA] | [Enterprise Architect] | 2019-10-31 | Sparx Systems Pty Ltd | Shareware | No | $225 | +| [MogwaiERDesignerNG](#mogwai) | Oracle,MySQL,PostgreSQL | No | [DA] | [MogwaiERDesignerNG] | 2019-08-22 | Mirko Sertic | [LGPL-3.0] | Open Source | No | +| [Xcase](#xcase) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Xcase] | 2018-06-19 | Resolution Software | Shareware | No | $799 | +| [Oracle SQL Developer Data Modeler](#oracle-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Oracle SQL Developer Data Modeler] | 2019-08-01 | Oracle | Shareware | Yes | No | +| [Exportizer](#exportizer) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Exportizer] | 2019-11-17 | Vitaliy Levchenko | Shareware | No | $29 | +| [Reportizer](#reportizer) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Reportizer] | 2019-09-10 | Vitaliy Levchenko | Shareware | No | $39 | +| [Database Tour](#database-tour) | Oracle,MySQL,PostgreSQL,Other | No | [MS] | [Database Tour] | 2019-11-20 | Vitaliy Levchenko | Shareware | No | $49 | +| [Ispirer MnMATK](#mnmatk) | Oracle,MySQL,PostgreSQL,Other | No | [MG] | [Ispirer MnMATK] | ? | Ispirer Systems | Shareware | No | ? | +| [SQL Database Recovery](#sql-database-recovery) | No | No | [REC] | [SQL Database Recovery] | 2019-09-10 | KernelApps Private | Shareware | No | $399 | +| [SysTools SQL Log Analyzer](#log-analzyer) | No | No | [M][REC] | [SysTools SQL Log Analyzer] | 2019-01-01 | SysTools | Shareware | No | $999 | +| [SysTools SQL Server Recovery Manager](#systools-rec-manager) | No | No | [REC] | [SysTools SQL Log Analyzer] | 2017-01-01 | SysTools | Shareware | No | $1499 | +| [SysTools SQL Recovery](#systools-recovery) | No | No | [REC] | [SysTools SQL Recovery] | 2019-01-01 | SysTools | Shareware | No | $249 | +| [SQL Backup Recovery](#systools-backup-recovery) | No | No | [REC] | [SQL Backup Recovery] | 2018-01-01 | SysTools | Shareware | No | $149 | +| [SysTools SQL Password Recovery](#systools-password-recovery) | No | No | [REC] | [SysTools SQL Password Recovery] | 2018-01-01 | SysTools | Shareware | No | $69 | +| [SysTools SQL Decryptor](#systools-sql-decryptor) | No | No | [SEC] | [SysTools SQL Decryptor] | 2019-01-01 | SysTools | Shareware | No | $69 | +| [SysTools SQL Server Database Migrator](#systools-migrator) | No | No | [MG] | [SysTools SQL Server Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $249 | +| [SQL Server to Azure Database Migrator](#systools-azure) | No | No | [MG] | [SQL Server to Azure Database Migrator] | 2018-01-01 | SysTools | Shareware | No | $169 | +| [Commvault Complete Backup & Recovery](#commvault) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Commvault Complete Backup & Recovery] | 2019-12-31 | Commvault | Shareware | No | ? | +| [Veeam Backup & Replication](#veeam) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [B] | [Veeam Backup & Replication] | 2019-12-31 | Veeam | Shareware | No | $600 | +| [Veeam Explorer for Microsoft SQL Server](#veeam-explorer) | ? | ? | [B] | [Veeam Explorer for Microsoft SQL Server] | ? | Veeam | Shareware | No | ? | +| [Database Modeling Excel](#database-modeling-excel) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [Database Modeling Excel] | ? | Yang Ning (Steven) | [BSD-3] | Open Source | No | +| [DBAchecks](#dbachecks) | No | No | [?] | [DBAchecks] | ? | sqlcollaborative | [MIT] | Open Source | No | +| [DBComparer](#dbcomparer) | No | No | [DC],[SC]| [DBComparer] | ? | DBComparer | | Yes | No | +| [DbViewSharp](#dbviewsharp) | No | No | [MS] | [DbViewSharp] | 2014-08-08 | David Moore | [MIT] | Yes | No | +| [DTSQL](#dtsql) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [DTSQL] | 2017-08-18 | DigerTech Inc | Shareware | Yes | $69 | +| [MSKerberos Configuration Manager](#mskerberos-config-manager) | No | No | [DC],[SC]| [MSKerberos Configuration Manager] | 2020-02-25 | Microsoft | | Yes | No | +| [Partition Management](#partition-management) | No | No | [?] | [Partition Management] | ? | ? | | Open Source | No | +| [PSDatabaseClone](#psdatabaseclone) | No | No | [?] | [PSDatabaseClone] | 2018-07-27 | Sander Stad | | Open Source | No | +| [Pssdiag&Sqldiag Manager](#pssdiag-sqldiag-manager) | No | No | [?] | [Pssdiag&Sqldiag Manager] | 2020-05-04 | Jack Li | | Open Source | No | +| [SQuirreL SQL Client](#squirrelsql-client) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [SQuirreL SQL Client] | 2020-04-30 | Colin Bell | | Yes | No | +| [Data Synchronisation Studio](#data-synchronisation-studio) | No | No | [?] | [Data Synchronisation Studio] | 2020-05-26 | Simego Ltd | | No | $999 | +| [SQL Converter](#sql-converter) | No | No | [?] | [SQL Converter] | 2015-12-15 | Alaa Ben Fatma | | Yes | No | +| [SQLDBSearch](#sqldbsearch) | No | No | [S] | [SQLDBSearch] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLDBSize](#sqldbsize) | No | No | [?] | [SQLDBSize] | ? | Mohamed Bouarroudj | | Yes | No | +| [SQLines Data](#sqlines-data) | Oracle,MySQL,PostgreSQL,Other | Linux |[MG],[ETL]| [SQLines Data] | 2019-05-29 | SQLines | | Open Source | No | +| [SqlDbAid](#sqldbaid) | No | No | [?] | [SqlDbAid] | 2018-02-10 | Miken | | Yes | No | +| [sqlectron](#sqlectron) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [?] | [sqlectron] | 2018-09-06 | sqlectron | | Open Source | No | +| [SQL ExecStats](#sql-execstats) | No | No | [?] | [SQL ExecStats] | ? | Elemental Inc | | Yes | No | +| [SQL-FineBuild](#sql-finebuild) | No | No | [?] | [SQL-FineBuild] | 2017-10-28 | Edward Vassie | | Open Source | No | +| [SQL Health Monitor](#sql-health-monitor) | No | No | [M] | [SQL Health Monitor] | ? | ManageEngine | | Yes | No | +| [SQLPRep](#sqlprep) | No | No | [?] | [SQLPRep] | ? | Consequential Solutions | | Yes | No | +| [SQL Server Monitoring](#sql-server-monitoring) | No | No | [M] | [SQL Server Monitoring] | ? | Spiceworks | | Yes | No | +| [SQL Server Storage manager](#sql-server-storage-manager) | No | No | [M] | [SQL Server Storage manager] | ? | Lepide Software | | Yes | No | +| [SysKit Pulse](#syskit-pulse) | No | No | [M] | [SysKit Pulse] | ? | SysKit Ltd | | Yes | No | +| [WhatsUp SQL Server Monitor](#whatsup-sql-server-monitor) | No | No | [M] | [WhatsUp SQL Server Monitor] | ? | Ipswitch | | Yes | No | +| [POPSQL](#popsql) | Oracle,MySQL,PostgreSQL,Other | Online | [MS] | [POPSQL] | 2020-08-01 | PopSQL | | Yes | $10 | +| [Azure Blob Studio 2011](#azure-blob-studio-2011) | No | No | [?] | [Azure Blob Studio 2011] | 2010-12-25 | Alessandro Del Sole | | Yes | No | +| [Azure Explorer](#azure-explorer) | No | No | [?] | [Azure Explorer] | ? | Monza Cloud | | Yes | No | +| [Azure SQL Agent](#azure-sql-agent) | No | No | [?] | [Azure SQL Agent] | ? | ? | [MIT] | Open Source | No | +| [Azure SQL Database DTU Calculator](#azure-sql-dtu-calculator) | No | No | [?] | [Azure SQL Database DTU Calculator] | ? | Justin Henriksen | [MIT] | Open Source | No | +| [Azure SQL Database Stress Test Tool](#azure-sql-stress-test) | No | No | [T] | [Azure SQL Database Stress Test Tool] | ? | Kiyoaki Tsurutani | [MIT] | Open Source | No | +| [Azure SQL Dev Cloner](#azure-sql-dev-cloner) | No | No | [?] | [Azure SQL Dev Cloner] | ? | ? | [MIT] | Open Source | No | +| [Azure User Management Console](#azure-user-management-console) | No | No | [?] | [Azure User Management Console] | ? | ? | [Apache] | Open Source | No | +| [CloudMonix SQL Azure Database Management](#cloudmonix-azure-man)| No | No | [?] | [CloudMonix SQL Azure Database Management] | ? | CloudMonix | | No | $15 | +| [DB Ghost Change Manager Professional](#db-ghost-change-manager) | No | No | [?] | [DB Ghost Change Manager Professional] | ? | Innovartis Ltd | | No | £430 | +| [MSSQL-Maestro](#mssql-maestro) | No | No | [MS] | [MSSQL-Maestro] | 2017-06-29 | SQL Maestro Group | | No | $229 | +| [MSSQLMerge](#mssqlmerge) | No | No | [?] | [MSSQLMerge] | ? | Konstantin Semenenkov | | Yes | $50 | +| [SQL Backup and FTP](#sql-backup-and-ftp) | MySQL,PostgreSQL | Linux | [B] | [SQL Backup and FTP] | ? | Pranas.NET | | Yes | $129 | +| [SQL Bak](#sql-bak) | MySQL,PostgreSQL | Linux | [B] | [SQL Bak] | ? | Pranas.NET | | Yes | $9 | +| [SQL Bulk Tools](#sql-bulk-tools) | No | No | [?] | [SQL Bulk Tools] | ? | Greg Taylor | [MIT] | Open Source | No | +| [SQL Data Examiner](#sql-data-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Data Examiner] | ? | Intelligent Database Solutions | | No | $400 | +| [SQL Examiner](#sql-examiner) | Oracle,MySQL,PostgreSQL | No | [?] | [SQL Examiner] | ? | Intelligent Database Solutions | | No | $400 | +| [SQL Database Backup](#sql-database-backup) | No | No | [B] | [SQL Database Backup] | ? | Richard Astbury | [MIT] | Open Source | No | +| [SQL Database Copy](#sql-database-copy) | No | No | [MG] | [SQL Database Copy] | 2017-07-25 | ryanovic | [MIT] | Open Source | No | +| [SQL Delta Duo for SQL Server](#sql-delta-duo-for-sql-server) | No | No | [?] | [SQL Delta Duo for SQL Server] | ? | The Australian Software Company | | No | $370 | +| [SQL Trace Replay](#sql-trace-replay) | No | No | [?] | [SQL Trace Replay] | ? | Mikhail Shilkov | [MIT] | Open Source | No | +| [SQL Workload Profiler](#sql-workload-profiler) | No | No | [?] | [SQL Workload Profiler] | 2014-10-01 | Chris Bailiss | | Yes | No | +| [SQLDBdiff](#sqldbdiff) | No | Linux | [?] | [SQLDBdiff] | ? | SQLDBtools | | Yes | $60 | +| [SQL Backup Master](#sql-backup-master) | No | No | [B] | [SQL Backup Master] | ? | Key Metric Software | | Yes | $49 | +| [Handy Backup Server](#handy-backup-server) | Oracle,MySQL,PostgreSQL,Other | Linux | [B] | [Handy Backup Server] | 2019-03-11 | Novosoft | | No | $39 | +| [EaseUS Todo Backup Server](#easeus-todo-backup-server) | No | No | [B] | [EaseUS Todo Backup Server] | ? | EaseUS | | No | $39 | +| [SqlBackupFree](#sqlbackupfree) | No | No | [B] | [SqlBackupFree] | ? | pranas.net | | Yes | No | +| [ERDPlus](#erdplus) | No | No | [?] | [ERDPlus] | 2020-05-24 | ERDPlus | | ? | ? | +| [SentryOne Test](#sentryone-test) | No | No | [T] | [SentryOne Test] | ? | SQL Sentry | | No | $828 | +| [Code Quality and Security for T-SQL](#sonarsource) | No | No | [?] | [Code Quality and Security for T-SQL] | ? | SonarSource | | No | €120 | +| [DBBALANCE](#dbbalance) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [DBBALANCE] | ? | DBBalance | | No | ? | +| [Convert SQL to Excel](#convert-sql-to-excel) | No | No | [?] | [Convert SQL to Excel] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Search string in Schema](#search-string-in-schema) | No | No | [S] | [Search string in Schema] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Search string in SQL](#search-string-in-sql) | No | No | [S] | [Search string in SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [SQL Table Scripter](#sql-table-scripter) | No | No | [?] | [SQL Table Scripter] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [SQLCLR Util](#sqlclr-util) | No | No | [?] | [SQLCLR Util] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [Image To SQL](#image-to-sql) | No | No | [?] | [Image To SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | +| [dbdiagram](#dbdiagram) | No | No | [?] | [dbdiagram] | ? | holistics.io | | Yes | $9/mo | +| [Beekeeper Studio](#beekeeper) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Beekeeper Studio] | 2020-11-21 | Beekeeper Studio | [MIT] | Yes | No | ## SSMS Download page: [SSMS]
-Release date: 2020-04-07
+Release date: 2020-10-27
Support Version: 2005-2019/Azure
Author: Microsoft
Free version: Yes
@@ -434,7 +436,7 @@ This release features improved compatibility with previous versions of SQL Serve ## Azure Data Studio Download page: [Azure Data Studio]
-Release date: 2020-05-20
+Release date: 2020-11-12
Support Version: 2008-2019/Azure
Author: Microsoft
Free version: Yes
@@ -4004,11 +4006,11 @@ mssql for Visual Studio Code an extension for developing Microsoft SQL Server, A - Customizable extension options including command shortcuts and more -## Microsoft Assessment and Planning +## Microsoft Assessment and Planning (MAP) Toolkit -Download page: [Microsoft Assessment and Planning]
-Release date: 2017-02-10
-Support Version: 2008/2008R2/2012
+Download page: [Microsoft Assessment and Planning (MAP) Toolkit]
+Release date: 2020-05-26
+Support Version: 2008-2019
Author: Microsoft
Free version: Yes
Price: No @@ -4016,6 +4018,9 @@ Price: No The Microsoft Assessment and Planning Toolkit makes it easy to assess your current IT infrastructure for a variety of technology migration projects. This Solution Accelerator provides a powerful inventory, assessment, and reporting tool to simplify the migration planning process. +[Microsoft Assessment and Planning (MAP) Toolkit Wiki](https://social.technet.microsoft.com/wiki/contents/articles/1640.microsoft-assessment-and-planning-map-toolkit-getting-started.aspx) +[Microsoft Assessment and Planning (MAP) Toolkit Download]:https://www.microsoft.com/en-us/download/details.aspx?id=7826 + ## mssql-scripter @@ -5648,6 +5653,20 @@ Price: No - Schedule periodic backups to your Azure Blob storage +## Devart Transaction Log + +Download page: [Devart Transaction Log]
+Release date: 2020-10-16
+Support Version: 2008-2019
+Author: Devart
+Free version: No
+Price: $600 + +dbForge Transaction Log for SQL Server is a powerful transaction log reader tool and `.ldf` file viewer. +With its help, you can view and analyze SQL Server transaction logs and recover data from them. +The tool provides detailed information about all data changes in your database and gives you the ability to revert unwanted transactions on different levels depending on your current needs. + + ## Elastic database tools Download page: [Elastic database tools]
@@ -6067,23 +6086,23 @@ Author: MSSQL.TOOLS
Free version: Yes
Price: No - - Generates a CREATE SQL script for a table. - - Script can include all DRI (declarative referential integrity) such as Foreign Key, Constraints for the table. - - Script can include Indexes for the table. - - Generates INSERT SQL scripts for table data (optionally). +- Generates a CREATE SQL script for a table. +- Script can include all DRI (declarative referential integrity) such as Foreign Key, Constraints for the table. +- Script can include Indexes for the table. +- Generates INSERT SQL scripts for table data (optionally). ## SQLCLR Util Download page: [SQLCLR Util]
Release date: 2015-10-09
-Support Version: 2005, 2014+r
+Support Version: 2005-2019r
Author: MSSQL.TOOLS
Free version: Yes
Price: No - - generates DLL file from SQL CLR assembly in the SQL Server. When creating SQL CLR assembly with its DLL file, SQL Server saves the DLL binary into SQL Server system table. This tool help you to recreate DLL file easily from the SQL Server system table. - - generates CREATE ASSEMBLY script from a DLL file. Once CREATE script is generated, one can run the script without physical .DLL file. This method will be useful when one has no permission to access physical disk on the server because there is no need to copy the file to server. +- generates DLL file from SQL CLR assembly in the SQL Server. When creating SQL CLR assembly with its DLL file, SQL Server saves the DLL binary into SQL Server system table. This tool help you to recreate DLL file easily from the SQL Server system table. +- generates CREATE ASSEMBLY script from a DLL file. Once CREATE script is generated, one can run the script without physical .DLL file. This method will be useful when one has no permission to access physical disk on the server because there is no need to copy the file to server. ## Image To SQL @@ -6095,10 +6114,10 @@ Author: MSSQL.TOOLS
Free version: Yes
Price: No - - Save any image file such as .JPG, .PNG, .BMP, .GIF to SQL Server table. - - Image file is saved to any varbinary column (or image column) - - User can specify input image file and table/column target in easy UI. - - User can specify where to save image file by setting primary key value(s) of the user table in easy UI. +- Save any image file such as `.JPG`, `.PNG`, `.BMP`, `.GIF` to SQL Server table. +- Image file is saved to any varbinary column (or image column) +- User can specify input image file and table/column target in easy UI. +- User can specify where to save image file by setting primary key value(s) of the user table in easy UI. ## dbdiagram @@ -6108,14 +6127,36 @@ Release date: ?
Support Version: ?
Author: holistics.io
Free version: Yes
-Price: &9/mo +Price: $9/mo A free, simple tool to draw ER diagrams by just writing code. Designed for developers and data analysts. - - Generate SQL statements - - Export to Images and PDFs - - One Click Sharing - - Integrate with your SQL Databases - - Integrate with Popular Web Frameworks + +- Generate SQL statements +- Export to Images and PDFs +- One Click Sharing +- Integrate with your SQL Databases +- Integrate with Popular Web Frameworks + + +## Beekeeper Studio + +Download page: [Beekeeper Studio]
+Release date: 2020-10-19
+Support Version: 2008-2019
+Author: Beekeeper Studio
+Free version: Yes
+Price: No + +Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows. + +- Autocomplete SQL query editor with syntax highlighting +- Tabbed interface, so you can multitask +- Sort and filter table data to find just what you need +- Sensible keyboard-shortcuts +- Save queries for later +- Query run-history, so you can find that one query you got working 3 days ago +- Default dark theme + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio @@ -6361,7 +6402,7 @@ A free, simple tool to draw ER diagrams by just writing code. Designed for devel [SQL Server Migration Assistant for Oracle]:https://www.microsoft.com/en-us/download/details.aspx?id=54258 [SQL Server Migration Assistant for Access]:https://www.microsoft.com/en-us/download/details.aspx?id=54255 [mssql for Visual Studio Code]:https://github.com/Microsoft/vscode-mssql -[Microsoft Assessment and Planning]:https://www.sqlshack.com/how-to-use-microsoft-assessment-and-planning-map-toolkit-for-sql-server +[Microsoft Assessment and Planning (MAP) Toolkit]:https://www.sqlshack.com/how-to-use-microsoft-assessment-and-planning-map-toolkit-for-sql-server [mssql-scripter]:https://github.com/Microsoft/sql-xplat-cli [DBFS]:https://github.com/Microsoft/dbfs [comparator]:https://github.com/Pumpet/comparator @@ -6479,6 +6520,7 @@ A free, simple tool to draw ER diagrams by just writing code. Designed for devel [DB Ghost Change Manager Professional]:http://www.dbghost.com/products/ChangeManager.aspx [dbForge Complete]:https://www.devart.com/dbforge/sql/sqlcomplete [dbForge SQL Azure Backup]:https://www.devart.com/dbforge/sql/sqlazurebackup +[Devart Transaction Log]:https://www.devart.com/dbforge/sql/transaction-log/ [Elastic database tools]:https://docs.microsoft.com/en-us/azure/azure-sql/database/elastic-scale-get-started [Microsoft Sync Framework]:https://www.microsoft.com/en-us/download/details.aspx?id=23217 [MSSQL-Maestro]:https://www.sqlmaestro.com/products/mssql/maestro/about @@ -6509,6 +6551,7 @@ A free, simple tool to draw ER diagrams by just writing code. Designed for devel [SQLCLR Util]:http://mssql.tools/sql/SQLCLR-Util [Image To SQL]:http://mssql.tools/sql/Image-To-SQL [dbdiagram]:https://dbdiagram.io/home +[Beekeeper Studio]:https://github.com/beekeeper-studio/beekeeper-studio [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 3850cccd4302ca1d787719804dd9bb200868e0c9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 27 Nov 2020 08:43:17 +0300 Subject: [PATCH 165/553] Add TrackApiCursor XE and fix SSMS version info --- Extended_Events/TrackApiCursor.sql | 97 ++++++++++++++++++++++++++++++ SSMS/README.md | 6 +- 2 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 Extended_Events/TrackApiCursor.sql diff --git a/Extended_Events/TrackApiCursor.sql b/Extended_Events/TrackApiCursor.sql new file mode 100644 index 00000000..b91beb3f --- /dev/null +++ b/Extended_Events/TrackApiCursor.sql @@ -0,0 +1,97 @@ +/* +https://blog.pythian.com/extended-events-fetching-api-cursors/ +by Shawn Melton January 3, 2017 +*/ + +DROP EVENT SESSION TrackApiCursor ON SERVER; +GO + +CREATE EVENT SESSION TrackApiCursor ON SERVER +ADD EVENT sqlserver.cursor_close( + ACTION( + sqlserver.client_app_name, + sqlserver.database_name, + sqlserver.is_system, + sqlserver.session_id, + sqlserver.sql_text) + WHERE ( + [sqlserver].[is_system]<>(0) + -- AND [sqlserver].[client_app_name]=N'Steely-Eyed-Missle-Man' + ) +), +ADD EVENT sqlserver.cursor_open( + ACTION( + sqlserver.client_app_name, + sqlserver.database_name, + sqlserver.is_system, + sqlserver.query_hash, + sqlserver.session_id, + sqlserver.sql_text) + WHERE ( + [sqlserver].[is_system]<>(0) + -- AND [sqlserver].[client_app_name]=N'Steely-Eyed-Missle-Man' + ) +), +ADD EVENT sqlserver.rpc_completed( + ACTION( + sqlserver.client_app_name, + sqlserver.database_name, + sqlserver.is_system, + sqlserver.query_hash, + sqlserver.session_id, + sqlserver.sql_text) + WHERE ( + [sqlserver].[is_system]<>(0) + -- AND [sqlserver].[client_app_name]=N'Steely-Eyed-Missle-Man' + ) +) +ADD TARGET package0.event_file(SET filename=N'Track_api_cursor.xel') +WITH ( + MAX_DISPATCH_LATENCY=12 SECONDS, + TRACK_CAUSALITY=ON +); +GO + +ALTER EVENT SESSION TrackApiCursor ON SERVER STATE = START; +GO + +/* Read the data */ +IF OBJECT_ID('tempdb..#XEResults') IS NOT NULL + DROP TABLE #XEResults ; +GO +IF OBJECT_ID('tempdb..#XEResultsParsed') IS NOT NULL + DROP TABLE #XEResultsParsed ; +GO + +-- Create results table to load data from XE files +CREATE TABLE #XEResults +( + [RowID] INT IDENTITY + PRIMARY KEY, + [event_data] XML +); + +-- Load the event data from the file target +INSERT INTO #XEResults + ([event_data]) +SELECT CAST([event_data] AS XML) AS event_data +FROM [sys].[fn_xe_file_target_read_file](N'Track_api_cursor*xel',NULL,NULL,NULL) ; + +--SELECT * FROM #XEResults + +-- Query the Event data from the Target. +SELECT [event].[value]('(@name)[1]', 'varchar(50)') AS event_name +-- , DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), [event].[value]('(@timestamp)[1]', 'datetime2')) AS [timestamp] + ,[event].[value]('(action[@name="session_id"]/value)[1]', 'int') AS [session_id] + ,[event].[value]('(action[@name="database_name"]/value)[1]','varchar(128)') AS [database_name] + ,[event].[value]('(action[@name="client_app_name"]/value)[1]','varchar(500)') AS [client_app_name] + ,[event].[value]('(data[@name="object_name"]/value)[1]', 'varchar(50)') AS [object_name] + ,[event].[value]('(action[@name="sql_text"]/value)[1]','varchar(max)') AS [sql_text] + ,[event].[value]('(data[@name="statement"]/value)[1]', 'varchar(1000)') AS [statement] + ,[event].[value]('(action[@name="attach_activity_id_xfer"]/value)[1]', 'varchar(200)') AS [attach_activity_id_xfer] + ,[event].[value]('(action[@name="attach_activity_id"]/value)[1]', 'varchar(200)') AS [attach_activity_id] +FROM #XEResults +CROSS APPLY [event_data].[nodes]('event') AS [q] ([event]) +ORDER BY DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP),[event].[value]('(@timestamp)[1]', 'datetime2')) + ,[event].[value]('(action[@name="attach_activity_id"]/value)[1]', 'varchar(200)'); + diff --git a/SSMS/README.md b/SSMS/README.md index 876784cf..5b5f2cad 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -70,10 +70,10 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.7.1 GA Release] | **Latest GA** | 15.0.18358.0 | 2020-07-27 | 635 | -| [18.7. GA Release] | | 15.0.18357.0 | 2020-07-20 | 635 | +| [18.7.1 GA Release] | **Latest GA** | 15.0.18358.0 | 2020-10-27 | 635 | +| [18.7. GA Release] | | 15.0.18357.0 | 2020-10-20 | 635 | | [18.6 GA Release] | | 15.0.18338.0 | 2020-07-22 | 534 | -| [18.5.1 GA Release] | | 15.0.18333.0 | 2020-07-09 | 535 | +| [18.5.1 GA Release] | | 15.0.18333.0 | 2020-06-09 | 535 | | [18.5 GA Release] | | 15.0.18183.0 | 2020-04-07 | 535 | | [18.4 GA Release] | | 15.0.18206.0 | 2019-11-04 | 539 | | [18.3.1 GA Release] | | 15.0.18183.0 | 2019-10-02 | 534 | From 7ae9e79160d7d163c652026f991230f8b2170caf Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 30 Nov 2020 14:17:25 +0300 Subject: [PATCH 166/553] Add 11442 and 41317 errors --- Errors/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Errors/README.md b/Errors/README.md index c70165d1..092a7ece 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -200,6 +200,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 10314 | An error occurred in the Microsoft .NET Framework while trying to load assembly id %d. The server may … | [10314_link1],[10314_link2] | | 10637 | Cannot perform this operation on '%.*ls' with ID %I64d as one or more indexes are currently in … | [10637_link1][32] | | 10794 | The %S_MSG '%ls' is not supported with %S_MSG. | [10794_link1][39],[10794_link2] | +| 11442 | Columnstore index creation is not supported in tempdb when memory-optimized metadata mode is enabled. … | [11442_link1][51] | | 11535 | EXECUTE statement failed because its WITH RESULT SETS clause specified %d result set(s), and the … | [11535_link1][38] | | 12349 | Operation not supported for memory optimized tables having columnstore index. | [12349_link1][41] | | 13609 | JSON text is not properly formatted. Unexpected character '%lc' is found at position %d. | [13609_link1] | @@ -246,6 +247,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 35343 | The statement failed. Column '%.*ls' has a data type that cannot participate in a columnstore index. | [35343_link1][36] | | 39004 | A '%s' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x%x. | [39004_link1][14] | | 41121 | The local availability replica of availability group '%.*ls' cannot accept signal '%s' in its current …| [41121_link1] | +| 41317 | A user transaction that accesses memory optimized tables or natively compiled modules cannot access more…| [41317_link1][51] | | 41922 | The backup operation for a database with service-managed transaprent data encryption is not supported on…| [41922_link1] | [1]:https://sqlstudies.com/2018/05/16/the-trials-and-tribulations-of-reverting-from-impersonation/ @@ -298,6 +300,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [48]:https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ [49]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [50]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb +[51]: [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ From ad9923305e4c7f8fd37a8aa9bb55c21f4cbf1b92 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 1 Dec 2020 11:08:37 +0300 Subject: [PATCH 167/553] Add new awesome articles --- Articles/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 985be371..d2fe17d1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1297,6 +1297,12 @@ Articles types: | [Import data into Azure SQL database from AWS Redshift] | Rahul Mehta | 2020-11-10 | [AMZ][AZ] | | [When You’re Troubleshooting Blocking, Look at Query #2, Too.] | Brent Ozar | 2020-11-19 | [DBA][DEV] | | [Finding the One Query to Tune in a Multi-Query Batch] | Brent Ozar | 2020-11-23 | [DBA][DEV] | +| [Recursion in SQL Explained Visually] | Denis Lukichev | 2020-11-22 | [DBA][DEV] | +| [Viva la Famiglia! Stored procedure for created recursive family tree] | Brad Schulz | 2020-10-01 | [DEV] | +| [How to Set & Get the Next ID Without Serializable Isolation] | Brent Ozar | 2020-11-25 | [DBA][DEV] | +| [Discovering Three or Four Part Names in SQL Server Database Code] | Louis Davidson | 2019-03-08 | [DBA][DEV] | +| [Troubleshooting RESOURCE_SEMAPHORE_QUERY_COMPILE Helper Queries] | Eric Darling | 2020-11-24 | [DBA][DEV] | +| [When Do I Need to Use DESC in Indexes?] | Brent Ozar | 2020-11-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2568,3 +2574,9 @@ Articles types: [Import data into Azure SQL database from AWS Redshift]:https://www.sqlshack.com/import-data-into-azure-sql-database-from-aws-redshift/ [When You’re Troubleshooting Blocking, Look at Query #2, Too.]:https://www.brentozar.com/archive/2020/11/when-youre-troubleshooting-blocking-look-at-query-2-too/ [Finding the One Query to Tune in a Multi-Query Batch]:https://www.brentozar.com/archive/2020/11/finding-the-one-query-to-tune-in-a-multi-query-batch/ +[Recursion in SQL Explained Visually]:https://medium.com/swlh/recursion-in-sql-explained-graphically-679f6a0f143b +[Viva la Famiglia! Stored procedure for created recursive family tree]:https://bradsruminations.blogspot.com/2009/10/viva-la-famiglia.html +[How to Set & Get the Next ID Without Serializable Isolation]:https://www.brentozar.com/archive/2020/11/how-to-set-get-the-next-id-without-serializable-isolation/ +[Discovering Three or Four Part Names in SQL Server Database Code]:https://www.red-gate.com/simple-talk/blogs/discovering-three-or-four-part-names-in-sql-server-database-code/ +[Troubleshooting RESOURCE_SEMAPHORE_QUERY_COMPILE Helper Queries]:https://www.erikdarlingdata.com/sql-server/troubleshooting-resource_semaphore_query_compile-helper-queries/ +[When Do I Need to Use DESC in Indexes?]:https://www.brentozar.com/archive/2020/11/when-do-i-need-to-use-desc-in-indexes/ From 77cbdf54a9e67f83a45f6fe7c15f02b70d13a092 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 2 Dec 2020 11:09:37 +0300 Subject: [PATCH 168/553] Add sp_sizeoptimiser stored procedure --- Stored_Procedure/dbo.sp_SizeOptimiser.sql | 1090 +++++++++++++++++++++ 1 file changed, 1090 insertions(+) create mode 100644 Stored_Procedure/dbo.sp_SizeOptimiser.sql diff --git a/Stored_Procedure/dbo.sp_SizeOptimiser.sql b/Stored_Procedure/dbo.sp_SizeOptimiser.sql new file mode 100644 index 00000000..7693ea27 --- /dev/null +++ b/Stored_Procedure/dbo.sp_SizeOptimiser.sql @@ -0,0 +1,1090 @@ +-- EXEC [dbo].[sp_sizeoptimiser] @IncludeDatabases = N'NIIGAZ'; + +/* Cleanup existing versions */ +IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) + BEGIN + DROP PROCEDURE [dbo].[sp_sizeoptimiser]; + END + +IF EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') + BEGIN + DROP TYPE [dbo].[SizeOptimiserTableType] + END +GO + +/**************************************************************/ +/* Create user defined table type for database list parameter */ +/**************************************************************/ +IF NOT EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') + CREATE TYPE [dbo].[SizeOptimiserTableType] AS TABLE( + [database_name] [sysname] NOT NULL, + PRIMARY KEY CLUSTERED ([database_name] ASC) WITH (IGNORE_DUP_KEY = OFF)) +GO + +/***************************/ +/* Create stored procedure */ +/***************************/ +IF NOT EXISTS(SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) + BEGIN + EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_sizeoptimiser] AS'; + END; +GO + +ALTER PROCEDURE [dbo].[sp_sizeoptimiser] + @IndexNumThreshold INT = 10, + @IncludeDatabases [dbo].[SizeOptimiserTableType] READONLY, + @ExcludeDatabases [dbo].[SizeOptimiserTableType] READONLY, + @IncludeSysDatabases BIT = 0, + @IncludeSSRSDatabases BIT = 0, + @isExpress BIT = NULL + +WITH RECOMPILE +AS + SET NOCOUNT ON; + SET ANSI_NULLS ON; + SET QUOTED_IDENTIFIER ON; + + BEGIN TRY + + DECLARE @hasSparse BIT = 0, + @debug BIT = 0, + @hasTempStat BIT = 0, + @HasPersistedSamplePercent BIT = 0; + DECLARE @MajorVersion TINYINT = 0, + @CheckNumber TINYINT = 0; + DECLARE @minorVersion INT = 0; + DECLARE @LastUpdated NVARCHAR(20) = '2019-02-23', + @version NVARCHAR(50) = CAST(SERVERPROPERTY('PRODUCTVERSION') AS NVARCHAR), + @checkSQL NVARCHAR(MAX) = N'', + @msg NVARCHAR(MAX) = N''; + + --Variables for cursors + DECLARE @db_name SYSNAME; + DECLARE @tempCheckSQL NVARCHAR(MAX); + + /* Validate @IndexNumThreshold */ + IF (@IndexNumThreshold < 1 OR @IndexNumThreshold > 999) + BEGIN + SET @msg = '@IndexNumThreshold must be between 1 and 999.'; + RAISERROR(@msg, 16, 1); + END + + /* Validate database list */ + IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 AND (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 + BEGIN + SET @msg = 'Both @IncludeDatabases and @ExcludeDatabases cannot be specified.'; + RAISERROR(@msg, 16, 1); + END + + CREATE TABLE #Databases ( + [database_name] SYSNAME NOT NULL); + + /*Build database list if no parameters set*/ + IF (SELECT COUNT(*) FROM @IncludeDatabases) = 0 AND (SELECT COUNT(*) FROM @ExcludeDatabases) = 0 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM [sys].[databases] AS [sd] + WHERE ([sd].[database_id] > 4 OR @IncludeSysDatabases = 1) + AND ([sd].[name] NOT IN ('ReportServer', 'ReportServerTempDB') OR @IncludeSSRSDatabases = 1) + AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; + END; + /*Build database list from @IncludeDatabases */ + ELSE IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM @IncludeDatabases AS [d] + INNER JOIN [sys].[databases] AS [sd] ON [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '') + WHERE DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; + + IF (SELECT COUNT(*) FROM @IncludeDatabases) > (SELECT COUNT(*) FROM #Databases) + BEGIN + DECLARE @ErrorDatabaseList NVARCHAR(MAX); + + WITH ErrorDatabase AS( + SELECT [database_name] + FROM @IncludeDatabases + EXCEPT + SELECT [database_name] + FROM #Databases) + + SELECT @ErrorDatabaseList = ISNULL(@ErrorDatabaseList + N', ' + [database_name], [database_name]) + FROM ErrorDatabase; + + SET @msg = 'Supplied databases do not exist or are not accessible: ' + @ErrorDatabaseList + '.'; + RAISERROR(@msg, 16, 1); + END; + END; + /*Build database list from @ExcludeDatabases */ + ELSE IF (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM [sys].[databases] AS [sd] + WHERE NOT EXISTS (SELECT [d].[database_name] FROM @IncludeDatabases AS [d] WHERE [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '')) + AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; + END + + /* Find edition */ + IF(@isExpress IS NULL AND CAST(SERVERPROPERTY('Edition') AS VARCHAR(50)) LIKE '%express%') + BEGIN + SET @isExpress = 1; + END; + + /* Find Version */ + DECLARE @tmpVersion NVARCHAR(100); + + SET @MajorVersion = (SELECT CAST(LEFT(@version, CHARINDEX('.', @version, 0)-1) AS INT)); + SET @tmpVersion = (SELECT RIGHT(@version, LEN(@version) - CHARINDEX('.', @version, 0))); + SET @tmpVersion = (SELECT RIGHT(@tmpVersion, LEN(@tmpVersion) - CHARINDEX('.', @tmpVersion, 0))); + SET @minorVersion = (SELECT LEFT(@tmpVersion,CHARINDEX('.', @tmpVersion, 0) -1)); + + /* Check for Sparse Columns feature */ + IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_sparse' AND OBJECT_NAME(ac.object_id) = 'all_columns') + BEGIN + SET @hasSparse = 1; + END; + + /*Check for is_temp value on statistics*/ + IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_temporary' AND OBJECT_NAME(ac.object_id) = 'all_columns') + BEGIN + SET @hasTempStat = 1; + END; + + /*Check for Persisted Sample Percent update */ + IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'persisted_sample_percent' AND OBJECT_NAME(ac.object_id) = 'dm_db_stats_properties') + BEGIN + SET @HasPersistedSamplePercent = 1; + END; + + /* Print info */ + SET @msg = 'sp_optimiser'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = '------------'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = ''; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'Time: ' + CAST(GETDATE() AS NVARCHAR(50)) + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'Express Edition: ' + CAST(@isExpress AS CHAR(1)) + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'SQL Major Version: ' + CAST(@MajorVersion AS VARCHAR(5)); + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'SQL Minor Version: ' + CAST(@minorVersion AS VARCHAR(20)); + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'Sparse Columns Available: ' + CAST(@hasSparse AS CHAR(1)); + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'Persisted Sample Percent Available: ' + CAST(@HasPersistedSamplePercent AS CHAR(1)); + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = ''; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + SET @msg = 'Building results table...'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + + /*Build results table */ + IF OBJECT_ID(N'tempdb..#results') IS NOT NULL + BEGIN + DROP TABLE #results; + END; + + CREATE TABLE #results + ([check_num] INT NOT NULL, + [check_type] NVARCHAR(50) NOT NULL, + [db_name] SYSNAME NOT NULL, + [obj_type] SYSNAME NOT NULL, + [obj_name] SYSNAME NOT NULL, + [col_name] SYSNAME NULL, + [message] NVARCHAR(500) NULL, + [ref_link] NVARCHAR(500) NULL); + + /* Header row */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'Lets do this' + ,N'Vroom vroom' + ,N'beep boop' + ,N'Off to the races' + ,N'Ready set go' + ,N'Thanks for using' + ,N'https://spsizeoptimiser.lowlydba.com/'; + + RAISERROR('Running size checks...', 10, 1) WITH NOWAIT; + RAISERROR('', 10, 1) WITH NOWAIT; + + /* Date & Time Data Type Usage */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Date and Time Data Types'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''Columns storing date or time should use a temporal specific data type, but this column is using '' + ty.name + ''.'' + ,N''https://spsizeoptimiser.lowlydba.com/#time-based-formats'' + FROM sys.columns as c + inner join sys.tables as t on t.object_id = c.object_id + inner join sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND (c.name LIKE ''%date%'' OR c.name LIKE ''%time%'') + AND [c].[name] NOT LIKE ''%days%'' + AND ty.name NOT IN (''datetime'', ''datetime2'', ''datetimeoffset'', ''date'', ''smalldatetime'', ''time'');' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; --Date and Time Data Type Check + + /* Archaic varchar Lengths (255/256) */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Archaic varchar Lengths'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; WITH archaic AS ( + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] + ,QUOTENAME(c.name) AS [col_name] + ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length / 2 AS varchar(MAX)) + N'' based on requirements'' AS [message] + ,N''https://spsizeoptimiser.lowlydba.com/#arbitrary-varchar-length'' AS [ref_link] + FROM sys.columns c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''NVARCHAR'' + AND c.max_length IN (510, 512) + UNION + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length AS varchar(MAX)) + N'' based on requirements'' + ,N''https://spsizeoptimiser.lowlydba.com/#arbitrary-varchar-length'' + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''VARCHAR'' + AND c.max_length IN (255, 256)) + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,[obj_name] + ,[col_name] + ,[message] + ,[ref_link] + FROM [archaic];' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; --Archaic varchar Lengths + + /* Unspecified VARCHAR Length */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Unspecified VARCHAR Length'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + 'USE ' + [database_name] + '; + WITH UnspecifiedVarChar AS ( + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] + ,QUOTENAME(c.name) AS [col_name] + ,N''VARCHAR column without specified length, it should not have a length of '' + CAST (c.max_length AS varchar(10)) + '''' AS [message] + ,N''https://spsizeoptimiser.lowlydba.com/#unspecified-varchar-length'' AS [ref_link] + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name IN (''VARCHAR'', ''NVARCHAR'') + AND c.max_length = 1) + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,[obj_name] + ,[col_name] + ,[message] + ,[ref_link] + FROM [UnspecifiedVarChar];' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; --Unspecified VARCHAR Length + + /* Mad MAX - Varchar(MAX) */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Mad MAX VARCHAR'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''Column is NVARCHAR(MAX) which allows very large row sizes. Consider a character limit.'' + ,N''https://spsizeoptimiser.lowlydba.com/#mad-varchar-max'' + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND ty.[name] = ''nvarchar'' + AND c.max_length = -1;' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; --NVARCHAR MAX Check + + /* NVARCHAR data type in Express*/ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Use of NVARCHAR (EXPRESS).'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + IF(@isExpress = 1) + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([o].schema_id)) + ''.'' + QUOTENAME(OBJECT_NAME([o].object_id)) + ,QUOTENAME([ac].[name]) + ,N''nvarchar columns take 2x the space per char of varchar. Only use if you need Unicode characters.'' + ,N''https://spsizeoptimiser.lowlydba.com/#nvarchar-in-express'' + FROM [sys].[all_columns] AS [ac] + INNER JOIN [sys].[types] AS [t] ON [t].[user_type_id] = [ac].[user_type_id] + INNER JOIN [sys].[objects] AS [o] ON [o].object_id = [ac].object_id + WHERE [t].[name] = ''NVARCHAR'' + AND [o].[is_ms_shipped] = 0' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; + ELSE + BEGIN + RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; + END; --NVARCHAR Use Check + + /* FLOAT and REAL data types */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Use of FLOAT/REAL data types'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Best practice is to use DECIMAL/NUMERIC instead of '' + st.name + '' for non floating point math.'' + ,N''https://spsizeoptimiser.lowlydba.com/#float-and-real-data-types'' + FROM sys.all_columns AS ac + INNER JOIN sys.objects AS o ON o.object_id = ac.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE st.name IN(''FLOAT'', ''REAL'') + AND o.type_desc = ''USER_TABLE'';' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; -- FLOAT/REAL Check + + /* Deprecated data types (NTEXT, TEXT, IMAGE) */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Deprecated data types'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Deprecated data type in use: '' + st.name + ''.'' + ,N''https://spsizeoptimiser.lowlydba.com/#deprecated-data-types'' + FROM sys.all_columns AS ac + INNER JOIN sys.objects AS o ON o.object_id = ac.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE st.name IN(''NEXT'', ''TEXT'', ''IMAGE'') + AND o.type_desc = ''USER_TABLE'';' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; --Don't use deprecated data types check + + /* BIGINT for identity values in Express*/ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - BIGINT used for identity columns (EXPRESS)'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + IF(@isExpress = 1) + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''BIGINT used on IDENTITY column in SQL Express. If values will never exceed 2,147,483,647 use INT instead.'' + ,N''https://spsizeoptimiser.lowlydba.com/#bigint-as-identity'' + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''BIGINT'' + AND c.is_identity = 1;' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; -- BIGINT for identity Check + ELSE --Skip check + BEGIN + RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; + END; + + /* Numeric or decimal with 0 scale */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - NUMERIC or DECIMAL with scale of 0'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Column is '' + UPPER(st.name) + ''('' + CAST(ac.precision AS VARCHAR) + '','' + CAST(ac.scale AS VARCHAR) + '')'' + + '' . Consider using an INT variety for space reduction since the scale is 0.'' + ,N''https://spsizeoptimiser.lowlydba.com/#numeric-or-decimal-0-scale)'' + FROM sys.objects AS o + INNER JOIN sys.all_columns AS ac ON ac.object_id = o.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE ac.scale = 0 + AND ac.precision < 19 + AND st.name IN(''DECIMAL'', ''NUMERIC'');' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; -- Numeric or decimal with 0 scale check + + /* User DB or model db Growth set past 10GB - ONLY IF EXPRESS*/ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Data file growth set past 10GB (EXPRESS).'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + IF(@isExpress = 1) + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''File Growth'' + ,N''DATABASE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(DB_NAME(database_id)) + ,NULL + ,N''Database file '' + name + '' has a maximum growth set to '' + CASE + WHEN max_size = -1 + THEN ''Unlimited'' + WHEN max_size > 0 + THEN CAST((max_size / 1024) * 8 AS VARCHAR(MAX)) + END + '', which is over the user database maximum file size of 10GB.'' + ,N''https://spsizeoptimiser.lowlydba.com/#database-growth-past-10GB'' + FROM sys.master_files mf + WHERE (max_size > 1280000 OR max_size = -1) -- greater than 10GB or unlimited + AND [mf].[database_id] > 5 + AND [mf].[data_space_id] > 0 -- limit doesn''t apply to log files;' + FROM #Databases + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; -- User DB or model db Growth check + ELSE + BEGIN + RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; + END; + + /* User DB or model db growth set to % */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Data file growth set to percentage.'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'File Growth' + ,N'DATABASE' + ,QUOTENAME(DB_NAME([sd].[database_id])) + ,[mf].[name] + ,NULL + ,N'Database file '+[mf].[name]+' has growth set to % instead of a fixed amount. This may grow quickly.' + ,N'https://spsizeoptimiser.lowlydba.com/#database-growth-type' + FROM [sys].[master_files] AS [mf] + INNER JOIN [sys].[databases] AS [sd] ON [sd].[database_id] = [mf].[database_id] + INNER JOIN #Databases AS [d] ON [d].[database_name] = [sd].[name] + WHERE [mf].[is_percent_growth] = 1 + AND [mf].[data_space_id] = 1; --ignore log files + END; -- User DB or model db growth set to % Check + + /* Default fill factor (EXPRESS ONLY)*/ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Non-default fill factor (EXPRESS)'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + IF(@isExpress = 1) + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Architecture'' + ,N''INDEX'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([o].[schema_id])) + ''.'' + QUOTENAME([o].[name]) + ''.'' + QUOTENAME([i].[name]) + ,NULL + ,N''Non-default fill factor on this index. Not inherently bad, but will increase table size more quickly.'' + ,N''https://spsizeoptimiser.lowlydba.com/#default-fill-factor'' + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[objects] AS [o] ON [o].[object_id] = [i].[object_id] + WHERE [i].[fill_factor] NOT IN(0, 100);' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; + END; -- Non-default fill factor check + ELSE --Skip check + BEGIN + RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; + END; + + /* Number of indexes */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Questionable number of indexes'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + SET @checkSQL = N''; + SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Architecture'' + ,N''INDEX'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,NULL + ,''There are '' + CAST(COUNT(DISTINCT(i.index_id)) AS VARCHAR) + '' indexes on this table taking up '' + CAST(CAST(SUM(s.[used_page_count]) * 8 / 1024.00 AS DECIMAL(10, 2)) AS VARCHAR) + '' MB of space.'' + ,''https://spsizeoptimiser.lowlydba.com/#number-of-indexes'' + FROM sys.indexes AS i + INNER JOIN sys.tables AS t ON i.object_id = t.object_id + INNER JOIN sys.dm_db_partition_stats AS s ON s.object_id = i.object_id + AND s.index_id = i.index_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND i.type_desc = ''NONCLUSTERED'' --exclude clustered indexes from count + GROUP BY t.name, + t.schema_id + HAVING COUNT(DISTINCT(i.index_id)) > @IndexNumThreshold;' + FROM #Databases; + EXEC sp_executesql @checkSQL, N'@IndexNumThreshold TINYINT, @CheckNumber TINYINT', @IndexNumThreshold = @IndexNumThreshold, @CheckNumber = @CheckNumber; + END; -- Questionable number of indexes check + + /* Inefficient Indexes */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Inefficient indexes'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + BEGIN + IF OBJECT_ID('tempdb..#DuplicateIndex') IS NOT NULL + BEGIN; + DROP TABLE #DuplicateIndex; + END; + IF OBJECT_ID('tempdb..#OverlappingIndex') IS NOT NULL + BEGIN; + DROP TABLE #OverlappingIndex; + END; + + CREATE TABLE #DuplicateIndex + ([check_type] NVARCHAR(50) NOT NULL + ,[obj_type] SYSNAME NOT NULL + ,[db_name] SYSNAME NOT NULL + ,[obj_name] SYSNAME NOT NULL + ,[col_name] SYSNAME NULL + ,[message] NVARCHAR(500) NULL + ,[object_id] INT NOT NULL + ,[index_id] INT NOT NULL); + + CREATE TABLE #OverlappingIndex + ([check_type] NVARCHAR(50) NOT NULL + ,[obj_type] SYSNAME NOT NULL + ,[db_name] SYSNAME NOT NULL + ,[obj_name] SYSNAME NOT NULL + ,[col_name] SYSNAME NULL + ,[message] NVARCHAR(500) NULL + ,[object_id] INT NOT NULL + ,[index_id] INT NOT NULL); + + SET @checkSQL = + N' USE ? ; + BEGIN + IF OBJECT_ID(''tempdb..#Indexes'') IS NOT NULL + BEGIN; + DROP TABLE [#Indexes]; + END; + IF OBJECT_ID(''tempdb..#IdxChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#IdxChecksum]; + END; + IF OBJECT_ID(''tempdb..#MatchingIdxInclChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#MatchingIdxInclChecksum]; + END; + IF OBJECT_ID(''tempdb..#MatchingIdxChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#MatchingIdxChecksum]; + END; + + /* Retrieve all indexes */ + SELECT ac.[name] AS [col_name] + ,row_number () OVER (PARTITION BY ind.[object_id], ind.index_id ORDER BY indc.index_column_id ) AS row_num + ,ind.index_id + ,ind.[object_id] + ,DENSE_RANK() OVER (ORDER BY ind.[object_id], ind.index_id) AS [index_num] + ,indc.is_included_column + ,NULL AS [ix_checksum] + ,NULL AS [ix_incl_checksum] + ,ao.[schema_id] + INTO #Indexes + FROM sys.indexes as [ind] + INNER JOIN sys.index_columns AS [indc] ON [ind].[object_id] = [indc].[object_id] AND ind.index_id = indc.index_id + INNER JOIN sys.all_columns as [ac] ON [ac].[column_id] = [indc].[column_id] and indc.[object_id] = ac.[object_id] + INNER JOIN sys.all_objects AS [ao] ON [ao].[object_id] = [ac].[object_id] + WHERE ao.is_ms_shipped = 0 + ORDER BY ind.[object_id]; + + DECLARE @Counter BIGINT = (SELECT 1); + DECLARE @MaxNumIndex BIGINT = (SELECT MAX(Index_num) FROM #Indexes); + + /* Iterate through each index, adding together columns for each */ + WHILE @Counter <= @MaxNumIndex + BEGIN + DECLARE @IndexedColumns NVARCHAR(MAX) = N''''; + DECLARE @IndexedColumnsInclude NVARCHAR(MAX) = N''''; + + /* Add together index columns */ + SELECT @IndexedColumns += CAST([col_name] AS SYSNAME) + FROM #Indexes + WHERE is_included_column = 0 + AND index_num = @Counter + ORDER BY row_num; + + /* Add together index + included columns */ + SELECT @IndexedColumnsInclude += CAST([col_name] AS SYSNAME) + FROM #Indexes + WHERE index_num = @Counter + ORDER BY row_num; + + /* Generate a checksum for index columns + and index + included columns for each index */ + UPDATE #Indexes + SET [ix_checksum] = CHECKSUM(@IndexedColumns), [ix_incl_checksum] = CHECKSUM(@IndexedColumnsInclude) + WHERE index_num = @Counter; + + SET @COUNTER += 1; + END; + + /* Narrow down to one row per index */ + SELECT DISTINCT [object_id], index_id, [ix_checksum], [ix_incl_checksum], [schema_id] + INTO #IdxChecksum + FROM #Indexes; + + /* Find duplicate indexes */ + SELECT COUNT(*) AS [num_dup_indexes], [ix_incl_checksum], [object_id] + INTO #MatchingIdxInclChecksum + FROM #IdxChecksum + GROUP BY [ix_incl_checksum], [object_id] + HAVING COUNT(*) > 1; + + /* Find overlapping indexes with same indexed columns */ + SELECT COUNT(*) AS [num_dup_indexes], [ix_checksum], [object_id] + INTO #MatchingIdxChecksum + FROM #IdxChecksum + GROUP BY [ix_checksum], [object_id] + HAVING COUNT(*) > 1 + + INSERT INTO #DuplicateIndex + SELECT N''Inefficient Indexes - Duplicate'' AS [check_type] + ,N''INDEX'' AS [obj_type] + ,QUOTENAME(DB_NAME()) AS [db_name] + ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] + ,NULL AS [col_name] + ,''Indexes in group '' + CAST(DENSE_RANK() over (order by miic.[ix_incl_checksum]) AS VARCHAR(5)) + '' share the same indexed and any included columns.'' AS [message] + ,ic.[object_id] + ,ic.[index_id] + FROM #MatchingIdxInclChecksum AS miic + INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = miic.[object_id] AND ic.[ix_incl_checksum] = miic.[ix_incl_checksum] + INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] + + INSERT INTO #OverlappingIndex + SELECT N''Inefficient Indexes - Overlapping'' AS [check_type] + ,N''INDEX'' AS [obj_type] + ,QUOTENAME(DB_NAME()) AS [db_name] + ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] + ,NULL AS [col_name] + ,''Indexes in group '' + CAST(DENSE_RANK() OVER (order by mic.[ix_checksum]) AS VARCHAR(5)) + '' share the same indexed columns.'' AS [message] + ,ic.[object_id] + ,ic.[index_id] + FROM #MatchingIdxChecksum AS mic + INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = mic.[object_id] AND ic.[ix_checksum] = mic.[ix_checksum] + INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] + /* Dont include any indexes that are already identified as 100% duplicates */ + WHERE NOT EXISTS (SELECT * FROM #DuplicateIndex AS [di] WHERE [di].[object_id] = ic.[object_id] AND di.index_id = ic.index_id); + END' + + DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD + FOR SELECT QUOTENAME([database_name]) + FROM #Databases; + + OPEN [DB_Cursor]; + + FETCH NEXT FROM [DB_Cursor] + INTO @db_name + + /* Run index query for each database */ + WHILE @@FETCH_STATUS = 0 + BEGIN + SET @tempCheckSQL = REPLACE(@checkSQL, N'?', @db_name); + EXEC sp_executesql @tempCheckSQL; + FETCH NEXT FROM [DB_Cursor] + INTO @db_name; + END; + CLOSE [DB_Cursor]; + DEALLOCATE [DB_Cursor]; + + /* Duplicate Indexes */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,[check_type] + ,[obj_type] + ,[db_name] + ,[obj_name] + ,[col_name] + ,[message] + ,N'https://spsizeoptimiser.lowlydba.com/#inefficient-indexes' + FROM #DuplicateIndex; + + /* Overlapping Indexes */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,[check_type] + ,[obj_type] + ,[db_name] + ,[obj_name] + ,[col_name] + ,[message] + ,N'https://spsizeoptimiser.lowlydba.com/#inefficient-indexes' + FROM #OverlappingIndex; + + END; -- Inefficient indexes check + + /* Sparse columns */ + SET @CheckNumber = @CheckNumber + 1; + SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Sparse column eligibility'; + RAISERROR(@msg, 10, 1) WITH NOWAIT; + IF @hasSparse = 1 + BEGIN + IF OBJECT_ID('tempdb..#SparseTypes') IS NOT NULL + BEGIN; + DROP TABLE [#SparseTypes]; + END; + IF OBJECT_ID('tempdb..#Stats') IS NOT NULL + BEGIN; + DROP TABLE [#Stats]; + END; + IF OBJECT_ID('tempdb..#StatsHeaderStaging') IS NOT NULL + BEGIN; + DROP TABLE [#StatsHeaderStaging]; + END; + IF OBJECT_ID('tempdb..#StatHistogramStaging') IS NOT NULL + BEGIN; + DROP TABLE [#StatHistogramStaging]; + END; + + CREATE TABLE #SparseTypes ( + [ID] INT IDENTITY(1,1) NOT NULL, + [name] VARCHAR(20), + [user_type_ID] INT, + [scale] TINYINT NULL, + [precision] TINYINT NOT NULL, + [threshold_null_perc] TINYINT NOT NULL); + + CREATE CLUSTERED INDEX cidx_#sparsetypes ON #SparseTypes([ID]); + + /* Reference values for when it makes sense to use the sparse feature based on 40% minimum space savings + including if those recommendations change based on scale / precision. Conservative estimates are used + when a column is in between the high and low values in the table. + https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns?view=sql-server-2017#estimated-space-savings-by-data-type */ + INSERT INTO #SparseTypes ([name], [user_type_ID], [scale], [precision], [threshold_null_perc]) + VALUES ('BIT',104, 0,0, 98), + ('TINYINT',48, 0,0, 86), + ('SMALLINT',52, 0,0, 76), + ('INT',56, 0,0, 64), + ('BIGINT',127, 0,0, 52), + ('REAL',59, 0,0, 64), + ('FLOAT',62, 0,0, 52), + ('SMALLMONEY',122, 0,0, 64), + ('MONEY',60, 0,0, 52), + ('SMALLDATETIME',58, 0,0, 64), + ('DATETIME',61, 0,0, 52), + ('UNIQUEIDENTIFIER',36, 0,0, 43), + ('DATE',40, 0,0, 69), + ('DATETIME2',42, 0,0, 57), + ('DATETIME2',42, 7,0, 52), + ('TIME',41, 0,0, 69), + ('TIME',41, 7,0, 60), + ('DATETIMEOFFSET',43, 0,0, 52), + ('DATETIMEOFFSET',43, 7,0, 49), + ('VARCHAR',167, 0,0, 60), + ('CHAR',175, 0,0, 60), + ('NVARCHAR',231, 0,0, 60), + ('NCHAR',239, 0,0, 60), + ('VARBINARY',165, 0,0, 60), + ('BINARY',173, 0,0, 60), + ('XML',241, 0,0, 60), + ('HIERARCHYID',128, 0,0, 60), + ('DECIMAL', 106, NULL, 1, 60), + ('DECIMAL', 106, NULL, 38, 42), + ('NUMERIC', 108, NULL, 1, 60), + ('NUMERIC', 108, NULL, 38, 42); + + --For STAT_HEADER data + CREATE TABLE #StatsHeaderStaging ( + [name] SYSNAME + ,[updated] DATETIME2(0) + ,[rows] BIGINT + ,[rows_sampled] BIGINT + ,[steps] INT + ,[density] DECIMAL(6,3) + ,[average_key_length] DECIMAL(5,2) + ,[string_index] VARCHAR(10) + ,[filter_expression] nvarchar(max) + ,[unfiltered_rows] BIGINT); + + --Check for extra persisted sample percent column + IF @HasPersistedSamplePercent = 1 + BEGIN + ALTER TABLE #StatsHeaderStaging + ADD [persisted_sample_percent] INT; + END; + + --For HISTOGRAM data + CREATE TABLE #StatHistogramStaging ( + [range_hi_key] NVARCHAR(MAX) + ,[range_rows] BIGINT + ,[eq_rows] DECIMAL(38,2) + ,[distinct_range_rows] BIGINT + ,[avg_range_rows] BIGINT); + + --For combined DBCC stat data (SHOW_STAT + HISTOGRAM) + CREATE TABLE #Stats ( + [stats_id] INT IDENTITY(1,1) + ,[db_name] SYSNAME + ,[stat_name] SYSNAME + ,[stat_updated] DATETIME2(0) + ,[rows] BIGINT + ,[rows_sampled] BIGINT + ,[schema_name] SYSNAME + ,[table_name] SYSNAME NULL + ,[col_name] SYSNAME NULL + ,[eq_rows] BIGINT NULL + ,[null_perc] AS CAST([eq_rows] AS DECIMAL (38,2)) /[rows] * 100 + ,[threshold_null_perc] SMALLINT); + + CREATE CLUSTERED INDEX cidx_#stats ON #Stats([stats_id]); + + SET @checkSQL = + N' USE ?; + BEGIN + DECLARE @schemaName SYSNAME + ,@tableName SYSNAME + ,@statName SYSNAME + ,@colName SYSNAME + ,@threshold_null_perc SMALLINT; + + DECLARE @DBCCSQL NVARCHAR(MAX) = N''''; + DECLARE @DBCCStatSQL NVARCHAR(MAX) = N''''; + DECLARE @DBCCHistSQL NVARCHAR(MAX) = N''''; + + DECLARE [DBCC_Cursor] CURSOR LOCAL FAST_FORWARD + FOR + SELECT DISTINCT sch.name AS [schema_name] + ,t.name AS [table_name] + ,s.name AS [stat_name] + ,ac.name AS [col_name] + ,threshold_null_perc + FROM [sys].[stats] AS [s] + INNER JOIN [sys].[stats_columns] AS [sc] on sc.stats_id = s.stats_id + INNER JOIN [sys].[tables] AS [t] on t.object_id = s.object_id + INNER JOIN [sys].[schemas] AS [sch] on sch.schema_id = t.schema_id + INNER JOIN [sys].[all_columns] AS [ac] on ac.column_id = sc.column_id + AND [ac].[object_id] = [t].[object_id] + AND [ac].[object_id] = [sc].[object_id] + INNER JOIN [sys].[types] AS [typ] ON [typ].[user_type_id] = [ac].[user_type_id] + LEFT JOIN [sys].[indexes] AS [i] ON i.object_id = t.object_id + AND i.name = s.name + LEFT JOIN [sys].[index_columns] AS [ic] ON [ic].[object_id] = [i].[object_id] + AND [ic].[column_id] = [ac].[column_id] + AND ic.index_id = i.index_id ' + + /* Special considerations for variable length data types */ + + N'INNER JOIN [#SparseTypes] AS [st] ON [st].[user_type_id] = [typ].[user_type_id] + AND (typ.name NOT IN (''DECIMAL'', ''NUMERIC'', ''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'')) + OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND st.precision = ac.precision AND st.precision = 1) + OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND ac.precision > 1 AND st.precision = 38) + OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND st.scale = ac.scale AND st.scale = 0) + OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND ac.scale > 0 AND st.scale = 7) + WHERE [sc].[stats_column_id] = 1 + AND [s].[has_filter] = 0 + AND [s].[no_recompute] = 0 + AND [ac].[is_nullable] = 1 '; + + IF @hasTempStat = 1 + BEGIN + SET @checkSQL = @checkSQL + N'AND [s].[is_temporary] = 0 '; + END + + SET @checkSQL = @checkSQL + N'AND ([ic].[index_column_id] = 1 OR [ic].[index_column_id] IS NULL) + AND ([i].[type_desc] =''NONCLUSTERED'' OR [i].[type_desc] IS NULL); + + OPEN [DBCC_Cursor]; + + FETCH NEXT FROM [DBCC_Cursor] + INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; + + WHILE @@FETCH_STATUS = 0 + BEGIN; + DECLARE @SchemaTableName SYSNAME = QUOTENAME(@schemaName) + ''.'' + QUOTENAME(@tableName); ' + + + /* Build DBCC statistics queries */ + + N'SET @DBCCSQL = N''DBCC SHOW_STATISTICS(@SchemaTableName, @statName)''; + SET @DBCCStatSQL = @DBCCSQL + '' WITH STAT_HEADER, NO_INFOMSGS;''; + SET @DBCCHistSQL = @DBCCSQL + '' WITH HISTOGRAM, NO_INFOMSGS;''; ' + + + /* Stat Header temp table*/ + + N'INSERT INTO #StatsHeaderStaging + EXEC sp_executesql @DBCCStatSQL + ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' + ,@SchemaTableName = @SchemaTableName + ,@statName = @statName; ' + + + /* Histogram temp table*/ + + N'INSERT INTO #StatHistogramStaging + EXEC sp_executesql @DBCCHistSQL + ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' + ,@SchemaTableName = @SchemaTableName + ,@statName = @statName; + + INSERT INTO #Stats + SELECT QUOTENAME(DB_NAME()) + ,[head].[name] + ,[head].[updated] + ,[head].[rows] + ,[head].[rows_Sampled] + ,@schemaName + ,@tableName + ,@colName + ,[hist].[eq_rows] + ,@threshold_null_perc + FROM #StatsHeaderStaging head + CROSS APPLY #StatHistogramStaging hist + WHERE hist.RANGE_HI_KEY IS NULL + AND hist.eq_rows > 0 + AND head.Unfiltered_rows > 0 + AND head.rows > 1000; + + TRUNCATE TABLE #StatsHeaderStaging; + TRUNCATE TABLE #StatHistogramStaging; + + FETCH NEXT FROM DBCC_Cursor + INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; + END; + CLOSE [DBCC_Cursor]; + DEALLOCATE [DBCC_Cursor]; + END;' + + DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD + FOR SELECT QUOTENAME([database_name]) + FROM #Databases; + + OPEN [DB_Cursor]; + + FETCH NEXT FROM [DB_Cursor] + INTO @db_name; + + /* Run stat query for each database */ + WHILE @@FETCH_STATUS = 0 + BEGIN + SET @tempCheckSQL = REPLACE(@checkSQL, N'?', @db_name); + EXEC sp_executesql @tempCheckSQL; + FETCH NEXT FROM [DB_Cursor] + INTO @db_name; + END; + CLOSE [DB_Cursor]; + DEALLOCATE [DB_Cursor]; + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'Architecture' + ,N'USER_TABLE' + ,QUOTENAME([db_name]) as "db_name" + ,QUOTENAME([schema_name]) + '.' + QUOTENAME([table_name]) + ,QUOTENAME([col_name]) + ,N'Candidate for converting to a space-saving sparse column based on NULL distribution of more than ' + CAST(threshold_null_perc AS VARCHAR(3))+ ' percent.' + ,N'https://spsizeoptimiser.lowlydba.com/#sparse-columns' + FROM #stats + WHERE [null_perc] >= [threshold_null_perc]; + END; -- Should sparse columns be used check + ELSE + BEGIN; + RAISERROR(' Skipping check, sparse columns not available in this version...', 10, 1) WITH NOWAIT; + END; + + /* Wrap it up */ + SELECT * + FROM #results + ORDER BY check_num, [check_type], [message], [db_name], obj_type, obj_name, [col_name]; + + RAISERROR('', 10, 1) WITH NOWAIT; + RAISERROR('Done!', 10, 1) WITH NOWAIT; + + END TRY + + BEGIN CATCH; + BEGIN + DECLARE @ErrorNumber INT = ERROR_NUMBER(); + DECLARE @ErrorLine INT = ERROR_LINE(); + DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE(); + DECLARE @ErrorSeverity INT = ERROR_SEVERITY(); + DECLARE @ErrorState INT = ERROR_STATE(); + + IF (@debug = 1) + BEGIN + PRINT 'Actual error number: ' + CAST(@ErrorNumber AS VARCHAR(10)); + PRINT 'Actual line number: ' + CAST(@ErrorLine AS VARCHAR(10)); + PRINT 'Check number: ' + CAST(@CheckNumber AS VARCHAR(10)); + END + + RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState) WITH NOWAIT; + END + END CATCH; +GO \ No newline at end of file From d64c35b265fedb73d8bd643382086773e385b094 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 3 Dec 2020 08:37:49 +0300 Subject: [PATCH 169/553] Add new articles --- Articles/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d2fe17d1..87b51cf5 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1303,6 +1303,10 @@ Articles types: | [Discovering Three or Four Part Names in SQL Server Database Code] | Louis Davidson | 2019-03-08 | [DBA][DEV] | | [Troubleshooting RESOURCE_SEMAPHORE_QUERY_COMPILE Helper Queries] | Eric Darling | 2020-11-24 | [DBA][DEV] | | [When Do I Need to Use DESC in Indexes?] | Brent Ozar | 2020-11-30 | [DBA][DEV] | +| [Export Power BI Desktop data to SQL Server] | Rui Romano | 2016-04-21 | [DBA][DEV] | +| [Exploring errors to reveal unauthorized information] | Fabiano Amorim | 2020-10-19 | [SEC] | +| [How to run your CTE just once, and re-use the output] | Daniel Hutmacher | 2020-12-01 | [DBA][DEV] | +| [Documenting SSIS Packages using Sequence Diagrams] | Aveek Das | 2020-11-25 | [SSIS] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2580,3 +2584,7 @@ Articles types: [Discovering Three or Four Part Names in SQL Server Database Code]:https://www.red-gate.com/simple-talk/blogs/discovering-three-or-four-part-names-in-sql-server-database-code/ [Troubleshooting RESOURCE_SEMAPHORE_QUERY_COMPILE Helper Queries]:https://www.erikdarlingdata.com/sql-server/troubleshooting-resource_semaphore_query_compile-helper-queries/ [When Do I Need to Use DESC in Indexes?]:https://www.brentozar.com/archive/2020/11/when-do-i-need-to-use-desc-in-indexes/ +[Export Power BI Desktop data to SQL Server]:https://ruiromanoblog.wordpress.com/2016/04/21/use-power-bi-desktop-as-an-etl-tool/ +[Exploring errors to reveal unauthorized information]:https://www.red-gate.com/simple-talk/sql/database-administration/exploring-errors-to-reveal-unauthorized-information/ +[How to run your CTE just once, and re-use the output]:https://sqlsunday.com/2020/12/01/run-your-cte-just-once-and-reuse-output/ +[Documenting SSIS Packages using Sequence Diagrams]:https://www.sqlshack.com/documenting-ssis-packages-using-sequence-diagrams-2/ From 09260b0cd9e6c50b2d851885c330b6f5085102a8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 4 Dec 2020 08:40:18 +0300 Subject: [PATCH 170/553] Add PowerBIETL link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0fba61bb..70cd0dd2 100644 --- a/README.md +++ b/README.md @@ -515,6 +515,7 @@ BIML Bloggers - [Powershell xSQLServer module contains DSC resources for deployment and configuration of SQL Server](https://github.com/PowerShell/xSQLServer) (Github by Microsoft) - [Export-DMVInformation - Export the resuts from Glenn Berry's DMV queries directly to Excel](https://github.com/sanderstad/Export-DMVInformation/) (Github) (by Sander Stad) - [Export-QueryToSQLTable - Export one or more query results run against one or more instances/databases to table](https://github.com/SQLJana/Export-QueryToSQLTable) (by Jana Sattainathan) (Github) + - [PowerBIETL - a developer tool to quickly load a SQL Database using PowerBIDesktop queries](https://www.powershellgallery.com/packages/PowerBIETL/) (by DevScope) **[⬆ back to top](#table-of-contents)** From 4eaee78b93fa2e798e25ef8df4f7d928fa68a1e1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 5 Dec 2020 08:48:48 +0300 Subject: [PATCH 171/553] Add SSMS 18.7.1 default settings --- .../NewSettings_Default_18.7.1.vssettings | 995 ++++++++++++++++++ 1 file changed, 995 insertions(+) create mode 100644 SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings diff --git a/SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings b/SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings new file mode 100644 index 00000000..89953e17 --- /dev/null +++ b/SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings @@ -0,0 +1,995 @@ + + true + false + true + false + true + false + true + true + true + 0 + 0 + + true + true + true + false + + 5 + 0 + 10 + true + true + true + false + false + true + 10 + + false + + %vsspv_settings_directory%\NewSettings.vssettings + + %vsspv_user_appdata%\Documents\SQL Server Management Studio + true + true + true + 4 + 4 + true + %vsspv_visualstudio_dir%\Templates\ItemTemplates + false + true + 1 + 0 + 1 + %vsspv_visualstudio_dir%\Templates\ProjectTemplates + true + 4 + true + + false + + HACK:2 + TODO:2 + UNDONE:2 + UnresolvedMergeConflict:3 + + false + false + + https://docs.microsoft.com/sql/ssms/tutorials/tutorial-sql-server-management-studio + 1 + C:\Windows\system32\notepad.exe + https://www.bing.com + + true + true + 0 + true + true + false + true + false + true + true + + 4 + true + true + true + true + 2 + true + true + true + false + false + true + true + false + false + true + true + 58 + false + false + 4 + true + true + true + true + + 4 + true + true + true + true + 1 + true + true + false + false + false + true + true + true + true + true + true + 58 + false + false + 4 + true + true + true + true + + 4 + true + true + true + true + 1 + true + true + false + false + false + true + true + true + true + true + true + 58 + false + false + 4 + false + true + true + true + + 4 + true + true + true + true + 2 + true + true + false + false + false + true + true + true + true + true + true + 58 + false + false + 4 + false + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + true + + true + true + true + false + false + false + true + false + false + false + false + true + true + true + true + false + false + true + true + false + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + true + false + + 0 + 0 + + + + True + <ExtensionRepositoryConfigList Capacity="0" xmlns="clr-namespace:Microsoft.VisualStudio.ExtensionManager;assembly=Microsoft.VisualStudio.ExtensionEngine" /> + True + + + + false + true + false + 2 + {B1BA9461-FC54-45B3-A484-CB6DD0B95C94} + 0 + + 2 + + + + + + + + + + + + + + + + + + 15.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + Ctrl+Shift+F + Ctrl+Shift+L + Ctrl+F1 + Ctrl+\, Ctrl+T + Ctrl+\, T + F7 + + Ctrl+T + Ctrl+K, Ctrl+C + Ctrl+Shift+L + Ctrl+Shift+L + Ctrl+Shift+L + Ctrl+Shift+L + Ctrl+Shift+L + Ctrl+Shift+L + Ctrl+Shift+U + Ctrl+Shift+U + Ctrl+Shift+U + Ctrl+Shift+U + Ctrl+Shift+U + Ctrl+Shift+U + Ctrl+K, Ctrl+U + Ctrl+Shift+T + Ctrl+Alt+N + Ctrl+N + Ctrl+F1 + Ctrl+L + F5 + Ctrl+E + F5 + Ctrl+E + Alt+X + F5 + Ctrl+E + F5 + Ctrl+E + F5 + Ctrl+E + Ctrl+M + Shift+Alt+S + Alt+F8 + Ctrl+Shift+F + Ctrl+Shift+F + Ctrl+D + Ctrl+D + Ctrl+T + Ctrl+T + Ctrl+Shift+M + F8 + F7 + F5 + Ctrl+Alt+K + Ctrl+Alt+T + F6 + Shift+F6 + Ctrl+R + Ctrl+R + Ctrl+R + Ctrl+R + Ctrl+R + + + + false + false + + false + false + true + false + false + false + true + false + false + false + false + true + true + true + true + false + false + true + true + false + true + false + {B1BA9461-FC54-45B3-A484-CB6DD0B95C94} + 0 + + false + + 0 + 1 + + true + false + + + + + + + + + + false + true + false + + true + true + + True + False + True + True + True + True + False + False + True + False + + false + 1 + 0 + 0 + 0 + 0 + + MatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=0 NameOnly=0 Append=0 Plain Files Find + MatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=0 NameOnly=0 Append=0 Plain Solution Find + MatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + Regex + 0 + 0 + + 7 + NoToolWin|Design + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1101011110101111100010000000001001101001000000167577360473600210110111000015001500150010001000100020002000500010000100002501000500125100011001111111111000011100100110000000010120482530001001110000010100110101011132768819211011010000000115010https://referencesource.microsoft.com/symbolshttps://msdl.microsoft.com/download/symbols + True + True + 1048576 + 0 + True + + True + True + True + 8, 8 + SnapLines + True + True + True + True + + None + False + True + True + True + True + True + True + True + True + %VsInstallDir%\xml\Schemas + \ No newline at end of file From d8bc14d51fb11ae6a65cfeef498741b9a3802dda Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 6 Dec 2020 09:13:21 +0300 Subject: [PATCH 172/553] Update SSMS settings info --- README.md | 2 +- ...wSettings_Default_18.7.1(15.0.18358).vssettings} | 0 SSMS/SSMS_vssettings/README.md | 13 +++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) rename SSMS/SSMS_vssettings/{NewSettings_Default_18.7.1.vssettings => NewSettings_Default_18.7.1(15.0.18358).vssettings} (100%) diff --git a/README.md b/README.md index 70cd0dd2..7aa1668f 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [udf_SplitStringByDelimiter](/User_Defined_Function/udf_SplitStringByDelimiter.sql) - [udf_Tally](/User_Defined_Function/udf_Tally.sql) - and many others... - - [Utilities](/Utilities) (**Complete list of 384 SQL Server paid and free Utilities and Tools**) + - [Utilities](/Utilities) (**Complete list of 393 SQL Server paid and free Utilities and Tools**) **[⬆ back to top](#table-of-contents)** diff --git a/SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings b/SSMS/SSMS_vssettings/NewSettings_Default_18.7.1(15.0.18358).vssettings similarity index 100% rename from SSMS/SSMS_vssettings/NewSettings_Default_18.7.1.vssettings rename to SSMS/SSMS_vssettings/NewSettings_Default_18.7.1(15.0.18358).vssettings diff --git a/SSMS/SSMS_vssettings/README.md b/SSMS/SSMS_vssettings/README.md index 326a63c8..d12a61f1 100644 --- a/SSMS/SSMS_vssettings/README.md +++ b/SSMS/SSMS_vssettings/README.md @@ -1,6 +1,11 @@ # SSMS settings files +In files with `_Default_` you can find defaults SSMS settings for different SSMS version. +For import settings files see **tip 1** in [SSMS tips](https://github.com/ktaranov/sqlserver-kit/blob/master/SSMS/SSMS_Tips.md#1) guide. - - [NewSettings_17.2(14.0.17177).vssettings](/NewSettings_17.2(14.0.17177).vssettings) - - [NewSettings_2014(12.0.5556).vssettings](/NewSettings_2014(12.0.5556).vssettings) - - [NewSettings_Default_17.2(14.0.17177).vssettings](/NewSettings_Default_17.2(14.0.17177).vssettings) - - [NewSettings_Default_2014(12.0.5556).vssettings](/NewSettings_Default_2014(12.0.5556).vssettings) +- [AB.DarkScheme.LargeFonts.vssettings](/AB.DarkScheme.LargeFonts.vssettings) +- [AB.DarkScheme.NormalFonts.vssettings](/AB.DarkScheme.NormalFonts.vssettings) +- [NewSettings_17.2(14.0.17177).vssettings](/NewSettings_17.2(14.0.17177).vssettings) +- [NewSettings_2014(12.0.5556).vssettings](/NewSettings_2014(12.0.5556).vssettings) +- [NewSettings_Default_17.2(14.0.17177).vssettings](/NewSettings_Default_17.2(14.0.17177).vssettings) +- [NewSettings_Default_18.7.1(15.0.18358).vssettings](/NewSettings_Default_18.7.1(15.0.18358).vssettings) +- [NewSettings_Default_2014(12.0.5556).vssettings](/NewSettings_Default_2014(12.0.5556).vssettings) From 8d2129b4c72dc0591bca08fb42c74b27728c7c69 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 7 Dec 2020 23:22:11 +0300 Subject: [PATCH 173/553] Add my SSMS settings --- .../ktaranov_18.7.1.vssettings | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 SSMS/SSMS_vssettings/ktaranov_18.7.1.vssettings diff --git a/SSMS/SSMS_vssettings/ktaranov_18.7.1.vssettings b/SSMS/SSMS_vssettings/ktaranov_18.7.1.vssettings new file mode 100644 index 00000000..03301c74 --- /dev/null +++ b/SSMS/SSMS_vssettings/ktaranov_18.7.1.vssettings @@ -0,0 +1,124 @@ +truefalsetruefalsetruefalsetruetruetrue10truetruetruefalse56553510truetruetruetruefalsetrue10%vsspv_user_appdata%\Documents\SQL Server Management Studiotruetruetrue44true%vsspv_visualstudio_dir%\Templates\ItemTemplatesfalsetrue101%vsspv_visualstudio_dir%\Templates\ProjectTemplatestrue2truefalseHACK:2TODO:2UNDONE:2UnresolvedMergeConflict:3falsefalse + https://docs.microsoft.com/sql/ssms/tutorials/tutorial-sql-server-management-studio + 1 + C:\Windows\system32\notepad.exe + https://www.bing.com + truetrue0truetruefalsetruefalsetruetrue4truetruetruetrue2truetruetruefalsefalsetruetruefalsefalsetruetrue58truefalse4truetruefalsetrue4truetruetruetrue1truetruetruefalsefalsetruetruefalsetruetruetrue58truefalse4truetruefalsetrue4truetruetruetrue1truetruetruefalsefalsetruetruefalsetruetruetrue58truefalse4truetruefalsetrue4truetruetruetrue2truetruetruefalsefalsetruetruefalsetruetruetrue58truefalse4truetruefalsetrue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + truefalsetruetruetruetruefalsefalsefalsetruefalsefalsefalsefalsetruetruetruetruefalsefalsetruetruefalsetruefalsefalsetruefalse00True<ExtensionRepositoryConfigList Capacity="0" xmlns="clr-namespace:Microsoft.VisualStudio.ExtensionManager;assembly=Microsoft.VisualStudio.ExtensionEngine" />Truefalsetruefalse2{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}0215.0.0.0Ctrl+Shift+LCtrl+F1Ctrl+\, Ctrl+TCtrl+\, TCtrl+TCtrl+K, Ctrl+CCtrl+Shift+LCtrl+Shift+LCtrl+Shift+LCtrl+Shift+LCtrl+Shift+LCtrl+Shift+LCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+Shift+UCtrl+K, Ctrl+UCtrl+Shift+TCtrl+Alt+NCtrl+NCtrl+F1Ctrl+LF5Ctrl+EF5Ctrl+EAlt+XF5Ctrl+EF5Ctrl+EF5Ctrl+ECtrl+MShift+Alt+SAlt+F8Ctrl+Shift+FCtrl+Shift+FCtrl+DCtrl+DCtrl+TCtrl+TCtrl+Shift+MF8F7F5Ctrl+Alt+KCtrl+Alt+TF6Shift+F6Ctrl+RCtrl+RCtrl+RCtrl+RCtrl+Rfalsefalsefalsefalsetruefalsefalsefalsetruefalsefalsefalsefalsetruetruetruetruefalsefalsetruetruefalsetruefalse{B1BA9461-FC54-45B3-A484-CB6DD0B95C94}0false01truefalsefalsetruefalsetruetrueTrueFalseTrueTrueTrueTrueFalseFalseTrueTrueTrue + false + 1 + 0 + 0 + 0 + 0 + MatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=0 NameOnly=0 Append=0 Plain Files FindMatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=1 KeepOpen=0 NameOnly=0 Append=0 Plain Solution FindMatchCase=0 WholeWord=0 Hidden=0 Up=0 Selection=0 Block=0 KeepCase=0 SubFolders=0 KeepOpen=0 NameOnly=0 Append=0 Plain Document Find1111111111111111Regex007NoToolWin|Design1101011110101111100010000000001001101001000000167577360473600210110111000015001500150010001000100020002000500010000100002501000500125100011001111111111000011100100110000000010120482530001001110000010100110101011132768819211011010000000115010https://referencesource.microsoft.com/symbolshttps://msdl.microsoft.com/download/symbolsTrueTrue10485760True + True + True + True + 8, 8 + SnapLines + True + True + True + True + NoneFalseTrueTrueTrueTrueTrueTrueTrueTrue%VsInstallDir%\xml\Schemas \ No newline at end of file From 401882efe0311d1802d4dcdda6ed421df7143ab5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 8 Dec 2020 00:38:12 +0300 Subject: [PATCH 174/553] Update SSMS tips --- SSMS/SSMS_Tips.md | 207 +++++++++++++++++---------------- SSMS/SSMS_vssettings/README.md | 2 + 2 files changed, 109 insertions(+), 100 deletions(-) diff --git a/SSMS/SSMS_Tips.md b/SSMS/SSMS_Tips.md index f955149a..8e41561d 100644 --- a/SSMS/SSMS_Tips.md +++ b/SSMS/SSMS_Tips.md @@ -61,37 +61,38 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a **Great thanks to**: - - Kendra Little ([b](http://www.littlekendra.com/) | [t](https://twitter.com/Kendra_Little)) - - Slava Murygin ([b](http://slavasql.blogspot.ru/)) - - Mike Milligan ([b](http://www.bidn.com/Blogs/userid/43/author/mike-milligan)) - - Kenneth Fisher ([b](https://twitter.com/sqlstudent144) | [t](https://twitter.com/sqlstudent144)) - - William Durkin ([b](http://www.williamdurkin.com/) | [t](https://twitter.com/sql_williamd)) - - John Morehouse ([b](http://sqlrus.com/) | [t](http://twitter.com/sqlrus)) - - Phil Factor ([b](https://www.red-gate.com/simple-talk/author/phil-factor/) | [t](https://twitter.com/phil_factor)) - - Klaus Aschenbrenner ([b](https://www.sqlpassion.at/) | [t](https://twitter.com/Aschenbrenner)) - - Latish Sehgal ([b](http://www.dotnetsurfers.com/)) - - Arvind Shyamsundar ([b](https://blogs.msdn.microsoft.com/arvindsh/)) - - [SQLMatters](http://www.sqlmatters.com/) - - [MSSQLTips](https://www.mssqltips.com/) - - Anthony Zanevsky, Andrew Zanevsky and Katrin Zanevsky - - Andy Mallon ([b](http://www.am2.co/) | [t](https://twitter.com/AMtwo)) - - Aaron Bertrand ([b](http://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) - - Daniel Calbimonte ([b](https://www.sqlshack.com/author/daniel-calbimonte/) | [t](https://twitter.com/dcalbimonte)) - - Ahmad Yaseen ([b](https://www.sqlshack.com/author/ahmad-yaseen/) | [t](https://twitter.com/AhmadZYaseen)) - - Solomon Rutzky ([b](https://sqlquantumleap.com/) | [t](https://twitter.com/SqlQuantumLeap)) - - Bert Wagner ([b](https://blogs.sentryone.com) | [t](https://twitter.com/bertwagner)) - - Thomas LaRock ([b](https://thomaslarock.com/) | [t](https://twitter.com/SQLRockstar)) - - Jen Mccown ([b](http://www.midnightdba.com/Jen/author/jen/)) - - Louis Davidson ([b](https://www.red-gate.com/simple-talk/author/louis-davidson/) | [t](https://twitter.com/drsql)) - - Solomon Rutzky ([b](https://sqlquantumleap.com) | [t](https://twitter.com/srutzky)) - - Michelle Haarhues ([b](https://witsociety.wordpress.com/) | [t](https://twitter.com/mhaarhues)) - - Christian Wade ([b](https://witsociety.wordpress.com/) | [t](https://twitter.com/_christianWade)) - - Kellyn Pot’Vin-Gorman ([b](https://dbakevlar.com/) | [t](https://twitter.com/DBAKevlar)) - - Kevin Feasel ([b](https://36chambers.wordpress.com) | [t](https://twitter.com/feaselkl)) +- Kendra Little ([b](http://www.littlekendra.com/) | [t](https://twitter.com/Kendra_Little)) +- Slava Murygin ([b](http://slavasql.blogspot.ru/)) +- Mike Milligan ([b](http://www.bidn.com/Blogs/userid/43/author/mike-milligan)) +- Kenneth Fisher ([b](https://twitter.com/sqlstudent144) | [t](https://twitter.com/sqlstudent144)) +- William Durkin ([b](http://www.williamdurkin.com/) | [t](https://twitter.com/sql_williamd)) +- John Morehouse ([b](http://sqlrus.com/) | [t](http://twitter.com/sqlrus)) +- Phil Factor ([b](https://www.red-gate.com/simple-talk/author/phil-factor/) | [t](https://twitter.com/phil_factor)) +- Klaus Aschenbrenner ([b](https://www.sqlpassion.at/) | [t](https://twitter.com/Aschenbrenner)) +- Latish Sehgal ([b](http://www.dotnetsurfers.com/)) +- Arvind Shyamsundar ([b](https://blogs.msdn.microsoft.com/arvindsh/)) +- [SQLMatters](http://www.sqlmatters.com/) +- [MSSQLTips](https://www.mssqltips.com/) +- Anthony Zanevsky, Andrew Zanevsky and Katrin Zanevsky +- Andy Mallon ([b](http://www.am2.co/) | [t](https://twitter.com/AMtwo)) +- Aaron Bertrand ([b](http://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) +- Daniel Calbimonte ([b](https://www.sqlshack.com/author/daniel-calbimonte/) | [t](https://twitter.com/dcalbimonte)) +- Ahmad Yaseen ([b](https://www.sqlshack.com/author/ahmad-yaseen/) | [t](https://twitter.com/AhmadZYaseen)) +- Solomon Rutzky ([b](https://sqlquantumleap.com/) | [t](https://twitter.com/SqlQuantumLeap)) +- Bert Wagner ([b](https://blogs.sentryone.com) | [t](https://twitter.com/bertwagner)) +- Thomas LaRock ([b](https://thomaslarock.com/) | [t](https://twitter.com/SQLRockstar)) +- Jen Mccown ([b](http://www.midnightdba.com/Jen/author/jen/)) +- Louis Davidson ([b](https://www.red-gate.com/simple-talk/author/louis-davidson/) | [t](https://twitter.com/drsql)) +- Solomon Rutzky ([b](https://sqlquantumleap.com) | [t](https://twitter.com/srutzky)) +- Michelle Haarhues ([b](https://witsociety.wordpress.com/) | [t](https://twitter.com/mhaarhues)) +- Christian Wade ([b](https://witsociety.wordpress.com/) | [t](https://twitter.com/_christianWade)) +- Kellyn Pot’Vin-Gorman ([b](https://dbakevlar.com/) | [t](https://twitter.com/DBAKevlar)) +- Kevin Feasel ([b](https://36chambers.wordpress.com) | [t](https://twitter.com/feaselkl)) +- Brent Ozar ([b](https://www.brentozar.com/) | [@BrentO](https://twitter.com/BrentO)) -## Import and Export Settings +## 1. Import and Export Settings `Tools > Options > Environment > Import and Export Settings` Default settings (if you need to compare with yours) you can find here: [SSMS settings files](https://github.com/ktaranov/sqlserver-kit/tree/master/SSMS/SSMS_vssettings) @@ -106,8 +107,8 @@ Detailed information you can find in this article [Symbolic Links for Sharing Te -## SSMS Shortcuts -All shortcuts you can find [here](https://github.com/ktaranov/sqlserver-kit/blob/master/SSMS/SSMS_Shortcuts.md) +## 2. SSMS Shortcuts +All shortcuts you can find [here](https://github.com/ktaranov/sqlserver-kit/blob/master/SSMS/SSMS_Shortcuts.md). Known problem for SSMS 2012 and 2014: [CTRL+R does not hide the Query Result window in SSMS] Create custom shortcut as simple as possible: @@ -146,7 +147,7 @@ Most useful are: -## Keyboard Shortcuts for Favorite Stored Procedures and Scripts +## 3. Keyboard Shortcuts for Favorite Stored Procedures and Scripts A query shortcut allows you to execute code simply by hitting Ctrl and a number key. Cool. But first, there are a few things to know about query shortcuts: 1. The window in SSMS where you configure the query shortcuts has the text field for the shortcut labeled as **Stored Procedure**, which is misleading because you can specify a query. You can even specify multiple queries. @@ -163,7 +164,7 @@ For another 9 shortcuts my recommendation awesome open source Brent Ozar teams p | Query Shortcut | Stored Procedure | |-------------------------|----------------------| | Alt + F1 | [sp_help] | -| Ctrl + F1 | [sp_WhoIsActive] | +| Ctrl + F1 | [`sp_WhoIsActive`] | | Ctrl + 1 | [sp_who] | | Ctrl + 2 | [sp_lock] | | Ctrl + 3 | [sp_Blitz] | @@ -182,7 +183,7 @@ Also recommended: [sp_help]:https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-help-transact-sql [sp_who]:https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-who-transact-sql [sp_lock]:https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-lock-transact-sql -[sp_WhoIsActive]:http://whoisactive.com +[`sp_WhoIsActive`]:http://whoisactive.com [sp_Blitz]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/dev/sp_Blitz.sql [sp_BlitzBackups]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/dev/sp_BlitzBackups.sql [sp_BlitzCache]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/dev/sp_BlitzCache.sql @@ -196,43 +197,50 @@ Also recommended: [sp_foreachdb]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/dev/sp_foreachdb.sql [usp_BulkUpload]:https://github.com/ktaranov/sqlserver-kit/blob/master/Stored_Procedure/usp_BulkUpload.sql -### Some useful shortcuts for `sp_WhoIsActive from Kevin Feasel -More details [here](https://36chambers.wordpress.com/2019/04/02/whoisactive-in-ssms/) +### Some useful shortcuts for `sp_WhoIsActive` from Kevin Feasel +More details [here](https://36chambers.wordpress.com/2019/04/02/whoisactive-in-ssms/). What’s Going On shortcut? -`EXEC sp_whoisactive @get_full_inner_text = 1, @get_outer_command = 1, @find_block_leaders = 1, @get_task_info = 2, @get_transaction_info = 1, @get_plans = 0, @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]', @sort_order = '[session_id]';` +```tsql +EXEC sp_whoisactive + @get_full_inner_text = 1 + , @get_outer_command = 1 + , @find_block_leaders = 1 + , @get_task_info = 2 + , @get_transaction_info = 1 + , @get_plans = 0 + , @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]' + , @sort_order = '[session_id]'; +``` And here it is in a little bit nicer of a format so we can cover it: -```sql +```tsql EXEC sp_whoisactive - @get_full_inner_text = 1, - @get_outer_command = 1, - @find_block_leaders = 1, - @get_task_info = 2, - @get_transaction_info = 1, - @get_plans = 0, - @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]', - @sort_order = '[session_id]'; + @get_full_inner_text = 1 + , @get_outer_command = 1 + , @find_block_leaders = 1 + , @get_task_info = 2 + , @get_transaction_info = 1 + , @get_plans = 0 + , @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]' + , @sort_order = '[session_id]'; ``` When you need to get execution plans, that’s when I break out Ctrl+4. Here is the one-liner: -`EXEC sp_whoisactive @get_full_inner_text = 1, @get_outer_command = 1, @find_block_leaders = 1, @get_task_info = 2, @get_transaction_info = 1, @get_plans = 1, @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]', @sort_order = '[session_id]';` - -Formatted: -``` +```tsql EXEC sp_whoisactive - @get_full_inner_text = 1, - @get_outer_command = 1, - @find_block_leaders = 1, - @get_task_info = 2, - @get_transaction_info = 1, - @get_plans = 1, - @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]', - @sort_order = '[session_id]'; + @get_full_inner_text = 1 + , @get_outer_command = 1 + , @find_block_leaders = 1 + , @get_task_info = 2 + , @get_transaction_info = 1 + , @get_plans = 1 + , @output_column_list = '[session_id][login_name][dd%][CPU][reads][writes][wait_info][blocking_session_id][blocked_session_count][sql_text][sql_command][status][tempdb_%][%]' + , @sort_order = '[session_id]'; ``` -## SSMS Scripting Option +## 4. SSMS Scripting Option ### Script any object with data `Right click on database name > Tasks > Generate Scripts …` @@ -252,7 +260,7 @@ More details here: [What’s new in SQL Server Management Studio 17.2; Authentic -## Selecting a block of text using the ALT Key +## 5. Selecting a block of text using the ALT Key By holding down the ALT key as you select a block of text you can control the width of the selection region as well as the number of rows. Also you can activate multi line mode with `Shift + Alt` keys and using keyboard arrows to format multi line code. @@ -264,7 +272,7 @@ More info and video about this awesome feature in this article: [My Favorite SSM -## Script Table and Column Names by Dragging from Object Explorer +## 6. Script Table and Column Names by Dragging from Object Explorer Save keystrokes by dragging Drag the `Columns` folder for a table in to auto-type all column names in the table in a single line. - Warning: this doesn’t include square [brackets] around the column names for SSMS below 17 version, so if your columns contain spaces or special characters at the beginning, this shortcut isn’t for you @@ -272,7 +280,7 @@ Drag the `Columns` folder for a table in to auto-type all column names in the ta -## Disable Copy of Empty Text +## 7. Disable Copy of Empty Text - Select a block of text to copy; - Move the cursor the place where you want to paste the code; @@ -285,7 +293,7 @@ This behavior can be disabled in SSMS: go to `Tools > Options > Text Editor > Al -## Client Statistics +## 8. Client Statistics When you enable that option for your session (`Ctrl + Alt + S`), SQL Server Management Studio will give you more information about the client side processing of your query. The Network Statistics shows you the following information: @@ -302,7 +310,7 @@ The Time Statistics additionally shows you the following information: -## Configure Object Explorer to Script Compression and Partition Schemes for Indexes +## 9. Configure Object Explorer to Script Compression and Partition Schemes for Indexes Is this index compressed or partitioned? By default, you wouldn’t know just by scripting out the index from Object Explorer. If you script out indexes this way to check them into source code, or to tweak the definition slightly, this can lead you to make mistakes. @@ -316,7 +324,7 @@ You can make sure you’re aware when indexes have compression or are partitione -## Using GO X to Execute a Batch or Statement Multiple Times +## 10. Using GO X to Execute a Batch or Statement Multiple Times The `GO` command marks the end of a batch of statements that should be sent to SQL Server for processing, and then compiled into a single execution plan. By specifying a number after the `GO` the batch can be run specified number of times. This can be useful if, for instance, you want to create test data by running an insert statement a number of times. Note that this is not a Transact SQL statement and will only work in Management Studio (and also SQLCMD or OSQL). For instance the following SQL can be run in SSMS : @@ -340,7 +348,7 @@ In this case this is a simpler alternative than creating a cursor or while loop. -## SSMS Template Replacement +## 11. SSMS Template Replacement One under-used feature of Management Studio is the template replacement feature. SSMS comes with a library of templates, but you can also make your own templates for reusable scripts. In your saved .sql script, just use the magic incantation to denote the parameters for replacement. The format is simple: `` @@ -349,7 +357,7 @@ Then, when you open the `.sql` script, you hit `CTRL + Shift + M`, and SSMS will -## Color coding of connections +## 12. Color coding of connections SQL Server Management Studio has the capability of coloring the bar at the bottom of each query window, with the color dependent on which server is connected. This can be useful in order to provide a visual check of the server that a query is to be run against, for instance to color code production instances as red, development as green and amber as test. This can also be used in conjunction with Registered Servers and CMS (Central Management Server). @@ -358,7 +366,7 @@ Select the check box towards the bottom of the window and use the ‘Select… -## SQLCMD mode +## 13. SQLCMD mode Switching on SQLCMD mode enables a number of useful extra scripting style commands in SSMS. In particular you can use it to change to the connection credentials within the query window, so that you can run a query against multiple servers from the same query window. There are more details of how to do this here: [Changing the SQL Server connection within an SSMS Query Windows using SQLCMD Mode](http://www.sqlmatters.com/Articles/Changing%20the%20SQL%20Server%20connection%20within%20an%20SSMS%20Query%20Windows%20using%20SQLCMD%20Mode.aspx) @@ -371,18 +379,18 @@ Also some great tips from Louis Davidson article: [Using SQLCMD, End Execution o -## Script multiple objects using the Object Explorer Details Windows +## 14. Script multiple objects using the Object Explorer Details Windows Individual database objects, such as a table or stored procedure, can be scripted within SSMS by right clicking on the object within Object Explorer and selecting the appropriate item in the drop down menu. However if you have a lot of objects to script that can quickly become time consuming. Fortunately it’s possible to select multiple objects and script them up all together in a single query window. To do this just open the Object Explorer Details window from the View menu (or press the F7 key). If you want to script up multiple (or all) tables, select the Tables item under the relevant database in Object Explorer. A list of all tables appears in the Object Explorer Details window. -Select the tables you want to script (using the Control key if necessary) and then right click and select which script option you want – e.g. to create a table create script for all tables +Select the tables you want to script (using the Control key if necessary) and then right click and select which script option you want – e.g. to create a table create script for all tables. -## Registered Servers / Central Management Server +## 15. Registered Servers / Central Management Server If you have a lot of servers then re-entering the details in Object Explorer every time you start SSMS can be frustrating and time consuming. Fortunately there are two facilities within SSMS that enable these details to be entered just once and "remembered" each time you open up SSMS. These two facilities are **Registered Servers** and **Central Management Servers**. @@ -400,7 +408,7 @@ A significant limitation with CMS is that the CMS server itself can’t be inclu -## Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar +## 16. Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar The query window in SSMS can be split into two so that you can look at two parts of the same query simultaneously. Both parts of the split window can be scrolled independently. This is especially useful if you have a large query and want to compare different areas of the same query. To split the window simply drag the bar to the top right hand side of the window as shown below. @@ -423,14 +431,14 @@ There are four types of annotations, the first three of which are shown in their -## Moving columns in the results pane +## 17. Moving columns in the results pane It may not be immediately obvious but you can switch columns around in the results pane when using the grid view, by dragging the column headers and dropping them next to another column header. This can be useful if you want to rearrange how the results are displayed without amending the query, especially if you have a lot of columns in your result set. This works only for one column. -## Generating Charts and Drawings in SQL Server Management Studio +## 18. Generating Charts and Drawings in SQL Server Management Studio You don't have to settle for T-SQL's monochrome text output. These stored procedures let you quickly and easily turn your SELECT queries' output into colorized charts and even computer-generated art. To turn your own data into a line, column, area, or bar chart using the Chart stored procedure, you need to design a SELECT query that serves as the first parameter in the stored procedure call. @@ -440,7 +448,7 @@ Also you can generate amazing chart using awesome R libraries, detailed article: -## Additional Connection Parameters +## 19. Additional Connection Parameters One such change SSMS got for free is the connection resiliency logic within the `SqlConnection.Open()` method. To improve the default experience for clients which connect to Azure SQL Database, the above method will (in the case of initial connection errors / timeouts) now retry 1 time after sleeping for 10 seconds. These numbers are configurable by properties called ConnectRetryCount (default value 1) and ConnectRetryInterval (default value 10 seconds.) The previous versions of the SqlConnection class would not automatically retry in cases of connection failure. @@ -454,14 +462,14 @@ ConnectRetryCount=0 -## Working with tabs headers +## 20. Working with tabs headers You can view [SPID](https://docs.microsoft.com/en-us/sql/t-sql/functions/spid-transact-sql) in tabs header, quickly open script containing folder or copy script file path. ![Working with tabs headers](/SSMS/SSMS_Tips/working_with_tabs_headers.png) -## Hiding tables in SSMS Object Explorer +## 21. Hiding tables in SSMS Object Explorer 1. You can actually hide an object from object explorer by assigning a specific extended property: ``` EXEC sp_addextendedproperty @@ -494,14 +502,14 @@ In the case of SPs the code, same with Views and in the case of Tables it’s th -## UnDock Tabs and Windows for Multi Monitor Support +## 22. UnDock Tabs and Windows for Multi Monitor Support From SSMS 2012 and onwards, you can easily dock/undock the query tabs as well as different object windows inside SSMS to make better use of the screen real estate and multiple monitors you have. ![UnDock Tabs and Windows for Multi Monitor Support](/SSMS/SSMS_Tips/undock_tabs_and_windows_for_multi_monitor_support.gif) -## RegEx-Based Finding and Replacing of Text in SSMS +## 23. RegEx-Based Finding and Replacing of Text in SSMS So often, one sees developers doing repetitive coding in SSMS or Visual Studio that would be much quicker and easier by using the built-in Regular-Expression-based Find/Replace functionality. It is understandable, since the syntax is odd and some features are missing, but it is still well-worth knowing about. @@ -511,7 +519,7 @@ My favorite regex: replace `\t` on `\n, `. It useful in many cases when you have -## Changing what SSMS opens on startup +## 24. Changing what SSMS opens on startup The more interesting way to look at this shortcut is to check the various options available with SSMS command line parameters. To check them, use the following command: ``` @@ -548,7 +556,7 @@ This is the complete text of shortcut properties: -## Modifying New Query Template +## 25. Modifying New Query Template You can modified New Query template for any instance SQL Server: ``` C:\Program Files (x86)\Microsoft SQL Server\[140|130|120|110]\Tools\Binn\ ManagementStudio\SqlWorkbenchProjectItems\Sql\SQLFile.sql @@ -567,7 +575,7 @@ Thanks for this tip Aaron Bertrand: [T-SQL Tuesday #92: Lessons Learned the Hard -## Query Execution Options +## 26. Query Execution Options More detailed article here: [Knowing the Options] The options represent the SET values of the current session. @@ -653,7 +661,7 @@ SELECT 'XACT_ABORT' AS 'Option', CASE @@options & 16384 WHEN 0 THEN -## SQL Server Diagnostics Extension +## 27. SQL Server Diagnostics Extension Analyze Dumps – Customers using this extension will be able to debug and self-resolve memory dump issues from their SQL Server instances and receive recommended Knowledge Base (KB) article(s) from Microsoft, which may be applicable for the fix. The memory dumps are stored in a secured and compliant manner as governed by the [Microsoft Privacy Policy](https://privacy.microsoft.com/en-us/privacystatement). @@ -667,7 +675,7 @@ More details here: [SQL Server Diagnostics Extension for SSMS] and [SQL Server D -## Connect to SQL Servers in another domain using Windows Authentication +## 28. Connect to SQL Servers in another domain using Windows Authentication You may find that you need to connect remotely to a SQL Server that is in another domain. This is a problem when SQL authentication is not an option, because Windows machine is in its own domain; Management Studio cannot directly override the local Windows credentials and pass the credentials for a remote domain user. @@ -703,7 +711,7 @@ More details here: [Connect to SQL Servers in another domain using Windows Authe -## SSMS Default Reports +## 29. SSMS Default Reports By right-clicking on the SQL Server instance and navigating to `Reports > Standard Reports`, you can see the predefined SSMS reports: ![SSMS_Server_Default_Reports](/SSMS/SSMS_Tips/29_SSMS_Server_Default_Reports.png) @@ -717,7 +725,7 @@ Useful another reports information: -## Live Query Statistics +## 30. Live Query Statistics SQL Server Management Studio provides the ability to view the live execution plan of an active query. This live query plan provides real-time insights into the query execution process as the controls flow from one query plan operator to another. The live query plan displays the overall query progress and operator-level run-time execution statistics such as the number of rows produced, elapsed time, operator progress, etc. @@ -732,14 +740,14 @@ This feature can be used with the [Transact-SQL Debugger](https://docs.microsoft -## Searching in Showplan +## 31. Searching in Showplan In SSMS 17.2, appear the ability to search table name, index name or column name and more in graphical showplan. just use `CTRL+F` to start a search in graphical showplan (or right-click on a blank area of the plan, and in the context menu click on Find Node option), and you can quickly see exactly where node id 30 is. More details here: [New in SSMS: Searching in Showplan] -## Object Explore Details +## 32. Object Explore Details To bring up the Object Explorer Details pane, use the `F7` shortcut or it can be accessed from `Toolbar -> View -> Object -> Explorer Details`. ![SSMS_Database_Default_Reports](/SSMS/SSMS_Tips/32_object_explore_details_01.png) @@ -754,19 +762,19 @@ This tells SQL Server Management Studio to display all the objects that have the -## Working with Azure SQL +## 33. Working with Azure SQL For SSMS 17.2 and above you can enable Multi-Factor Authentication in Azure SQL Database, more details here: [Configure Multi-Factor Authentication in Azure SQL Database] -## Using Extended Events and Profiler in SSMS +## 34. Using Extended Events and Profiler in SSMS Full instruction here: [EXTENDED EVENTS AND PROFILER: XE PROFILER] -## Vulnerability Assessment in SSMS +## 35. Vulnerability Assessment in SSMS You will need version 17.4 for the Vulnerability Assessment feature. Right-click to any database to start a scan. ![SSMS_Database_Default_Reports](/SSMS/SSMS_Tips/SQL_Vulnerability_Assessment.gif) @@ -783,7 +791,7 @@ More info here: [SQL Vulnerability Assessment Available in SSMS] and [Vulnerabil -## Import Flat File to SQL Wizard +## 36. Import Flat File to SQL Wizard You will need version 17.3 or later. Detailed article here: [Import Flat File to SQL Wizard] @@ -796,7 +804,7 @@ PROSE analyzes data patterns in your input file to infer column names, types, de -## AutoRecover in SSMS +## 37. AutoRecover in SSMS With the default settings, you can lose up to 5 minutes of work on a sudden reboot. The recovered information will be kept for 7 days so there is some time to get your files. These settings can be modified, changing how often auto recover happens and how long the information is retained. @@ -805,13 +813,13 @@ This feature can be turned off but it is not recommended. To change the settings, go to: `Tools -> Options -> Environment -> AutoRecover`. -More details [here](https://witsociety.wordpress.com/2019/04/11/autorecover-in-ssms/) +More details [here](https://witsociety.wordpress.com/2019/04/11/autorecover-in-ssms/). ![AutoRecover in SSMS](/SSMS/SSMS_Tips/AutoRecover_in_SSMS.png) -## View and query Power BI .pbix files in SSMS +## 38. View and query Power BI .pbix files in SSMS All Power BI files end with `.pbix`. You can make a copy of the file, (because DBA always like to work from copies vs. the originals) then rename the file from `.pbix` to `.zip`. You can then unzip the file and see the base components that make up a Power BI report and visuals: @@ -831,21 +839,21 @@ You will connect to the trimmed down Analysis Server behind the PBI Desktop repo ![Using SSMS with PowerBI](/SSMS/SSMS_Tips/38_using_ssms_with_powerbi_02.jpg) -More details [here](https://dbakevlar.com/2019/03/using-ssms-with-power-bi/) +More details [here](https://dbakevlar.com/2019/03/using-ssms-with-power-bi/). -## Using SSMS and Profiler to analyze PowerBI with XMLA +## 39. Using SSMS and Profiler to analyze PowerBI with XMLA SSMS can be used to, for example, view partitions generated by [incremental refresh](https://docs.microsoft.com/power-bi/service-premium-incremental-refresh). Version 18.0 RC1 or above is required. SQL Server Profiler can be used for tracing and debugging. SSMS 18.0 RC1 or above is required. -More details [here](https://powerbi.microsoft.com/en-us/blog/power-bi-open-platform-connectivity-with-xmla-endpoints-public-preview/) +More details [here](https://powerbi.microsoft.com/en-us/blog/power-bi-open-platform-connectivity-with-xmla-endpoints-public-preview/). -Reference: +## 40. Reference: - [Free Course: SQL Server Management Studio Shortcuts & Secrets](https://sqlworkbooks.com/course/sql-server-management-studio-shortcuts-secrets/) (by Kendra Little) - - [SSMS Tips: Templates and Control+Shift+M] (by Kendra Little) + - [SSMS Tips: Templates and Control+Shift+M](http://littlekendra.com/2016/08/09/ssms-tips-templates-and-controlshiftm/) (by Kendra Little) - [Fixing Hot-Key issue in SSMS in five steps](http://slavasql.blogspot.ru/2017/02/fixing-hot-key-issue-in-ssms-in-five.html) (by Slava Murygin) - [SSMS Tips and Tricks](http://www.ssmstipsandtricks.com/) (by Latish Sehgal) - [Do you need more than STATISTICS IO for Query Tuning?](https://www.sqlpassion.at/archive/2017/03/27/do-you-need-more-than-statistics-io-for-query-tuning/) (by Klaus Aschenbrenner) @@ -875,7 +883,6 @@ Reference: - [SSMS Tips and Tricks free ebook](http://ssmsbook.sqldownunder.com) (by SDU Insiders) [Cycle through clipboard ring]:http://www.ssmstipsandtricks.com/blog/2014/05/05/cycle-through-clipboard-ring/ -[SSMS Tips: Templates and Control+Shift+M]:http://littlekendra.com/2016/08/09/ssms-tips-templates-and-controlshiftm/ [Generating Charts and Drawings in SQL Server Management Studio]:http://sqlmag.com/t-sql/generating-charts-and-drawings-sql-server-management-studio [View R Plots from within SQL Server Management Studio]:http://www.sqlservercentral.com/articles/R+Services/156107/ [RegEx-Based Finding and Replacing of Text in SSMS]:https://www.simple-talk.com/sql/sql-training/regex-based-finding-and-replacing-of-text-in-ssms/ diff --git a/SSMS/SSMS_vssettings/README.md b/SSMS/SSMS_vssettings/README.md index d12a61f1..dc901533 100644 --- a/SSMS/SSMS_vssettings/README.md +++ b/SSMS/SSMS_vssettings/README.md @@ -2,6 +2,8 @@ In files with `_Default_` you can find defaults SSMS settings for different SSMS version. For import settings files see **tip 1** in [SSMS tips](https://github.com/ktaranov/sqlserver-kit/blob/master/SSMS/SSMS_Tips.md#1) guide. +My awesome settings: [ktaranov_18.7.1.vssettings](.ktaranov_18.7.1.vssettings) + - [AB.DarkScheme.LargeFonts.vssettings](/AB.DarkScheme.LargeFonts.vssettings) - [AB.DarkScheme.NormalFonts.vssettings](/AB.DarkScheme.NormalFonts.vssettings) - [NewSettings_17.2(14.0.17177).vssettings](/NewSettings_17.2(14.0.17177).vssettings) From ac25b6aac602b15bb31e286fe2e1cb951688e867 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 8 Dec 2020 11:03:49 +0300 Subject: [PATCH 175/553] Update semicolon recommendation --- ... Convention and T-SQL Programming Style.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 3c38ddf1..e72bdd10 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -286,12 +286,13 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. More details [here](https://dba.stackexchange.com/a/253917/107045). - No square brackets `[]` and [reserved words](https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Check_Reserved_Words_For_Object_Names.sql) in object names and alias, use only Latin symbols **`[A-z]`** and numeric **`[0-9]`**. - Prefer [`ANSI`](http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip) syntax and functions ([`CAST`][10] instead [`CONVERT`][10], [`COALESE`](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql) instead [`ISNULL`](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), etc.). - - All finished expressions should have semicolon `;` at the end. + - All finished expressions should have semicolon `;` at the end. This is [`ANSI`] standard and Microsoft announced with the SQL Server 2008 release that semicolon statement terminators will become mandatory in a future version so statement terminators other than semicolons (whitespace) are currently deprecated. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/), [here](https://www.brentozar.com/archive/2015/12/give-your-t-sql-a-semicolonoscopy/), and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). + Also if you use `WITH CTE ` expression `;` is mandority. - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. @@ -540,14 +541,14 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] - T-SQL code, triggers, stored procedures, functions, scripts, should have a standard comment-documentation banner: ``` - Get all databases meta data using dynamic T-SQL - 1 data set: temp table #DatabaseInfo. - No - Konstantin Taranov - 2018-03-01 - 2019-11-14 by Konstantin Taranov - 1.2 - https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Databases_Report.sql + Get all databases meta data using dynamic T-SQL + 1 data set: temp table #DatabaseInfo. + No + Konstantin Taranov + 2018-03-01 + 2019-11-14 by Konstantin Taranov + 1.2 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Databases_Report.sql ``` From 2f834c1cc4d2a94b8a6bf0aea35dba257c73aa2c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 8 Dec 2020 11:05:32 +0300 Subject: [PATCH 176/553] Fix format issue --- SQL Server Name Convention and T-SQL Programming Style.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index e72bdd10..ff9baf15 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -291,8 +291,9 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. + More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/), [here](https://www.brentozar.com/archive/2015/12/give-your-t-sql-a-semicolonoscopy/), and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). - Also if you use `WITH CTE ` expression `;` is mandority. + Also if you use common table expression `WITH CTE ` semicolon is mandority. - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. From 45f13eec2f6f9eba09b1aff69f66b47fa8806903 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 9 Dec 2020 21:40:40 +0300 Subject: [PATCH 177/553] Add Amazon Babelfish tool --- Utilities/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Utilities/README.md b/Utilities/README.md index 13f3627e..f1f91620 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **393** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **394** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - **[B]**: Backup solutions {17} @@ -418,6 +418,7 @@ Utility types (main purpose), in braces `{}` current counts: | [Image To SQL](#image-to-sql) | No | No | [?] | [Image To SQL] | 2015-10-09 | MSSQL.TOOLS | | Yes | No | | [dbdiagram](#dbdiagram) | No | No | [?] | [dbdiagram] | ? | holistics.io | | Yes | $9/mo | | [Beekeeper Studio](#beekeeper) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Beekeeper Studio] | 2020-11-21 | Beekeeper Studio | [MIT] | Yes | No | +| [Babelfish for Aurora PostgreSQL](#babelfish) | No | Online | [?] | [Babelfish for Aurora PostgreSQL] | 2020-12-01 | Amazon | [Apache] | Open Source | No | ## SSMS @@ -6158,6 +6159,18 @@ Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and m - Default dark theme +## Babelfish for Aurora PostgreSQL + +Download page: [Babelfish for Aurora PostgreSQL]
+Release date: 2020-12-01
+Support Version: 2008-2019
+Author: Amazon
+Free version: Yes
+Price: No + +Babelfish is a new translation layer for Amazon Aurora PostgreSQL that enables Aurora to understand commands from applications written for Microsoft SQL Server. + + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -6552,6 +6565,7 @@ Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and m [Image To SQL]:http://mssql.tools/sql/Image-To-SQL [dbdiagram]:https://dbdiagram.io/home [Beekeeper Studio]:https://github.com/beekeeper-studio/beekeeper-studio +[Babelfish for Aurora PostgreSQL]:https://aws.amazon.com/rds/aurora/babelfish/ [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From 5066ff843cb5c6a6a502bff8fb3b0044e013bf0f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 10 Dec 2020 00:47:09 +0300 Subject: [PATCH 178/553] Add new awesome articles --- Articles/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 87b51cf5..09e45706 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1307,6 +1307,10 @@ Articles types: | [Exploring errors to reveal unauthorized information] | Fabiano Amorim | 2020-10-19 | [SEC] | | [How to run your CTE just once, and re-use the output] | Daniel Hutmacher | 2020-12-01 | [DBA][DEV] | | [Documenting SSIS Packages using Sequence Diagrams] | Aveek Das | 2020-11-25 | [SSIS] | +| [Performance testing with DBCC DROPCLEANBUFFERS] | Dan Guzman | 2018-07-29 | [P] | +| [Optimizing memory settings in Analysis Services] | Marco Russo | 2020-12-07 | [DBA] | +| [VMware and SQL Server Best Practices] | Mike Walsh | 2020-12-02 | [DBA] | +| [Autoparameterized Trivial Queries May Not Get Partition Elimination] | Brent Ozar | 2020-11-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2588,3 +2592,7 @@ Articles types: [Exploring errors to reveal unauthorized information]:https://www.red-gate.com/simple-talk/sql/database-administration/exploring-errors-to-reveal-unauthorized-information/ [How to run your CTE just once, and re-use the output]:https://sqlsunday.com/2020/12/01/run-your-cte-just-once-and-reuse-output/ [Documenting SSIS Packages using Sequence Diagrams]:https://www.sqlshack.com/documenting-ssis-packages-using-sequence-diagrams-2/ +[Performance testing with DBCC DROPCLEANBUFFERS]:https://www.dbdelta.com/performance-testing-with-dbcc-dropcleanbuffers/ +[Optimizing memory settings in Analysis Services]:https://www.sqlbi.com/articles/optimizing-memory-settings-in-analysis-services/ +[VMware and SQL Server Best Practices]:https://straightpathsql.com/archives/2020/12/vmware-and-sql-server-best-practices/ +[Autoparameterized Trivial Queries May Not Get Partition Elimination]:https://www.brentozar.com/archive/2020/12/autoparameterized-trivial-queries-may-not-get-partition-elimination/ From a96255bc5ebd6a9e3744b0c296af115e1d2e9e6c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 11 Dec 2020 01:19:15 +0300 Subject: [PATCH 179/553] Update SQL Server Diagnostic Queries to 2020-12 --- ...nstance Diagnostic Information Queries.sql | 62 ++-- ...er 2005 Diagnostic Information Queries.sql | 58 ++-- ...er 2008 Diagnostic Information Queries.sql | 76 ++--- ...2008 R2 Diagnostic Information Queries.sql | 76 ++--- ...er 2012 Diagnostic Information Queries.sql | 55 ++- ...er 2014 Diagnostic Information Queries.sql | 60 ++-- ...016 SP1 Diagnostic Information Queries.sql | 72 ++-- ...016 SP2 Diagnostic Information Queries.sql | 65 ++-- ...er 2017 Diagnostic Information Queries.sql | 65 ++-- ...er 2019 Diagnostic Information Queries.sql | 314 +++++++++--------- .../glen_berry_diagnostic_queries_links.txt | 9 + 11 files changed, 445 insertions(+), 467 deletions(-) create mode 100644 Scripts/glen_berry_diagnostic_queries_links.txt diff --git a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql index 62e8a0a0..9c6f6ca1 100644 --- a/Scripts/SQL Managed Instance Diagnostic Information Queries.sql +++ b/Scripts/SQL Managed Instance Diagnostic Information Queries.sql @@ -1,6 +1,7 @@ + -- SQL Managed Instance Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -333,7 +334,6 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); -- Drive level latency information (Query 14) (Drive Level Latency) --- Based on code from Jimmy May SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -443,18 +443,25 @@ db.[compatibility_level] AS [DB Compatibility Level], db.is_mixed_page_allocation_on, db.page_verify_option_desc AS [Page Verify Option], db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_async_on, db.is_parameterization_forced, db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, -db.target_recovery_time_in_seconds, db.is_cdc_enabled, -db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, -db.is_query_store_on, db.is_sync_with_backup, db.is_temporal_history_retention_enabled, -db.is_supplemental_logging_enabled, -db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length, db.resource_pool_id, -db.is_tempdb_spill_to_remote_store, db.is_result_set_caching_on, db.is_accelerated_database_recovery_on +db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.delayed_durability_desc, +db.is_query_store_on, db.is_sync_with_backup, db.is_temporal_history_retention_enabled, +db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length, +db.is_accelerated_database_recovery_on FROM sys.databases AS db WITH (NOLOCK) LEFT OUTER JOIN sys.dm_database_encryption_keys AS de WITH (NOLOCK) ON db.database_id = de.database_id ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -826,7 +833,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1450,7 +1457,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 59) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1461,6 +1469,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1469,7 +1479,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 60) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1478,9 +1489,10 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------- -- Show which indexes in the current database are most active for Writes @@ -1654,30 +1666,10 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/28Rpb2x --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn --- https://bit.ly/2O0Hacc \ No newline at end of file +-- https://bit.ly/2O0Hacc + + diff --git a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql index bfa8b17e..da495695 100644 --- a/Scripts/SQL Server 2005 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2005 Diagnostic Information Queries.sql @@ -1,6 +1,7 @@ + -- SQL Server 2005 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -358,6 +359,15 @@ AND ls.counter_name LIKE N'Log File(s) Size (KB)%' AND ls.cntr_value > 0 OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -668,7 +678,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1072,32 +1082,41 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 48) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - user_seeks + user_scans + user_lookups AS [Reads], s.user_updates AS [Writes], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor] -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_seeks, s.user_scans, s.user_lookups, + s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + s.user_updates AS [Writes], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, + s.last_user_scan, s.last_user_lookup, s.last_user_seek +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() -ORDER BY user_seeks + user_scans + user_lookups DESC OPTION (RECOMPILE); -- Order by reads +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 +ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ -- Show which indexes in the current database are most active for Reads --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 49) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - s.user_updates AS [Writes], user_seeks + user_scans + user_lookups AS [Reads], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor], +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1155,5 +1174,6 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + + + diff --git a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql index 7a8f828f..1c5cb165 100644 --- a/Scripts/SQL Server 2008 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 Diagnostic Information Queries.sql @@ -1,6 +1,7 @@ + -- SQL Server 2008 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -411,6 +412,15 @@ AND ls.counter_name LIKE N'Log File(s) Size (KB)%' AND ls.cntr_value > 0 OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -770,7 +780,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- http://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1209,17 +1219,22 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 56) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - user_seeks + user_scans + user_lookups AS [Reads], s.user_updates AS [Writes], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor], i.has_filter, i.filter_definition, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_seeks, s.user_scans, s.user_lookups, + s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + s.user_updates AS [Writes], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_user_scan, s.last_user_lookup, s.last_user_seek -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() -ORDER BY user_seeks + user_scans + user_lookups DESC OPTION (RECOMPILE); -- Order by reads +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 +ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1227,16 +1242,19 @@ ORDER BY user_seeks + user_scans + user_lookups DESC OPTION (RECOMPILE); -- Orde --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 57) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - s.user_updates AS [Writes], user_seeks + user_scans + user_lookups AS [Reads], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor], i.has_filter, i.filter_definition, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1290,33 +1308,9 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql index 2bbc218b..7b9c0840 100644 --- a/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql @@ -1,6 +1,7 @@ + -- SQL Server 2008 R2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -474,6 +475,15 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -833,7 +843,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value. -- This will only return one row for non-NUMA systems. --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://www.sqlskills.com/blogs/paul/page-life-expectancy-isnt-what-you-think/ @@ -1297,17 +1307,22 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 61) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - user_seeks + user_scans + user_lookups AS [Reads], s.user_updates AS [Writes], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor], i.has_filter, i.filter_definition, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_seeks, s.user_scans, s.user_lookups, + s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + s.user_updates AS [Writes], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_user_scan, s.last_user_lookup, s.last_user_seek -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() -ORDER BY user_seeks + user_scans + user_lookups DESC OPTION (RECOMPILE); -- Order by reads +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 +ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1315,16 +1330,19 @@ ORDER BY user_seeks + user_scans + user_lookups DESC OPTION (RECOMPILE); -- Orde --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 62) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id, - s.user_updates AS [Writes], user_seeks + user_scans + user_lookups AS [Reads], - i.type_desc AS [IndexType], i.fill_factor AS [FillFactor], i.has_filter, i.filter_definition, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, + s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], + i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update -FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON s.[object_id] = i.[object_id] -WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1 +FROM sys.indexes AS i WITH (NOLOCK) +LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) +ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] +WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1377,33 +1395,9 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file diff --git a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql index 1887eba6..a54e603a 100644 --- a/Scripts/SQL Server 2012 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2012 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2012 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 --- Last Modified: September 13, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -185,6 +185,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version]; ------ @@ -793,6 +794,15 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -825,7 +835,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1139,7 +1149,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1522,7 +1532,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 61) (Missing Index Warnings) @@ -1685,7 +1695,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 68) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1696,6 +1707,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1704,7 +1717,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 69) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1713,6 +1727,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1765,33 +1781,10 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + diff --git a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql index 169cb5cc..59bb822e 100644 --- a/Scripts/SQL Server 2014 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2014 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2014 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 --- Last Modified: September 13, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -169,6 +169,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported]; ------ @@ -763,9 +764,8 @@ CAST(CAST(lu.cntr_value AS FLOAT) / CAST(ls.cntr_value AS FLOAT)AS DECIMAL(18,2) db.[compatibility_level] AS [DB Compatibility Level], db.page_verify_option_desc AS [Page Verify Option], db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_async_on, db.is_parameterization_forced, db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, -db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.is_encrypted, -db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, -db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, +db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, +db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, db.delayed_durability_desc, db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length FROM sys.databases AS db WITH (NOLOCK) INNER JOIN sys.dm_os_performance_counters AS lu WITH (NOLOCK) @@ -780,6 +780,15 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -812,7 +821,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1132,7 +1141,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1559,7 +1568,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 63) (Missing Index Warnings) @@ -1724,7 +1733,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 70) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1735,6 +1745,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1743,7 +1755,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 71) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1752,6 +1765,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1841,33 +1856,10 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + diff --git a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql index 685c7221..061677ad 100644 --- a/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP1 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2016 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 --- Last Modified: September 13, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -94,6 +94,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5698.0 SP2 CU12 2/25/2020 -- 13.0.5820.21 SP2 CU13 5/28/2020 -- 13.0.5830.85 SP2 CU14 8/6/2020 +-- 13.0.5850.14 SP2 CU15 9/28/2020 -- How to determine the version, edition and update level of SQL Server and its components -- https://bit.ly/2oAjKgW @@ -162,6 +163,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], -- New for SQL Server 2016 @@ -237,7 +239,7 @@ DBCC TRACESTATUS (-1); -- This allows a database to become online and queries to be executed before the Query Store has been fully recovered -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -482,7 +484,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -783,9 +785,7 @@ db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_ db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, -db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, -db.is_query_store_on, db.is_sync_with_backup, -db.is_supplemental_logging_enabled, db.is_remote_data_archive_enabled, +db.delayed_durability_desc, db.is_query_store_on, db.is_sync_with_backup, db.is_remote_data_archive_enabled, db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length FROM sys.databases AS db WITH (NOLOCK) INNER JOIN sys.dm_os_performance_counters AS lu WITH (NOLOCK) @@ -800,6 +800,15 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -842,7 +851,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1173,7 +1182,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1213,9 +1222,6 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); - - - -- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 45) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], @@ -1640,7 +1646,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 64) (Missing Index Warnings) @@ -1810,7 +1816,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 71) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1821,6 +1828,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1829,7 +1838,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 72) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1838,6 +1848,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1987,37 +1999,17 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- Are you doing encrypted backups? -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? --- In SQL Server 2016, native SQL Server backup compression actually works much better with databases that are using TDE than in previous versions +-- In SQL Server 2016, native SQL Server backup compression actually works +-- much better with databases that are using TDE than in previous versions -- https://bit.ly/28Rpb2x --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + + + diff --git a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql index d2cac3fd..8a4d729d 100644 --- a/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2016 SP2 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 1, 2020 --- Last Modified: September 13, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -78,7 +78,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 13.0.5698.0 SP2 CU12 2/25/2020 https://support.microsoft.com/en-us/help/4536648/cumulative-update-12-for-sql-server-2016-sp2 -- 13.0.5820.21 SP2 CU13 5/38/2020 https://support.microsoft.com/en-us/help/4549825/cumulative-update-13-for-sql-server-2016-sp2 -- 13.0.5830.85 SP2 CU14 8/6/2020 https://support.microsoft.com/en-us/help/4564903/cumulative-update-14-for-sql-server-2016-sp2 - +-- 13.0.5850.14 SP2 CU15 9/28/2020 https://support.microsoft.com/en-us/help/4577775/cumulative-update-15-for-sql-server-2016-sp2 -- How to determine the version, edition and update level of SQL Server and its components @@ -147,6 +147,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], -- New for SQL Server 2016 @@ -210,7 +211,7 @@ DBCC TRACESTATUS (-1); -- This allows a database to become online and queries to be executed before the Query Store has been fully recovered -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -455,7 +456,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -755,9 +756,7 @@ db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_ db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, -db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, -db.is_query_store_on, db.is_sync_with_backup, -db.is_supplemental_logging_enabled, db.is_remote_data_archive_enabled, +db.delayed_durability_desc, db.is_query_store_on, db.is_sync_with_backup, db.is_remote_data_archive_enabled, db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length FROM sys.databases AS db WITH (NOLOCK) INNER JOIN sys.dm_os_performance_counters AS lu WITH (NOLOCK) @@ -772,6 +771,15 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -814,7 +822,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1139,7 +1147,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1622,7 +1630,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 66) (Missing Index Warnings) @@ -1792,7 +1800,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 73) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1803,6 +1812,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1811,7 +1822,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 74) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1820,6 +1832,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1974,33 +1988,10 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/28Rpb2x --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + diff --git a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql index 449e61f1..f86f3537 100644 --- a/Scripts/SQL Server 2017 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2017 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2017 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 2, 2020 --- Last Modified: September 14, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -88,7 +88,6 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 14.0.3257.3 CU18 12/9/2019 https://support.microsoft.com/en-us/help/4527377/cumulative-update-18-for-sql-server-2017 -- 14.0.3281.6 CU19 2/5/2020 https://support.microsoft.com/en-us/help/4535007/cumulative-update-19-for-sql-server-2017 -- 14.0.3294.2 CU20 4/7/2020 https://support.microsoft.com/en-us/help/4541283/cumulative-update-20-for-sql-server-2017 --- 14.0.3335.7 CU21 7/1/2020 https://support.microsoft.com/en-us/help/4557397/cumulative-update-21-for-sql-server-2017 -- 14.0.3335.7 CU21 7/1/2020 https://support.microsoft.com/en-us/help/4557397/cumulative-update-21-for-sql-server-2017 -- 14.0.3356.20 CU22 9/10/2020 https://support.microsoft.com/en-us/help/4577467/cumulative-update-22-for-sql-server-2017 @@ -166,6 +165,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], @@ -232,7 +232,7 @@ DBCC TRACESTATUS (-1); -- The behavior of TF 1117, 1118 are enabled for tempdb in SQL Server 2016 by default --- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases +-- SQL 2016 It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases -- https://bit.ly/2lbNWxK -- The behavior of TF 2371 is enabled by default in SQL Server 2016 and newer (in compat level 130 and higher) @@ -473,7 +473,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -790,8 +790,8 @@ db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_di db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, db.is_query_store_on, db.is_sync_with_backup, db.is_temporal_history_retention_enabled, -db.is_supplemental_logging_enabled, db.is_remote_data_archive_enabled, -db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length, db.resource_pool_id +db.is_remote_data_archive_enabled, +db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length FROM sys.databases AS db WITH (NOLOCK) INNER JOIN sys.dm_os_performance_counters AS lu WITH (NOLOCK) ON db.name = lu.instance_name @@ -805,6 +805,16 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -847,7 +857,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N @@ -1172,7 +1182,7 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa @@ -1656,7 +1666,7 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- Find missing index warnings for cached plans in the current database (Query 67) (Missing Index Warnings) @@ -1826,7 +1836,8 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 74) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1837,6 +1848,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1845,7 +1858,8 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - --- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 75) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1854,6 +1868,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -2031,33 +2047,10 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/28Rpb2x --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn -- https://bit.ly/2O0Hacc --- August 2017 blog series about upgrading and migrating to SQL Server 2016/2017 --- https://bit.ly/2ftKVrX \ No newline at end of file + diff --git a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql index c2c768e6..ec3ec91a 100644 --- a/Scripts/SQL Server 2019 Diagnostic Information Queries.sql +++ b/Scripts/SQL Server 2019 Diagnostic Information Queries.sql @@ -1,7 +1,7 @@ + -- SQL Server 2019 Diagnostic Information Queries -- Glenn Berry --- Last Modified: September 2, 2020 --- Last Modified: September 13, 2020 +-- Last Modified: December 3, 2020 -- https://glennsqlperformance.com/ -- https://sqlserverperformance.wordpress.com/ -- YouTube: https://bit.ly/2PkoAM1 @@ -73,15 +73,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In -- 15.0.4033.1 CU4 3/31/2020 https://support.microsoft.com/en-us/help/4548597/cumulative-update-4-for-sql-server-2019 -- 15.0.4043.16 CU5 6/22/2020 https://support.microsoft.com/en-us/help/4552255/cumulative-update-5-for-sql-server-2019 -- 15.0.4053.23 CU6 8/4/2020 https://support.microsoft.com/en-us/help/4563110/cumulative-update-6-for-sql-server-2019 --- 15.0.4063.15 CU7 9/2/2020 https://support.microsoft.com/en-us/help/4570012/cumulative-update-7-for-sql-server-2019 - - - --- How to determine the version, edition and update level of SQL Server and its components --- https://bit.ly/2oAjKgW - --- SQL Server 2019 build versions --- https://bit.ly/2qjKwOl +-- 15.0.4063.15 CU7 9/2/2020 -- CU7 was removed by Microsoft +-- 15.0.4073.23 CU8 10/1/2020 https://support.microsoft.com/en-in/help/4577194/cumulative-update-8-for-sql-server-2019 -- Performance and Stability Fixes in SQL Server 2019 CU Builds -- https://bit.ly/3712NQQ @@ -144,6 +137,7 @@ SERVERPROPERTY('IsHadrEnabled') AS [IsHadrEnabled], SERVERPROPERTY('HadrManagerStatus') AS [HadrManagerStatus], SERVERPROPERTY('InstanceDefaultDataPath') AS [InstanceDefaultDataPath], SERVERPROPERTY('InstanceDefaultLogPath') AS [InstanceDefaultLogPath], +SERVERPROPERTY('ErrorLogFileName') AS [ErrorLogFileName], SERVERPROPERTY('BuildClrVersion') AS [Build CLR Version], SERVERPROPERTY('IsXTPSupported') AS [IsXTPSupported], SERVERPROPERTY('IsPolybaseInstalled') AS [IsPolybaseInstalled], @@ -440,7 +434,7 @@ ORDER BY ag.name, ar.replica_server_name, adc.[database_name] OPTION (RECOMPILE) -- You will see no results if your instance is not using AlwaysOn AGs --- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged +-- SQL Server 2016 It Just Runs Faster: Always On Availability Groups Turbocharged -- https://bit.ly/2dn1H6r @@ -555,7 +549,42 @@ ORDER BY database_id OPTION (RECOMPILE); -- https://bit.ly/2Fvr1c9 --- Get number of data files in tempdb database (Query 23) (TempDB Data Files) +-- Read most recent entries from all SQL Server Error Logs (Query 23) (Error Log Entries) +DROP TABLE IF EXISTS #ErrorLogFiles; + CREATE TABLE #ErrorLogFiles + ([Archive #] INT,[Date] NVARCHAR(25),[Log File Size (Byte)]INT) + +INSERT INTO #ErrorLogFiles +([Archive #],[Date],[Log File Size (Byte)]) +EXEC master.sys.xp_enumerrorlogs; + +DROP TABLE IF EXISTS #SQLErrorLog_AllLogs; + CREATE TABLE #SQLErrorLog_AllLogs + (LogDate DATETIME ,ProcessInfo NVARCHAR(12), LogText NVARCHAR(4000)) + +DECLARE @i INT = 0; +DECLARE @sql NVARCHAR(200) = N''; +DECLARE @logCount INT = (SELECT COUNT(*) FROM #ErrorLogFiles); + +WHILE (@i < @logCount) + BEGIN + SET @sql = 'INSERT INTO #SQLErrorLog_AllLogs + (LogDate, ProcessInfo, LogText) + EXEC master.sys.sp_readerrorlog ' + CAST(@i AS NVARCHAR(2)) + N';' + EXEC master.sys.sp_executesql @sql; + SET @i += 1; + END + +SELECT TOP(1000)LogDate, ProcessInfo, LogText +FROM #SQLErrorLog_AllLogs WITH (NOLOCK) +ORDER BY LogDate DESC OPTION (RECOMPILE); + +DROP TABLE IF EXISTS #ErrorLogFiles; +DROP TABLE IF EXISTS #SQLErrorLog_AllLogs; +GO + + +-- Get number of data files in tempdb database (Query 24) (TempDB Data Files) EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; ------ @@ -564,7 +593,7 @@ EXEC sys.xp_readerrorlog 0, 1, N'The tempdb database has'; -- This query will return no results if your error log has been recycled since the instance was last started --- File names and paths for all user and system databases on instance (Query 24) (Database Filenames and Paths) +-- File names and paths for all user and system databases on instance (Query 25) (Database Filenames and Paths) SELECT DB_NAME([database_id]) AS [Database Name], [file_id], [name], physical_name, [type_desc], state_desc, is_percent_growth, growth, @@ -584,7 +613,7 @@ ORDER BY DB_NAME([database_id]), [file_id] OPTION (RECOMPILE); -- Is percent growth enabled for any files (which is bad)? --- Drive information for all fixed drives visible to the operating system (Query 25) (Fixed Drives) +-- Drive information for all fixed drives visible to the operating system (Query 26) (Fixed Drives) SELECT fixed_drive_path, drive_type_desc, CONVERT(DECIMAL(18,2), free_space_in_bytes/1073741824.0) AS [Available Space (GB)] FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); @@ -598,7 +627,7 @@ FROM sys.dm_os_enumerate_fixed_drives WITH (NOLOCK) OPTION (RECOMPILE); --- Volume info for all LUNS that have database files on the current instance (Query 26) (Volume Info) +-- Volume info for all LUNS that have database files on the current instance (Query 27) (Volume Info) SELECT DISTINCT vs.volume_mount_point, vs.file_system_type, vs.logical_volume_name, CONVERT(DECIMAL(18,2), vs.total_bytes/1073741824.0) AS [Total Size (GB)], CONVERT(DECIMAL(18,2), vs.available_bytes/1073741824.0) AS [Available Size (GB)], @@ -618,7 +647,7 @@ ORDER BY vs.volume_mount_point OPTION (RECOMPILE); --- Drive level latency information (Query 27) (Drive Level Latency) +-- Drive level latency information (Query 28) (Drive Level Latency) SELECT tab.[Drive], tab.volume_mount_point AS [Volume Mount Point], CASE WHEN num_of_reads = 0 THEN 0 @@ -668,7 +697,7 @@ ORDER BY [Overall Latency] OPTION (RECOMPILE); -- https://bit.ly/33thz2j --- Calculates average latency per read, per write, and per total input/output for each database file (Query 28) (IO Latency by File) +-- Calculates average latency per read, per write, and per total input/output for each database file (Query 29) (IO Latency by File) SELECT DB_NAME(fs.database_id) AS [Database Name], CAST(fs.io_stall_read_ms/(1.0 + fs.num_of_reads) AS NUMERIC(10,1)) AS [avg_read_latency_ms], CAST(fs.io_stall_write_ms/(1.0 + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_write_latency_ms], CAST((fs.io_stall_read_ms + fs.io_stall_write_ms)/(1.0 + fs.num_of_reads + fs.num_of_writes) AS NUMERIC(10,1)) AS [avg_io_latency_ms], @@ -692,7 +721,7 @@ ORDER BY avg_io_latency_ms DESC OPTION (RECOMPILE); -- https://bit.ly/3bRWUc0 --- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 29) (IO Warnings) +-- Look for I/O requests taking longer than 15 seconds in the six most recent SQL Server Error Logs (Query 30) (IO Warnings) CREATE TABLE #IOWarningResults(LogDate datetime, ProcessInfo sysname, LogText nvarchar(1000)); INSERT INTO #IOWarningResults @@ -728,7 +757,7 @@ DROP TABLE #IOWarningResults; -- https://bit.ly/2qtaw73 --- Resource Governor Resource Pool information (Query 30) (RG Resource Pools) +-- Resource Governor Resource Pool information (Query 31) (RG Resource Pools) SELECT pool_id, [Name], statistics_start_time, min_memory_percent, max_memory_percent, max_memory_kb/1024 AS [max_memory_mb], @@ -744,7 +773,7 @@ OPTION (RECOMPILE); --- Recovery model, log reuse wait description, log file size, log usage size (Query 31) (Database Properties) +-- Recovery model, log reuse wait description, log file size, log usage size (Query 32) (Database Properties) -- and compatibility level for all databases on instance SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], db.state_desc, db.containment_desc, db.log_reuse_wait_desc AS [Log Reuse Wait Description], @@ -756,11 +785,10 @@ db.is_auto_create_stats_on, db.is_auto_update_stats_on, db.is_auto_update_stats_ db.snapshot_isolation_state_desc, db.is_read_committed_snapshot_on, db.is_auto_close_on, db.is_auto_shrink_on, db.target_recovery_time_in_seconds, db.is_cdc_enabled, db.is_published, db.is_distributor, db.group_database_id, db.replica_id,db.is_memory_optimized_elevate_to_snapshot_on, -db.delayed_durability_desc, db.is_auto_create_stats_incremental_on, -db.is_query_store_on, db.is_sync_with_backup, db.is_temporal_history_retention_enabled, -db.is_supplemental_logging_enabled, db.is_remote_data_archive_enabled, -db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length, db.resource_pool_id, -db.is_tempdb_spill_to_remote_store, db.is_result_set_caching_on, db.is_accelerated_database_recovery_on, is_stale_page_detection_on +db.delayed_durability_desc, db.is_query_store_on, db.is_sync_with_backup, +db.is_temporal_history_retention_enabled, db.is_remote_data_archive_enabled, +db.is_encrypted, de.encryption_state, de.percent_complete, de.key_algorithm, de.key_length, +db.is_accelerated_database_recovery_on FROM sys.databases AS db WITH (NOLOCK) INNER JOIN sys.dm_os_performance_counters AS lu WITH (NOLOCK) ON db.name = lu.instance_name @@ -774,6 +802,16 @@ AND ls.cntr_value > 0 ORDER BY db.[name] OPTION (RECOMPILE); ------ +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX + +-- sys.dm_os_performance_counters (Transact-SQL) +-- https://bit.ly/3kEO2JR + +-- sys.dm_database_encryption_keys (Transact-SQL) +-- https://bit.ly/3mE7kkx + + -- Things to look at: -- How many databases are on the instance? -- What recovery models are they using? @@ -797,7 +835,7 @@ ORDER BY db.[name] OPTION (RECOMPILE); -- https://bit.ly/2pdggk3 --- Missing Indexes for all databases by Index Advantage (Query 32) (Missing Indexes All Databases) +-- Missing Indexes for all databases by Index Advantage (Query 33) (Missing Indexes All Databases) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], @@ -819,14 +857,14 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Also look at avg_user_impact and avg_total_user_cost to help determine importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query -- SQL Server Index Design Guide -- https://bit.ly/2qtZr4N --- Get VLF Counts for all databases on the instance (Query 33) (VLF Counts) +-- Get VLF Counts for all databases on the instance (Query 34) (VLF Counts) SELECT [name] AS [Database Name], [VLF Count] FROM sys.databases AS db WITH (NOLOCK) CROSS APPLY (SELECT file_id, COUNT(*) AS [VLF Count] @@ -839,15 +877,26 @@ ORDER BY [VLF Count] DESC OPTION (RECOMPILE); -- and they can make full database restores and crash recovery take much longer -- Try to keep your VLF counts under 200 in most cases (depending on log file size) --- Important change to VLF creation algorithm in SQL Server 2014 --- https://bit.ly/2Hsjbg4 +-- sys.dm_db_log_info (Transact-SQL) +-- https://bit.ly/3jpmqsd + +-- sys.databases (Transact-SQL) +-- https://bit.ly/2G5wqaX -- SQL Server Transaction Log Architecture and Management Guide -- https://bit.ly/2JjmQRZ +-- VLF Growth Formula (SQL Server 2014 and newer) +-- If the log growth increment is less than 1/8th the current size of the log +-- Then: 1 new VLF +-- Otherwise: +-- Up to 64MB: 4 new VLFs +-- 64MB to 1GB: 8 new VLFs +-- More than 1GB: 16 new VLFs + --- Get CPU utilization by database (Query 34) (CPU Usage by Database) +-- Get CPU utilization by database (Query 35) (CPU Usage by Database) WITH DB_CPU_Stats AS (SELECT pa.DatabaseID, DB_Name(pa.DatabaseID) AS [Database Name], SUM(qs.total_worker_time/1000) AS [CPU_Time_Ms] @@ -867,8 +916,14 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); -- Helps determine which database is using the most CPU resources on the instance -- Note: This only reflects CPU usage from the currently cached query plans +-- sys.dm_exec_query_stats (Transact-SQL) +-- https://bit.ly/32tHCGH + +-- sys.dm_exec_plan_attributes (Transact-SQL) +-- https://bit.ly/35iP2hV --- Get I/O utilization by database (Query 35) (IO Usage By Database) + +-- Get I/O utilization by database (Query 36) (IO Usage By Database) WITH Aggregate_IO_Statistics AS (SELECT DB_NAME(database_id) AS [Database Name], CAST(SUM(num_of_bytes_read + num_of_bytes_written) / 1048576 AS DECIMAL(12, 2)) AS [ioTotalMB], @@ -891,8 +946,11 @@ ORDER BY [I/O Rank] OPTION (RECOMPILE); -- These numbers are cumulative since the last service restart -- They include all I/O activity, not just the nominal I/O workload +-- sys.dm_io_virtual_file_stats (Transact-SQL) +-- https://bit.ly/3bRWUc0 + --- Get total buffer usage by database for current instance (Query 36) (Total Buffer Usage by Database) +-- Get total buffer usage by database for current instance (Query 37) (Total Buffer Usage by Database) -- This make take some time to run on a busy instance WITH AggregateBufferPoolUsage AS @@ -910,8 +968,11 @@ ORDER BY [Buffer Pool Rank] OPTION (RECOMPILE); -- Tells you how much memory (in the buffer pool) -- is being used by each database on the instance +-- sys.dm_os_buffer_descriptors (Transact-SQL) +-- https://bit.ly/36s7aFo + --- Get tempdb version store space usage by database (Query 37) (Version Store Space Usage) +-- Get tempdb version store space usage by database (Query 38) (Version Store Space Usage) SELECT DB_NAME(database_id) AS [Database Name], reserved_page_count AS [Version Store Reserved Page Count], reserved_space_kb/1024 AS [Version Store Reserved Space (MB)] @@ -928,7 +989,7 @@ ORDER BY reserved_space_kb/1024 DESC OPTION (RECOMPILE); -- Clear Wait Stats with this command -- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); --- Isolate top waits for server instance since last restart or wait statistics clear (Query 38) (Top Waits) +-- Isolate top waits for server instance since last restart or wait statistics clear (Query 39) (Top Waits) WITH [Waits] AS (SELECT wait_type, wait_time_ms/ 1000.0 AS [WaitS], (wait_time_ms - signal_wait_time_ms) / 1000.0 AS [ResourceS], @@ -1013,7 +1074,7 @@ OPTION (RECOMPILE); --- Get a count of SQL connections by IP address (Query 39) (Connection Counts by IP Address) +-- Get a count of SQL connections by IP address (Query 40) (Connection Counts by IP Address) SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT(ec.session_id) AS [connection count] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) @@ -1031,7 +1092,7 @@ ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); --- Get Average Task Counts (run multiple times) (Query 40) (Avg Task Counts) +-- Get Average Task Counts (run multiple times) (Query 41) (Avg Task Counts) SELECT AVG(current_tasks_count) AS [Avg Task Count], AVG(work_queue_count) AS [Avg Work Queue Count], AVG(runnable_tasks_count) AS [Avg Runnable Task Count], @@ -1052,7 +1113,7 @@ WHERE scheduler_id < 255 OPTION (RECOMPILE); --- Detect blocking (run multiple times) (Query 41) (Detect Blocking) +-- Detect blocking (run multiple times) (Query 42) (Detect Blocking) SELECT t1.resource_type AS [lock type], DB_NAME(resource_database_id) AS [database], t1.resource_associated_entity_id AS [blk object],t1.request_mode AS [lock req], -- lock requested t1.request_session_id AS [waiter sid], t2.wait_duration_ms AS [wait time], -- spid of waiter @@ -1081,7 +1142,7 @@ ON t1.lock_owner_address = t2.resource_address OPTION (RECOMPILE); --- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 42) (CPU Utilization History) +-- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 43) (CPU Utilization History) DECLARE @ts_now bigint = (SELECT ms_ticks FROM sys.dm_os_sys_info WITH (NOLOCK)); SELECT TOP(256) SQLProcessUtilization AS [SQL Server Process CPU Utilization], @@ -1106,7 +1167,7 @@ ORDER BY record_id DESC OPTION (RECOMPILE); -- on high core count (> 64 cores) systems --- Get top total worker time queries for entire instance (Query 43) (Top Worker Time Queries) +-- Get top total worker time queries for entire instance (Query 44) (Top Worker Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_worker_time AS [Total Worker Time], qs.min_worker_time AS [Min Worker Time], @@ -1134,7 +1195,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); --- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 44) (PLE by NUMA Node) +-- Page Life Expectancy (PLE) value for each NUMA node in current instance (Query 45) (PLE by NUMA Node) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], instance_name, cntr_value AS [Page Life Expectancy] FROM sys.dm_os_performance_counters WITH (NOLOCK) @@ -1146,11 +1207,11 @@ AND counter_name = N'Page life expectancy' OPTION (RECOMPILE); -- Higher PLE is better. Watch the trend over time, not the absolute value -- This will only return one row for non-NUMA systems --- Page Life Expectancy isnt what you think +-- Page Life Expectancy isnt what you think -- https://bit.ly/2EgynLa --- Memory Grants Pending value for current instance (Query 45) (Memory Grants Pending) +-- Memory Grants Pending value for current instance (Query 46) (Memory Grants Pending) SELECT @@SERVERNAME AS [Server Name], RTRIM([object_name]) AS [Object Name], cntr_value AS [Memory Grants Pending] FROM sys.dm_os_performance_counters WITH (NOLOCK) WHERE [object_name] LIKE N'%Memory Manager%' -- Handles named instances @@ -1161,7 +1222,7 @@ AND counter_name = N'Memory Grants Pending' OPTION (RECOMPILE); -- Memory Grants Pending above zero for a sustained period is a very strong indicator of internal memory pressure --- Memory Clerk Usage for instance (Query 46) (Memory Clerk Usage) +-- Memory Clerk Usage for instance (Query 47) (Memory Clerk Usage) -- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans) SELECT TOP(10) mc.[type] AS [Memory Clerk Type], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)] @@ -1186,7 +1247,7 @@ ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE); --- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 47) (Ad hoc Queries) +-- Find single-use, ad-hoc and prepared queries that are bloating the plan cache (Query 48) (Ad hoc Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], t.[text] AS [Query Text], cp.objtype AS [Object Type], cp.cacheobjtype AS [Cache Object Type], cp.size_in_bytes/1024 AS [Plan Size in KB] @@ -1207,7 +1268,7 @@ ORDER BY cp.size_in_bytes DESC, DB_NAME(t.[dbid]) OPTION (RECOMPILE); -- https://bit.ly/2EfYOkl --- Get top total logical reads queries for entire instance (Query 48) (Top Logical Reads Queries) +-- Get top total logical reads queries for entire instance (Query 49) (Top Logical Reads Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_logical_reads AS [Total Logical Reads], @@ -1235,7 +1296,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Get top average elapsed time queries for entire instance (Query 49) (Top Avg Elapsed Time Queries) +-- Get top average elapsed time queries for entire instance (Query 50) (Top Avg Elapsed Time Queries) SELECT TOP(50) DB_NAME(t.[dbid]) AS [Database Name], REPLACE(REPLACE(LEFT(t.[text], 255), CHAR(10),''), CHAR(13),'') AS [Short Query Text], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1257,7 +1318,7 @@ ORDER BY qs.total_elapsed_time/qs.execution_count DESC OPTION (RECOMPILE); -- Can also help track down parameter sniffing issues --- Look at UDF execution statistics (Query 50) (UDF Stats by DB) +-- Look at UDF execution statistics (Query 51) (UDF Stats by DB) SELECT TOP (25) DB_NAME(database_id) AS [Database Name], OBJECT_NAME(object_id, database_id) AS [Function Name], total_worker_time, execution_count, total_elapsed_time, @@ -1280,20 +1341,20 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); --USE YourDatabaseName; -- make sure to change to an actual database on your instance, not the master system database --GO --- Individual File Sizes and space available for current database (Query 51) (File Sizes and Space) -SELECT f.name AS [File Name] , f.physical_name AS [Physical Name], +-- Individual File Sizes and space available for current database (Query 52) (File Sizes and Space) +SELECT f.[name] AS [File Name] , f.physical_name AS [Physical Name], CAST((f.size/128.0) AS DECIMAL(15,2)) AS [Total Size in MB], +CAST((f.size/128.0) AS DECIMAL(15,2)) - +CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) +AS [Used Space in MB], CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) AS [Available Space In MB], -CAST((f.size/128.0) AS DECIMAL(15,2)) - -CAST(f.size/128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(15,2)) AS [Used Space in MB], f.[file_id], fg.name AS [Filegroup Name], -f.is_percent_growth, f.growth, fg.is_default, fg.is_read_only, -fg.is_autogrow_all_files +f.is_percent_growth, f.growth, fg.is_default, fg.is_read_only, fg.is_autogrow_all_files FROM sys.database_files AS f WITH (NOLOCK) LEFT OUTER JOIN sys.filegroups AS fg WITH (NOLOCK) ON f.data_space_id = fg.data_space_id -ORDER BY f.[file_id] OPTION (RECOMPILE); +ORDER BY f.[type], f.[file_id] OPTION (RECOMPILE); ------ -- Look at how large and how full the files are and where they are located @@ -1305,7 +1366,7 @@ ORDER BY f.[file_id] OPTION (RECOMPILE); -- https://bit.ly/2evRZSR --- Log space usage for current database (Query 52) (Log Space Usage) +-- Log space usage for current database (Query 53) (Log Space Usage) SELECT DB_NAME(lsu.database_id) AS [Database Name], db.recovery_model_desc AS [Recovery Model], CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)], CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)], @@ -1324,7 +1385,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2H4MQw9 --- Status of last VLF for current database (Query 53) (Last VLF Status) +-- Status of last VLF for current database (Query 54) (Last VLF Status) SELECT TOP(1) DB_NAME(li.database_id) AS [Database Name], li.[file_id], li.vlf_size_mb, li.vlf_sequence_number, li.vlf_active, li.vlf_status FROM sys.dm_db_log_info(DB_ID()) AS li @@ -1343,7 +1404,7 @@ ORDER BY vlf_sequence_number DESC OPTION (RECOMPILE); --- Get database scoped configuration values for current database (Query 54) (Database-scoped Configurations) +-- Get database scoped configuration values for current database (Query 55) (Database-scoped Configurations) SELECT configuration_id, name, [value] AS [value_for_primary], value_for_secondary FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); ------ @@ -1357,7 +1418,7 @@ FROM sys.database_scoped_configurations WITH (NOLOCK) OPTION (RECOMPILE); -- https://bit.ly/2sOH7nb --- I/O Statistics by file for the current database (Query 55) (IO Stats By File) +-- I/O Statistics by file for the current database (Query 56) (IO Stats By File) SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id], df.type_desc, df.physical_name AS [Physical Name], CAST(vfs.size_on_disk_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Size on Disk (MB)], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms, @@ -1380,7 +1441,7 @@ ON vfs.[file_id]= df.[file_id] OPTION (RECOMPILE); --- Get most frequently executed queries for this database (Query 56) (Query Execution Counts) +-- Get most frequently executed queries for this database (Query 57) (Query Execution Counts) SELECT TOP(50) LEFT(t.[text], 50) AS [Short Query Text], qs.execution_count AS [Execution Count], qs.total_logical_reads AS [Total Logical Reads], qs.total_logical_reads/qs.execution_count AS [Avg Logical Reads], @@ -1403,9 +1464,9 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- It also helps you find possible caching opportunities --- Queries 57 through 63 are the "Bad Man List" for stored procedures +-- Queries 58 through 64 are the "Bad Man List" for stored procedures --- Top Cached SPs By Execution Count (Query 57) (SP Execution Counts) +-- Top Cached SPs By Execution Count (Query 58) (SP Execution Counts) SELECT TOP(100) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1429,7 +1490,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); -- It also helps you find possible caching opportunities --- Top Cached SPs By Avg Elapsed Time (Query 58) (SP Avg Elapsed Time) +-- Top Cached SPs By Avg Elapsed Time (Query 59) (SP Avg Elapsed Time) SELECT TOP(25) p.name AS [SP Name], qs.min_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.max_elapsed_time, qs.last_elapsed_time, qs.total_elapsed_time, qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], @@ -1453,7 +1514,7 @@ ORDER BY avg_elapsed_time DESC OPTION (RECOMPILE); --- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 59) (SP Worker Time) +-- Top Cached SPs By Total Worker time. Worker time relates to CPU cost (Query 60) (SP Worker Time) SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime], qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], @@ -1475,7 +1536,7 @@ ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE); -- You should look at this if you see signs of CPU pressure --- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 60) (SP Logical Reads) +-- Top Cached SPs By Total Logical Reads. Logical reads relate to memory pressure (Query 61) (SP Logical Reads) SELECT TOP(25) p.name AS [SP Name], qs.total_logical_reads AS [TotalLogicalReads], qs.total_logical_reads/qs.execution_count AS [AvgLogicalReads],qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], @@ -1497,7 +1558,7 @@ ORDER BY qs.total_logical_reads DESC OPTION (RECOMPILE); -- You should look at this if you see signs of memory pressure --- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 61) (SP Physical Reads) +-- Top Cached SPs By Total Physical Reads. Physical reads relate to disk read I/O pressure (Query 62) (SP Physical Reads) SELECT TOP(25) p.name AS [SP Name],qs.total_physical_reads AS [TotalPhysicalReads], qs.total_physical_reads/qs.execution_count AS [AvgPhysicalReads], qs.execution_count, qs.total_logical_reads,qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], @@ -1519,7 +1580,7 @@ ORDER BY qs.total_physical_reads DESC, qs.total_logical_reads DESC OPTION (RECOM --- Top Cached SPs By Total Logical Writes (Query 62) (SP Logical Writes) +-- Top Cached SPs By Total Logical Writes (Query 63) (SP Logical Writes) -- Logical writes relate to both memory and disk I/O pressure SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, @@ -1544,7 +1605,7 @@ ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); --- Cached SPs Missing Indexes by Execution Count (Query 63) (SP Missing Index) +-- Cached SPs Missing Indexes by Execution Count (Query 64) (SP Missing Index) SELECT TOP(25) p.name AS [SP Name], qs.execution_count AS [Execution Count], ISNULL(qs.execution_count/DATEDIFF(Minute, qs.cached_time, GETDATE()), 0) AS [Calls/Minute], qs.total_elapsed_time/qs.execution_count AS [Avg Elapsed Time], @@ -1568,7 +1629,7 @@ ORDER BY qs.execution_count DESC OPTION (RECOMPILE); --- Lists the top statements by average input/output usage for the current database (Query 64) (Top IO Statements) +-- Lists the top statements by average input/output usage for the current database (Query 65) (Top IO Statements) SELECT TOP(50) OBJECT_NAME(qt.objectid, dbid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], qs.execution_count AS [Execution Count], SUBSTRING(qt.[text],qs.statement_start_offset/2, @@ -1587,7 +1648,7 @@ ORDER BY [Avg IO] DESC OPTION (RECOMPILE); --- Possible Bad NC Indexes (writes > reads) (Query 65) (Bad NC Indexes) +-- Possible Bad NC Indexes (writes > reads) (Query 66) (Bad NC Indexes) SELECT SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(s.[object_id]) AS [Table Name], i.name AS [Index Name], i.index_id, @@ -1613,7 +1674,7 @@ ORDER BY [Difference] DESC, [Total Writes] DESC, [Total Reads] ASC OPTION (RECOM -- Investigate further before dropping an index! --- Missing Indexes for current database by Index Advantage (Query 66) (Missing Indexes) +-- Missing Indexes for current database by Index Advantage (Query 67) (Missing Indexes) SELECT CONVERT(decimal(18,2), migs.user_seeks * migs.avg_total_user_cost * (migs.avg_user_impact * 0.01)) AS [index_advantage], FORMAT(migs.last_user_seek, 'yyyy-MM-dd HH:mm:ss') AS [last_user_seek], mid.[statement] AS [Database.Schema.Table], COUNT(1) OVER(PARTITION BY mid.[statement]) AS [missing_indexes_for_table], @@ -1638,10 +1699,10 @@ ORDER BY index_advantage DESC OPTION (RECOMPILE); -- Look at index advantage, last user seek time, number of user seeks to help determine source and importance -- SQL Server is overly eager to add included columns, so beware -- Do not just blindly add indexes that show up from this query!!! --- Hkan Winther has given me some great suggestions for this query +-- Hkan Winther has given me some great suggestions for this query --- Find missing index warnings for cached plans in the current database (Query 67) (Missing Index Warnings) +-- Find missing index warnings for cached plans in the current database (Query 68) (Missing Index Warnings) -- Note: This query could take some time on a busy instance SELECT TOP(25) OBJECT_NAME(objectid) AS [ObjectName], cp.objtype, cp.usecounts, cp.size_in_bytes, qp.query_plan @@ -1656,7 +1717,7 @@ ORDER BY cp.usecounts DESC OPTION (RECOMPILE); -- This can help you decide whether to add them or not --- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 68) (Buffer Usage) +-- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 69) (Buffer Usage) -- Note: This query could take some time on a busy instance SELECT fg.name AS [Filegroup Name], SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.[object_id]) AS [Object Name], p.index_id, @@ -1688,7 +1749,7 @@ ORDER BY [BufferCount] DESC OPTION (RECOMPILE); -- It can help identify possible candidates for data compression --- Get Table names, row counts, and compression status for clustered index or heap (Query 69) (Table Sizes) +-- Get Table names, row counts, and compression status for clustered index or heap (Query 70) (Table Sizes) SELECT SCHEMA_NAME(o.Schema_ID) AS [Schema Name], OBJECT_NAME(p.object_id) AS [ObjectName], SUM(p.Rows) AS [RowCount], p.data_compression_desc AS [Compression Type] FROM sys.partitions AS p WITH (NOLOCK) @@ -1713,7 +1774,7 @@ ORDER BY SUM(p.Rows) DESC OPTION (RECOMPILE); --- Get some key table properties (Query 70) (Table Properties) +-- Get some key table properties (Query 71) (Table Properties) SELECT OBJECT_NAME(t.[object_id]) AS [ObjectName], p.[rows] AS [Table Rows], p.index_id, p.data_compression_desc AS [Index Data Compression], t.create_date, t.lock_on_bulk_load, t.is_replicated, t.has_replication_filter, @@ -1736,7 +1797,7 @@ ORDER BY OBJECT_NAME(t.[object_id]), p.index_id OPTION (RECOMPILE); --- When were Statistics last updated on all indexes? (Query 71) (Statistics Update) +-- When were Statistics last updated on all indexes? (Query 72) (Statistics Update) SELECT SCHEMA_NAME(o.Schema_ID) + N'.' + o.[NAME] AS [Object Name], o.[type_desc] AS [Object Type], i.[name] AS [Index Name], STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], s.auto_created, s.no_recompute, s.user_created, s.is_incremental, s.is_temporary, @@ -1767,7 +1828,7 @@ ORDER BY STATS_DATE(i.[object_id], i.index_id) DESC OPTION (RECOMPILE); --- Look at most frequently modified indexes and statistics (Query 72) (Volatile Indexes) +-- Look at most frequently modified indexes and statistics (Query 73) (Volatile Indexes) SELECT o.[name] AS [Object Name], o.[object_id], o.[type_desc], s.[name] AS [Statistics Name], s.stats_id, s.no_recompute, s.auto_created, s.is_incremental, s.is_temporary, sp.modification_counter, sp.[rows], sp.rows_sampled, sp.last_updated @@ -1785,7 +1846,7 @@ ORDER BY sp.modification_counter DESC, o.name OPTION (RECOMPILE); --- Get fragmentation info for all indexes above a certain size in the current database (Query 73) (Index Fragmentation) +-- Get fragmentation info for all indexes above a certain size in the current database (Query 74) (Index Fragmentation) -- Note: This query could take some time on a very large database SELECT DB_NAME(ps.database_id) AS [Database Name], SCHEMA_NAME(o.[schema_id]) AS [Schema Name], OBJECT_NAME(ps.OBJECT_ID) AS [Object Name], i.[name] AS [Index Name], ps.index_id, @@ -1807,8 +1868,9 @@ ORDER BY ps.avg_fragmentation_in_percent DESC OPTION (RECOMPILE); -- and how effective your index maintenance strategy is ---- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 74) (Overall Index Usage - Reads) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +--- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 75) (Overall Index Usage - Reads) +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName], OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_seeks, s.user_scans, s.user_lookups, s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], s.user_updates AS [Writes], @@ -1819,6 +1881,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); -- Order by reads ------ @@ -1826,8 +1890,9 @@ ORDER BY s.user_seeks + s.user_scans + s.user_lookups DESC OPTION (RECOMPILE); - -- Show which indexes in the current database are most active for Reads ---- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 75) (Overall Index Usage - Writes) -SELECT OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], i.index_id, +--- Index Read/Write stats (all tables in current DB) ordered by Writes (Query 76) (Overall Index Usage - Writes) +SELECT SCHEMA_NAME(t.[schema_id]) AS [SchemaName],OBJECT_NAME(i.[object_id]) AS [ObjectName], + i.[name] AS [IndexName], i.index_id, s.user_updates AS [Writes], s.user_seeks + s.user_scans + s.user_lookups AS [Total Reads], i.[type_desc] AS [Index Type], i.fill_factor AS [Fill Factor], i.has_filter, i.filter_definition, s.last_system_update, s.last_user_update @@ -1836,6 +1901,8 @@ LEFT OUTER JOIN sys.dm_db_index_usage_stats AS s WITH (NOLOCK) ON i.[object_id] = s.[object_id] AND i.index_id = s.index_id AND s.database_id = DB_ID() +LEFT OUTER JOIN sys.tables AS t WITH (NOLOCK) +ON t.[object_id] = i.[object_id] WHERE OBJECTPROPERTY(i.[object_id],'IsUserTable') = 1 ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes ------ @@ -1843,45 +1910,8 @@ ORDER BY s.user_updates DESC OPTION (RECOMPILE); -- Order by writes -- Show which indexes in the current database are most active for Writes --- Get in-memory OLTP index usage (Query 76) (XTP Index Usage) -SELECT OBJECT_NAME(i.[object_id]) AS [Object Name], i.index_id, i.[name] AS [Index Name], - i.[type_desc], xis.scans_started, xis.scans_retries, - xis.rows_touched, xis.rows_returned -FROM sys.dm_db_xtp_index_stats AS xis WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON i.[object_id] = xis.[object_id] -AND i.index_id = xis.index_id -ORDER BY OBJECT_NAME(i.[object_id]) OPTION (RECOMPILE); ------- - --- This gives you some index usage statistics for in-memory OLTP --- Returns no data if you are not using in-memory OLTP - --- Guidelines for Using Indexes on Memory-Optimized Tables --- https://bit.ly/2GCP8lF - - - --- Look at Columnstore index physical statistics (Query 77) (Columnstore Index Physical Stat) -SELECT OBJECT_NAME(ps.object_id) AS [TableName], - i.[name] AS [IndexName], ps.index_id, ps.partition_number, - ps.delta_store_hobt_id, ps.state_desc, ps.total_rows, ps.size_in_bytes, - ps.trim_reason_desc, ps.generation, ps.transition_to_compressed_state_desc, - ps.has_vertipaq_optimization, ps.deleted_rows, - 100 * (ISNULL(ps.deleted_rows, 0))/ps.total_rows AS [Fragmentation] -FROM sys.dm_db_column_store_row_group_physical_stats AS ps WITH (NOLOCK) -INNER JOIN sys.indexes AS i WITH (NOLOCK) -ON ps.object_id = i.object_id -AND ps.index_id = i.index_id -ORDER BY ps.object_id, ps.partition_number, ps.row_group_id OPTION (RECOMPILE); ------- - --- sys.dm_db_column_store_row_group_physical_stats (Transact-SQL) --- https://bit.ly/2q276XQ - - --- Get lock waits for current database (Query 78) (Lock Waits) +-- Get lock waits for current database (Query 77) (Lock Waits) SELECT o.name AS [table_name], i.name AS [index_name], ios.index_id, ios.partition_number, SUM(ios.row_lock_wait_count) AS [total_row_lock_waits], SUM(ios.row_lock_wait_in_ms) AS [total_row_lock_wait_in_ms], @@ -1904,7 +1934,7 @@ ORDER BY total_lock_wait_in_ms DESC OPTION (RECOMPILE); --- Look at UDF execution statistics (Query 79) (UDF Statistics) +-- Look at UDF execution statistics (Query 78) (UDF Statistics) SELECT OBJECT_NAME(object_id) AS [Function Name], execution_count, total_worker_time, total_logical_reads, total_physical_reads, total_elapsed_time, total_elapsed_time/execution_count AS [avg_elapsed_time], @@ -1922,7 +1952,7 @@ ORDER BY total_worker_time DESC OPTION (RECOMPILE); -- https://bit.ly/2q1Q6BM --- Determine which scalar UDFs are in-lineable (Query 80) (Inlineable UDFs) +-- Determine which scalar UDFs are in-lineable (Query 79) (Inlineable UDFs) SELECT OBJECT_NAME(m.object_id) AS [Function Name], is_inlineable, inline_type FROM sys.sql_modules AS m WITH (NOLOCK) LEFT OUTER JOIN sys.dm_exec_function_stats AS efs WITH (NOLOCK) @@ -1938,7 +1968,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2Qt216S --- Get QueryStore Options for this database (Query 81) (QueryStore Options) +-- Get QueryStore Options for this database (Query 80) (QueryStore Options) SELECT actual_state_desc, desired_state_desc, [interval_length_minutes], current_storage_size_mb, [max_storage_size_mb], query_capture_mode_desc, size_based_cleanup_mode_desc @@ -1956,7 +1986,7 @@ FROM sys.database_query_store_options WITH (NOLOCK) OPTION (RECOMPILE); --- Get input buffer information for the current database (Query 82) (Input Buffer) +-- Get input buffer information for the current database (Query 81) (Input Buffer) SELECT es.session_id, DB_NAME(es.database_id) AS [Database Name], es.login_time, es.cpu_time, es.logical_reads, es.memory_usage, es.[status], ib.event_info AS [Input Buffer] @@ -1978,7 +2008,7 @@ AND es.session_id <> @@SPID OPTION (RECOMPILE); --- Get any resumable index rebuild operation information (Query 83) (Resumable Index Rebuild) +-- Get any resumable index rebuild operation information (Query 82) (Resumable Index Rebuild) SELECT OBJECT_NAME(iro.object_id) AS [Object Name], iro.index_id, iro.name AS [Index Name], iro.sql_text, iro.last_max_dop_used, iro.partition_number, iro.state_desc, iro.start_time, iro.percent_complete @@ -1990,7 +2020,7 @@ OPTION (RECOMPILE); -- https://bit.ly/2pYSWqq --- Get database automatic tuning options (Query 84) (Automatic Tuning Options) +-- Get database automatic tuning options (Query 83) (Automatic Tuning Options) SELECT [name], desired_state_desc, actual_state_desc, reason_desc FROM sys.database_automatic_tuning_options WITH (NOLOCK) OPTION (RECOMPILE); @@ -2001,7 +2031,7 @@ OPTION (RECOMPILE); --- Look at recent Full backups for the current database (Query 85) (Recent Full Backups) +-- Look at recent Full backups for the current database (Query 84) (Recent Full Backups) SELECT TOP (30) bs.machine_name, bs.server_name, bs.database_name AS [Database Name], bs.recovery_model, CONVERT (BIGINT, bs.backup_size / 1048576 ) AS [Uncompressed Backup Size (MB)], CONVERT (BIGINT, bs.compressed_backup_size / 1048576 ) AS [Compressed Backup Size (MB)], @@ -2031,31 +2061,9 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); -- https://bit.ly/28Rpb2x --- These six Pluralsight Courses go into more detail about how to run these queries and interpret the results - --- Azure SQL Database: Diagnosing Performance Issues with DMVs --- https://bit.ly/2meDRCN - --- SQL Server 2017: Diagnosing Performance Issues with DMVs --- https://bit.ly/2FqCeti - --- SQL Server 2017: Diagnosing Configuration Issues with DMVs --- https://bit.ly/2MSUDUL - --- SQL Server 2014 DMV Diagnostic Queries Part 1 --- https://bit.ly/2plxCer - --- SQL Server 2014 DMV Diagnostic Queries Part 2 --- https://bit.ly/2IuJpzI - --- SQL Server 2014 DMV Diagnostic Queries Part 3 --- https://bit.ly/2FIlCPb - - - - -- Microsoft Visual Studio Dev Essentials -- https://bit.ly/2qjNRxi -- Microsoft Azure Learn --- https://bit.ly/2O0Hacc \ No newline at end of file +-- https://bit.ly/2O0Hacc + diff --git a/Scripts/glen_berry_diagnostic_queries_links.txt b/Scripts/glen_berry_diagnostic_queries_links.txt new file mode 100644 index 00000000..61ed9804 --- /dev/null +++ b/Scripts/glen_berry_diagnostic_queries_links.txt @@ -0,0 +1,9 @@ +https://www.dropbox.com/s/k1vauzxxhyh1fnb/SQL%20Server%202019%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/3ix2lqhry34c5wy/SQL%20Server%202017%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/pkpxihdkq3odgbj/SQL%20Server%202016%20SP2%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/w6gi8j76k64fgbg/SQL%20Server%202016%20SP1%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/uttp0843e5078vs/SQL%20Server%202014%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/3l4yotzedk45xeh/SQL%20Server%202012%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/fq6hyw899fe3crv/SQL%20Server%202008%20R2%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/mjxw1w9tgw7eo6g/SQL%20Server%202008%20Diagnostic%20Information%20Queries.sql?dl=1 +https://www.dropbox.com/s/3kkskuheyzauih9/SQL%20Server%202005%20Diagnostic%20Information%20Queries.sql?dl=1 From 83d121463836a1a9578db760eb6976fc0ac5d03e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 12 Dec 2020 16:20:50 +0300 Subject: [PATCH 180/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 09e45706..7e7b93cc 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1311,6 +1311,8 @@ Articles types: | [Optimizing memory settings in Analysis Services] | Marco Russo | 2020-12-07 | [DBA] | | [VMware and SQL Server Best Practices] | Mike Walsh | 2020-12-02 | [DBA] | | [Autoparameterized Trivial Queries May Not Get Partition Elimination] | Brent Ozar | 2020-11-26 | [DBA][DEV] | +| [Trigram Wildcard String Search in SQL Server] | Paul White | 2017-09-08 | [DBA][DEV] | +| [Which Locks Count Toward Lock Escalation?] | Kendra Little | 2017-04-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2596,3 +2598,5 @@ Articles types: [Optimizing memory settings in Analysis Services]:https://www.sqlbi.com/articles/optimizing-memory-settings-in-analysis-services/ [VMware and SQL Server Best Practices]:https://straightpathsql.com/archives/2020/12/vmware-and-sql-server-best-practices/ [Autoparameterized Trivial Queries May Not Get Partition Elimination]:https://www.brentozar.com/archive/2020/12/autoparameterized-trivial-queries-may-not-get-partition-elimination/ +[Trigram Wildcard String Search in SQL Server]:https://sqlperformance.com/2017/09/sql-performance/sql-server-trigram-wildcard-search +[Which Locks Count Toward Lock Escalation?]:https://littlekendra.com/2017/04/03/which-locks-count-toward-lock-escalation/ From 262a26fbacd427071fc43069ec5a19559618d9e0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 13 Dec 2020 16:21:53 +0300 Subject: [PATCH 181/553] Add adutil info --- Utilities/README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index f1f91620..eb233850 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Utilities and Tools -Useful free and paid Microsoft SQL Server utilities and tools - complete list of **394** SQL Server Utilities +Useful free and paid Microsoft SQL Server utilities and tools - complete list of **395** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - **[B]**: Backup solutions {17} @@ -8,7 +8,7 @@ Utility types (main purpose), in braces `{}` current counts: - **[DA]**: Database Architecture {20} - **[DC]**: Data compare {15} - **[ETL]**: Extract Download Load (ETL) Tools {9} - - **[I]**: Internal SQL Server utilities (for example, bcp) {14} + - **[I]**: Internal SQL Server utilities (for example, bcp) {15} - **[IDX]**: Index manager {3} - **[G]**: Data generation {4} - **[J]**: Job managers {4} @@ -61,6 +61,7 @@ Utility types (main purpose), in braces `{}` current counts: | [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | | [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | | [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | +| [adutil Utility](#adutil-utility) | No | Linux | [I] | [adutil Utility] | 2020-10-30 | Microsoft | | Yes | No | | [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | | [SQL Server 2005 Best Practices Analyzer](#bpa-2005) | No | No | [?] | [BPA 2005] | 2008-08-13 | Microsoft | | Yes | No | | [SQL Server 2000 Best Practices Analyzer](#bpa-2000) | No | No | [?] | [BPA 2000] | 2010-04-26 | Microsoft | | Yes | No | @@ -939,6 +940,18 @@ The dtexec utility provides access to all the package configuration and executio The dtexec utility lets you load packages from these sources: the Integration Services server, an .ispac project file, a Microsoft SQL Server database, the SSIS Package Store, and the file system. +## adutil Utility + +Download page: [adutil Utility]
+Release date: -
+Support Version: 2017-2019
+Author: Microsoft
+Free version: Yes
+Price: No + +Configure Active Directory authentication with SQL Server on Linux. + + ## SQL Server 2016 Report Builder Download page: [SQL Server 2016 Report Builder]
@@ -6203,10 +6216,11 @@ Babelfish is a new translation layer for Amazon Aurora PostgreSQL that enables A [SqlLocalDB Utility]:https://msdn.microsoft.com/en-us/library/hh212961.aspx [sqllogship Utility]:https://msdn.microsoft.com/en-us/library/bb283327.aspx [sqlservr Application]:https://msdn.microsoft.com/en-us/library/ms162819.aspx -[sqlps Utility]: https://msdn.microsoft.com/en-us/library/cc280450.aspx -[sqlmaint Utility]: https://msdn.microsoft.com/en-us/library/ms162827.aspx -[Ssms Utility]: https://msdn.microsoft.com/en-us/library/ms162825.aspx -[dtexec Utility]: https://msdn.microsoft.com/en-us/library/hh231187.aspx +[sqlps Utility]:https://msdn.microsoft.com/en-us/library/cc280450.aspx +[sqlmaint Utility]:https://msdn.microsoft.com/en-us/library/ms162827.aspx +[Ssms Utility]:https://msdn.microsoft.com/en-us/library/ms162825.aspx +[dtexec Utility]:https://msdn.microsoft.com/en-us/library/hh231187.aspx +[adutil Utility]:https://docs.microsoft.com/sql/linux/sql-server-linux-ad-auth-adutil-tutorial [SQL Server 2016 Report Builder]:https://www.microsoft.com/en-us/download/details.aspx?id=53613 [DLM Dashboard]:http://www.red-gate.com/products/dlm/dlm-dashboard/ [Red Gate SQL Compare]:http://www.red-gate.com/products/sql-development/sql-compare/ From 8c6d71fd6fe199f36c3c4acaca9bb89d823129b4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 14 Dec 2020 17:52:05 +0300 Subject: [PATCH 182/553] Update utilities info --- Utilities/README.md | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index eb233850..d60f41a5 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -44,8 +44,8 @@ Utility types (main purpose), in braces `{}` current counts: | [SQL Server Data Tools](#ssdt) | No | No | [MS] | [SQL Server Data Tools] | 2018-04-10 | Microsoft | | Yes | No | | [Database Health Monitor](#database-health-monitor) | No | No | [M] | [Database Health Monitor] | 2019-12-01 | Steve Stedman | | Yes | No | | [SchemaDrift](#schemadrift) | No | No | [SC] | [SchemaDrift] | 2016-02-28 | Steve Stedman | | Yes | No | -| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2018-09-24 | Open Source | | Yes | No | -| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2019-06-15 | Open Source | | Yes | No | +| [Dbeaver](#dbeaver) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Dbeaver] | 2020-11-29 | Open Source | | Yes | No | +| [HeidiSQL](#heidisql) | MySQL,PostgreSQL,Other | No | [MS] | [HeidiSQL] | 2020-11-02 | Open Source | | Yes | No | | [SQLExecStats](#sqlexecstats) | No | No | [ST] | [SQLExecStats] | 2016-02-08 | Joe Chang | | Yes | No | | [ExpressProfiler](#expressprofiler) | No | No | [?] | [ExpressProfiler] | 2016-02-15 | Chris Moore | | Yes | No | | [Data Migration Assistant](#data-migration-assistant) | No | No | [MG] | [Data Migration Assistant] | 2020-04-23 | Microsoft | | Yes | No | @@ -59,7 +59,7 @@ Utility types (main purpose), in braces `{}` current counts: | [sqlservr Application](#sqlservr-application) | No | No | [I] | [sqlservr Application] | - | Microsoft | | Yes | No | | [sqlps Utility](#sqlps-utility) | No | No | [I] | [sqlps Utility] | - | Microsoft | | Yes | No | | [sqlmaint Utility](#sqlmaint-utility) | No | No | [I] | [sqlmaint Utility] | - | Microsoft | | Yes | No | -| [Ssms Utility](#ssms-utility) | No | No | [I] | [Ssms Utility] | - | Microsoft | | Yes | No | +| [SSMS Utility](#ssms-utility) | No | No | [I] | [SSMS Utility] | - | Microsoft | | Yes | No | | [dtexec Utility](#dtexec-utility) | No | No | [I] | [dtexec Utility] | - | Microsoft | | Yes | No | | [adutil Utility](#adutil-utility) | No | Linux | [I] | [adutil Utility] | 2020-10-30 | Microsoft | | Yes | No | | [SQL Server 2016 Report Builder](#report-builder-2016) | No | No | [?] | [SQL Server 2016 Report Builder] | 2016-09-16 | Microsoft | | Yes | No | @@ -704,26 +704,26 @@ SchemaDrift is a SQL Server database comparison tool that allows you to compare ## DBeaver Download page: [DBeaver]
-Release date: 2018-09-24
-Support Version: 2005-2017
+Release date: 2020-11-29
+Support Version: 2005-2019
Author: Open Source
Free version: Yes
Price: No -Free multi-platform database tool for developers, SQL programmers, database administrators and analysts. -Supports all popular databases: MySQL, PostgreSQL, SQLite, Oracle, DB2, SQL Server, Sybase, MongoDB, Cassandra, etc +Free multi-platform database tool for developers, database administrators, analysts and all people who need to work with databases. +Supports all popular databases: MySQL, PostgreSQL, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Apache Hive, Phoenix, Presto, etc. ## HeidiSQL Download page: [HeidiSQL]
-Release date: 2019-06-15
-Support Version: 2005-2017
+Release date: 2020-11-02
+Support Version: 2005-2019
Author: Open Source
Free version: Yes
Price: No -HeidiSQL is a useful and reliable tool designed for web developers using the popular MySQL server, Microsoft SQL databases and PostgreSQL. +HeidiSQL is a useful and reliable tool designed for web developers using the popular MariaDB, MySQL, Microsoft SQL, PostgreSQL and SQLite. It enables you to browse and edit data, create and edit tables, views, procedures, triggers and scheduled events. Also, you can export structure and data either to SQL file, clipboard or to other servers. @@ -911,14 +911,14 @@ Avoid using this feature in new development work, and plan to modify application ## Ssms Utility -Download page: [Ssms Utility]
+Download page: [SSMS Utility]
Release date: -
Support Version: 2005/2008/2008R2/2012/2014/2016
Author: Microsoft
Free version: Yes
Price: No -The Ssms utility opens SQL Server Management Studio. +The SSMS utility opens SQL Server Management Studio. If specified, Ssms also establishes a connection to a server, and opens queries, scripts, files, projects, and solutions. You can specify files that contain queries, projects, or solutions. Files that contain queries are automatically connected to a server if connection information is provided and the file type is associated with that type of server. @@ -6203,23 +6203,23 @@ Babelfish is a new translation layer for Amazon Aurora PostgreSQL that enables A [SQL Server Data Tools]:https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt [Database Health Monitor]:http://databasehealth.com/download/ [SchemaDrift]:http://databasehealth.com/schemadrift/ -[Dbeaver]:http://dbeaver.jkiss.org/ -[HeidiSQL]:http://www.heidisql.com +[Dbeaver]:https://dbeaver.io +[HeidiSQL]:https://www.heidisql.com [SQLExecStats]:http://www.qdpma.com/ExecStats/SQLExecStats.html [ExpressProfiler]:https://expressprofiler.codeplex.com/ -[Migration Assistant for Sybase]:https://msdn.microsoft.com/en-us/library/hh302795(v=sql.130).aspx -[Data Migration Assistant]:https://www.microsoft.com/en-us/download/details.aspx?id=53595 -[dta Utility]:https://msdn.microsoft.com/en-us/library/ms162812.aspx -[osql Utility]:https://msdn.microsoft.com/en-us/library/ms162806.aspx -[sqldiag Utility]:https://msdn.microsoft.com/en-us/library/ms162833.aspx -[sqldumper Utility]:https://support.microsoft.com/en-us/kb/917825 -[SqlLocalDB Utility]:https://msdn.microsoft.com/en-us/library/hh212961.aspx -[sqllogship Utility]:https://msdn.microsoft.com/en-us/library/bb283327.aspx -[sqlservr Application]:https://msdn.microsoft.com/en-us/library/ms162819.aspx -[sqlps Utility]:https://msdn.microsoft.com/en-us/library/cc280450.aspx -[sqlmaint Utility]:https://msdn.microsoft.com/en-us/library/ms162827.aspx -[Ssms Utility]:https://msdn.microsoft.com/en-us/library/ms162825.aspx -[dtexec Utility]:https://msdn.microsoft.com/en-us/library/hh231187.aspx +[Migration Assistant for Sybase]:https://docs.microsoft.com/en-us/sql/ssma/sybase/sql-server-migration-assistant-for-sybase-sybasetosql +[Data Migration Assistant]:https://docs.microsoft.com/en-us/sql/dma/dma-overview +[dta Utility]:https://docs.microsoft.com/en-us/sql/tools/dta/dta-utility +[osql Utility]:https://docs.microsoft.com/en-us/sql/tools/osql-utility +[sqldiag Utility]:https://docs.microsoft.com/en-us/sql/tools/sqldiag-utility +[sqldumper Utility]:https://docs.microsoft.com/en-us/troubleshoot/sql/tools/use-sqldumper-generate-dump-file +[SqlLocalDB Utility]:https://docs.microsoft.com/en-us/sql/tools/sqllocaldb-utility +[sqllogship Utility]:https://docs.microsoft.com/en-us/sql/tools/sqllogship-application +[sqlservr Application]:https://docs.microsoft.com/en-us/sql/tools/sqlservr-application +[sqlps Utility]:https://docs.microsoft.com/en-us/sql/tools/sqlps-utility +[sqlmaint Utility]:https://docs.microsoft.com/en-us/sql/tools/sqlmaint-utility +[SSMS Utility]:https://docs.microsoft.com/en-us/sql/ssms/ssms-utility +[dtexec Utility]:https://docs.microsoft.com/en-us/sql/integration-services/packages/dtexec-utility [adutil Utility]:https://docs.microsoft.com/sql/linux/sql-server-linux-ad-auth-adutil-tutorial [SQL Server 2016 Report Builder]:https://www.microsoft.com/en-us/download/details.aspx?id=53613 [DLM Dashboard]:http://www.red-gate.com/products/dlm/dlm-dashboard/ From c155e3a06d02eadad0a06b39e2aeb3c76108ca6f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 15 Dec 2020 16:54:10 +0300 Subject: [PATCH 183/553] Add edX courses link --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aa1668f..2b5e43fb 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [udf_SplitStringByDelimiter](/User_Defined_Function/udf_SplitStringByDelimiter.sql) - [udf_Tally](/User_Defined_Function/udf_Tally.sql) - and many others... - - [Utilities](/Utilities) (**Complete list of 393 SQL Server paid and free Utilities and Tools**) + - [Utilities](/Utilities) (**Complete list of 395 SQL Server paid and free Utilities and Tools**) **[⬆ back to top](#table-of-contents)** @@ -231,6 +231,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [T-SQL Tutorial and examples](https://www.tsql.info/sql-tutorial.php) (by tsql.info) - [Red Gate Data Platform courses](https://www.red-gate.com/hub/university/courses/data-platform) (by Red Gate) - [SQLZoo tutorial](https://sqlzoo.net/) + - [edX SQL Courses](https://www.edx.org/learn/sql) (by edX) - Paid - [Lynda Courses](http://www.lynda.com/SQL-Server-training-tutorials/456-0.html) - [Veeam Free Courses](https://go.veeam.com/microsoft-sql-series-webinars.html) From d3778d623345f74d97d1d44eb0bdc9dbe56e645a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 16 Dec 2020 18:01:56 +0300 Subject: [PATCH 184/553] Add LockEscalation XE --- Extended_Events/LockEscalation.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Extended_Events/LockEscalation.sql diff --git a/Extended_Events/LockEscalation.sql b/Extended_Events/LockEscalation.sql new file mode 100644 index 00000000..eaca905f --- /dev/null +++ b/Extended_Events/LockEscalation.sql @@ -0,0 +1,14 @@ +/* +https://littlekendra.com/2017/04/03/which-locks-count-toward-lock-escalation/ +by Kendra Little Melton 2017-04-03 +*/ + +DROP EVENT SESSION LockEscalation ON SERVER; +GO + +CREATE EVENT SESSION LockEscalation ON SERVER +ADD EVENT sqlserver.lock_escalation(SET collect_database_name=(1),collect_statement=(1) + ACTION(sqlserver.session_id)) +ADD TARGET package0.event_file(SET filename=N'C:\XE\Lock_Escalation.xel') +WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=NO_EVENT_LOSS,MAX_DISPATCH_LATENCY=5 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF) +GO From 838391200292457c887eeafc366d7804c07fdbd7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 17 Dec 2020 18:02:42 +0300 Subject: [PATCH 185/553] Add SSMS 18.8 info --- SSMS/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index 5b5f2cad..a4525d35 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -49,18 +49,18 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u ## Available Languages -**SQL Server Management Studio 18.5 GA**: - [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x804) | - [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x404) | - [English (United States)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x409) | - [French](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x40c) | - [German](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x407) | - [Italian](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x410) | - [Japanese](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x411) | - [Korean](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x412) | - [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x416) | - [Russian](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x419) | - [Spanish](https://go.microsoft.com/fwlink/?linkid=2147207&clcid=0x40a) +**SQL Server Management Studio 18.8 GA**: + [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x804) | + [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x404) | + [English (United States)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x409) | + [French](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x40c) | + [German](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x407) | + [Italian](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x410) | + [Japanese](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x411) | + [Korean](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x412) | + [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x416) | + [Russian](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x419) | + [Spanish](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x40a) ## SQL Server Management Studio Download Links and Release Info @@ -70,7 +70,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.7.1 GA Release] | **Latest GA** | 15.0.18358.0 | 2020-10-27 | 635 | +| [18.8 GA Release] | **Latest GA** | 15.0.18369.0 | 2020-12-17 | 640 | +| [18.7.1 GA Release] | | 15.0.18358.0 | 2020-10-27 | 635 | | [18.7. GA Release] | | 15.0.18357.0 | 2020-10-20 | 635 | | [18.6 GA Release] | | 15.0.18338.0 | 2020-07-22 | 534 | | [18.5.1 GA Release] | | 15.0.18333.0 | 2020-06-09 | 535 | @@ -115,6 +116,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | +[18.8 GA Release]:https://go.microsoft.com/fwlink/?linkid=2151644 [18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 [18.7 GA Release]:https://go.microsoft.com/fwlink/?linkid=2146265 [18.6 GA Release]:https://go.microsoft.com/fwlink/?linkid=2135491 From e9cda1f1413858913650b868542a7c2bdeb6bdc6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 18 Dec 2020 14:20:54 +0300 Subject: [PATCH 186/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 7e7b93cc..98a2c449 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1313,6 +1313,7 @@ Articles types: | [Autoparameterized Trivial Queries May Not Get Partition Elimination] | Brent Ozar | 2020-11-26 | [DBA][DEV] | | [Trigram Wildcard String Search in SQL Server] | Paul White | 2017-09-08 | [DBA][DEV] | | [Which Locks Count Toward Lock Escalation?] | Kendra Little | 2017-04-03 | [DBA][DEV] | +| [The challenge is on! Community call for creating the fastest number series generator] | tzik Ben-Gan | 2020-12-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2600,3 +2601,4 @@ Articles types: [Autoparameterized Trivial Queries May Not Get Partition Elimination]:https://www.brentozar.com/archive/2020/12/autoparameterized-trivial-queries-may-not-get-partition-elimination/ [Trigram Wildcard String Search in SQL Server]:https://sqlperformance.com/2017/09/sql-performance/sql-server-trigram-wildcard-search [Which Locks Count Toward Lock Escalation?]:https://littlekendra.com/2017/04/03/which-locks-count-toward-lock-escalation/ +[The challenge is on! Community call for creating the fastest number series generator]:https://sqlperformance.com/2020/12/t-sql-queries/number-series-challenge From cd9db421a8c8ac36260775265c6298114a09444a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 19 Dec 2020 14:21:20 +0300 Subject: [PATCH 187/553] Update errors --- Errors/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Errors/README.md b/Errors/README.md index 092a7ece..4e216020 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -2,15 +2,15 @@ ## Useful links - - [System Error Messages](https://technet.microsoft.com/en-us/library/cc645603%28v=sql.105%29.aspx) - - [Database Engine Error Severities](https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-error-severities) - - [Integration Services Error and Message Reference](https://docs.microsoft.com/en-us/sql/integration-services/integration-services-error-and-message-reference) - - [View and Read SQL Server Setup Log Files](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files) - - [Troubleshoot the SQL Server Utility](https://docs.microsoft.com/en-us/sql/database-engine/troubleshoot-the-sql-server-utility) - - [Common Issues: Licensing Errors](http://blogs.sqlsentry.com/georgeboakye/common-issues-licensing-errors/) - - [SQL Server 2016 Distributed Replay Errors](https://www.sqlskills.com/blogs/jonathan/sql-server-2016-distributed-replay-errors/) - - [The Instance ID MSSQLSERVER Is Already In Use](http://www.sqlservercentral.com/articles/MSSQLSERVER/161398/) - - [SQL Server: Detach/Attach Gotchas!](https://sqljana.wordpress.com/2018/04/08/sql-server-detach-attach-gotchas/) +- [System Error Messages](https://technet.microsoft.com/en-us/library/cc645603%28v=sql.105%29.aspx) +- [Database Engine Error Severities](https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-error-severities) +- [Integration Services Error and Message Reference](https://docs.microsoft.com/en-us/sql/integration-services/integration-services-error-and-message-reference) +- [View and Read SQL Server Setup Log Files](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files) +- [Troubleshoot the SQL Server Utility](https://docs.microsoft.com/en-us/sql/database-engine/troubleshoot-the-sql-server-utility) +- [Common Issues: Licensing Errors](http://blogs.sqlsentry.com/georgeboakye/common-issues-licensing-errors/) +- [SQL Server 2016 Distributed Replay Errors](https://www.sqlskills.com/blogs/jonathan/sql-server-2016-distributed-replay-errors/) +- [The Instance ID MSSQLSERVER Is Already In Use](http://www.sqlservercentral.com/articles/MSSQLSERVER/161398/) +- [SQL Server: Detach/Attach Gotchas!](https://sqljana.wordpress.com/2018/04/08/sql-server-detach-attach-gotchas/) ## SQL Server All Errors List From a7168f3665167aa04a04bc2bf0216854889b029e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 20 Dec 2020 14:21:50 +0300 Subject: [PATCH 188/553] remove spaces --- Utilities/README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index d60f41a5..ae848f37 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -2,26 +2,26 @@ Useful free and paid Microsoft SQL Server utilities and tools - complete list of **395** SQL Server Utilities Utility types (main purpose), in braces `{}` current counts: - - **[B]**: Backup solutions {17} - - **[BI]**: Business Intelligence Solutions {4} - - **[D]**: Documentation solutions {8} - - **[DA]**: Database Architecture {20} - - **[DC]**: Data compare {15} - - **[ETL]**: Extract Download Load (ETL) Tools {9} - - **[I]**: Internal SQL Server utilities (for example, bcp) {15} - - **[IDX]**: Index manager {3} - - **[G]**: Data generation {4} - - **[J]**: Job managers {4} - - **[M]**: Monitoring and alerting Tools {27} - - **[MG]**: Migration tool {31} - - **[MS]**: Management Studio (alternative for SSMS) {33} - - **[REC]**: Recovery tools {13} - - **[S]**: Search tools {7} - - **[SEC]**: Security tools {7} - - **[SC]**: Structure compare {21} - - **[ST]**: Statistics utilities {3} - - **[T]**: Testing tools {7} - - **[?]**: Not yet classified {155} +- **[B]**: Backup solutions {17} +- **[BI]**: Business Intelligence Solutions {4} +- **[D]**: Documentation solutions {8} +- **[DA]**: Database Architecture {20} +- **[DC]**: Data compare {15} +- **[ETL]**: Extract Download Load (ETL) Tools {9} +- **[I]**: Internal SQL Server utilities (for example, bcp) {15} +- **[IDX]**: Index manager {3} +- **[G]**: Data generation {4} +- **[J]**: Job managers {4} +- **[M]**: Monitoring and alerting Tools {27} +- **[MG]**: Migration tool {31} +- **[MS]**: Management Studio (alternative for SSMS) {33} +- **[REC]**: Recovery tools {13} +- **[S]**: Search tools {7} +- **[SEC]**: Security tools {7} +- **[SC]**: Structure compare {21} +- **[ST]**: Statistics utilities {3} +- **[T]**: Testing tools {7} +- **[?]**: Not yet classified {156} | Name/Description | Cross Database | Platform | Type | Official/Download page | Release | Author | License | Free version | Price | |------------------------------------------------------------------|-------------------------------|-----------|----------|----------------------------------------------------|------------|-------------------------|------------|----------------|------:| From 005e0806ec4b1b67217089e060eac25abbb1ebb2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 21 Dec 2020 08:15:13 +0300 Subject: [PATCH 189/553] Add SQL Server 2019 CU8 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index b6c87ea8..ca7c1ba8 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,7 +422,8 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Latest** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | +| 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | **Latest** | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | +| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | | 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | | 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | | 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | @@ -443,6 +444,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +[Cumulative Update 8 for SQL Server 2019]:https://support.microsoft.com/help/4577194 [Cumulative Update 7 for SQL Server 2019]:https://support.microsoft.com/help/4570012 [Cumulative Update 6 for SQL Server 2019]:https://support.microsoft.com/help/4563110 [Cumulative Update 5 for SQL Server 2019]:https://support.microsoft.com/help/4552255 From ee9f608231767a41afb5fb8fab2caafd1575029f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 22 Dec 2020 08:18:41 +0300 Subject: [PATCH 190/553] Update SQL Server 2017 CU7 to Withdrawn status --- SQL Server Version.md | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index ca7c1ba8..f2875db9 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -420,29 +420,29 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) Developer Edition (64-bit) on … ``` -| Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | -|---------------|-------------------|--------|------|------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | **Latest** | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | -| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | -| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | -| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | -| 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | -| 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | -| 15.0.4013.40 | 2019.150.4013.40 | RTM | CU | | 4536075 | [Cumulative Update 2 for SQL Server 2019] | 2020-02-07 | 2020-02-03 | 134 | 88 | 537 | 904 | -| 15.0.4003.23 | 2019.150.4003.23 | RTM | CU | | 4527376 | [Cumulative Update 1 for SQL Server 2019] | 2020-01-07 | 2019-12-06 | 83 | 62 | 452 | 904 | -| 15.0.2070.41 | 2019.150.2070.41 | RTM | GDR | | 4517790 | [Servicing Update for SQL Server 2019 RTM] | 2019-11-04 | 2019-10-28 | 1 | 1 | 452 | 904 | -| 15.0.2000.5 | 2019.150.2000.5 | RTM | RTM | | | [Microsoft SQL Server 2019 RTM] | 2019-11-04 | 2019-09-24 | | | 1360 | 904 | -| 15.0.1900.47 | 2019.150.1900.47 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1.1 (RC1.1) | 2019-08-28 | 2019-08-17 | | | 1360 | 904 | -| 15.0.1900.25 | 2019.150.1900.25 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1 (RC1) | 2019-08-21 | 2019-08-17 | | | 1360 | 904 | -| 15.0.1800.32 | 2019.150.1800.32 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.2 | 2019-07-24 | 2019-07-18 | | | 1358 | 904 | -| 15.0.1700.0 | 2019.150.1700.0 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.1 | 2019-06-26 | 2019-06-20 | | | 1341 | 902 | -| 15.0.1600.8 | 2019.150.1600.8 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.0 | 2019-05-22 | 2019-05-17 | | | 1339 | 902 | -| 15.0.1500.28 | 2019.150.1500.28 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.5 | 2019-04-23 | 2019-04-16 | | | 1340 | 897 | -| 15.0.1400.75 | 2019.150.1400.75 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.4 | 2019-03-27 | 2019-03-17 | | | 1331 | 897 | -| 15.0.1300.359 | 2019.150.1200.359 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.3 | 2019-03-01 | 2019-02-16 | | | 1331 | 897 | -| 15.0.1200.24 | 2018.150.1200.24 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.2 | 2018-12-11 | 2018-11-02 | | | 1302 | 896 | -| 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | -| 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +| Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | +|---------------|-------------------|--------|------|---------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| +| 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | **Latest** | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | +| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Withdrawn** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | +| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | +| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | +| 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | +| 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | +| 15.0.4013.40 | 2019.150.4013.40 | RTM | CU | | 4536075 | [Cumulative Update 2 for SQL Server 2019] | 2020-02-07 | 2020-02-03 | 134 | 88 | 537 | 904 | +| 15.0.4003.23 | 2019.150.4003.23 | RTM | CU | | 4527376 | [Cumulative Update 1 for SQL Server 2019] | 2020-01-07 | 2019-12-06 | 83 | 62 | 452 | 904 | +| 15.0.2070.41 | 2019.150.2070.41 | RTM | GDR | | 4517790 | [Servicing Update for SQL Server 2019 RTM] | 2019-11-04 | 2019-10-28 | 1 | 1 | 452 | 904 | +| 15.0.2000.5 | 2019.150.2000.5 | RTM | RTM | | | [Microsoft SQL Server 2019 RTM] | 2019-11-04 | 2019-09-24 | | | 1360 | 904 | +| 15.0.1900.47 | 2019.150.1900.47 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1.1 (RC1.1) | 2019-08-28 | 2019-08-17 | | | 1360 | 904 | +| 15.0.1900.25 | 2019.150.1900.25 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1 (RC1) | 2019-08-21 | 2019-08-17 | | | 1360 | 904 | +| 15.0.1800.32 | 2019.150.1800.32 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.2 | 2019-07-24 | 2019-07-18 | | | 1358 | 904 | +| 15.0.1700.0 | 2019.150.1700.0 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.1 | 2019-06-26 | 2019-06-20 | | | 1341 | 902 | +| 15.0.1600.8 | 2019.150.1600.8 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.0 | 2019-05-22 | 2019-05-17 | | | 1339 | 902 | +| 15.0.1500.28 | 2019.150.1500.28 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.5 | 2019-04-23 | 2019-04-16 | | | 1340 | 897 | +| 15.0.1400.75 | 2019.150.1400.75 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.4 | 2019-03-27 | 2019-03-17 | | | 1331 | 897 | +| 15.0.1300.359 | 2019.150.1200.359 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.3 | 2019-03-01 | 2019-02-16 | | | 1331 | 897 | +| 15.0.1200.24 | 2018.150.1200.24 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.2 | 2018-12-11 | 2018-11-02 | | | 1302 | 896 | +| 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | +| 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | [Cumulative Update 8 for SQL Server 2019]:https://support.microsoft.com/help/4577194 [Cumulative Update 7 for SQL Server 2019]:https://support.microsoft.com/help/4570012 From d4eb198ffec2a5f87fda5513fb608bfc1d485d06 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 23 Dec 2020 08:25:39 +0300 Subject: [PATCH 191/553] Add SMS shortcut to comment a part of the query --- SSMS/SSMS_Tips.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/SSMS/SSMS_Tips.md b/SSMS/SSMS_Tips.md index 8e41561d..99486efd 100644 --- a/SSMS/SSMS_Tips.md +++ b/SSMS/SSMS_Tips.md @@ -57,7 +57,8 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a 37. [AutoRecover in SSMS](#37) 38. [View and query Power BI .pbix files in SSMS](#38) 39. [Using SSMS to analyze Power BI with XMLA](#39) -40. [Reference](#reference) +40. [SSMS shortcut to comment/uncomment a specific part of the query](#40) +41. [Reference](#reference) **Great thanks to**: @@ -850,6 +851,59 @@ SQL Server Profiler can be used for tracing and debugging. SSMS 18.0 RC1 or abov More details [here](https://powerbi.microsoft.com/en-us/blog/power-bi-open-platform-connectivity-with-xmla-endpoints-public-preview/). + + +## 40. SSMS shortcut to comment/uncomment a specific part of the query? +You can easily do this with [Code Snippets](https://docs.microsoft.com/en-us/sql/ssms/scripting/add-transact-sql-snippets): + +```xml + + + <_locDefinition xmlns="urn:locstudio"> + <_locDefault _loc="locNone" /> + <_locTag _loc="locData">Title + <_locTag _loc="locData">Description + <_locTag _loc="locData">Author + <_locTag _loc="locData">ToolTip + <_locTag _loc="locData">Default + + +
+ SLASH STAR COMMENT (surrounds) + + Surround selected text with slash star comment block /**/ + wBob + + SurroundsWith + +
+ + + + + + + + + + +
+
+``` + +Save the file with a `.snippet` extension and follow the instructions from [here](https://docs.microsoft.com/en-us/sql/ssms/scripting/add-transact-sql-snippets) to add the snippet to SSMS. + +Instructions for use: + +1. Highlight the text you want to surround with the comment block in the query editor +1. Press `Ctrl+K, Ctrl+S` to summon the 'Surround With' snippets. Note the comma between the two sequences, it means "press Ctrl+K, then press Ctrl+S in quick succession" +1. Select your snippet from the list +1. Your highlighted text is surrounded with the comment block +1. press `Ctrl+Z` to Undo - this is the normal windows undo command. It will remove the comment block as long as you haven't made any other edits. + +More details [here](https://dba.stackexchange.com/a/147182/107045) + + ## 40. Reference: - [Free Course: SQL Server Management Studio Shortcuts & Secrets](https://sqlworkbooks.com/course/sql-server-management-studio-shortcuts-secrets/) (by Kendra Little) From c637a77242db4f7dbea312bfbdf8c6e3f014a3b0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 24 Dec 2020 08:30:26 +0300 Subject: [PATCH 192/553] Add new article --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 98a2c449..eb03795f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1313,7 +1313,8 @@ Articles types: | [Autoparameterized Trivial Queries May Not Get Partition Elimination] | Brent Ozar | 2020-11-26 | [DBA][DEV] | | [Trigram Wildcard String Search in SQL Server] | Paul White | 2017-09-08 | [DBA][DEV] | | [Which Locks Count Toward Lock Escalation?] | Kendra Little | 2017-04-03 | [DBA][DEV] | -| [The challenge is on! Community call for creating the fastest number series generator] | tzik Ben-Gan | 2020-12-09 | [DBA][DEV] | +| [The challenge is on! Community call for creating the fastest number series generator] | Itzik Ben-Gan | 2020-12-09 | [DBA][DEV] | +| [SQL Injection Prevention Cheat Sheet] | OWASP | 2020-07-14 | [SEC] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2602,3 +2603,4 @@ Articles types: [Trigram Wildcard String Search in SQL Server]:https://sqlperformance.com/2017/09/sql-performance/sql-server-trigram-wildcard-search [Which Locks Count Toward Lock Escalation?]:https://littlekendra.com/2017/04/03/which-locks-count-toward-lock-escalation/ [The challenge is on! Community call for creating the fastest number series generator]:https://sqlperformance.com/2020/12/t-sql-queries/number-series-challenge +[SQL Injection Prevention Cheat Sheet]:https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html From 4baba4c2aa5549d4253f0a8c11d24498cffda4d5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 25 Dec 2020 08:35:31 +0300 Subject: [PATCH 193/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index eb03795f..f531f817 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1315,6 +1315,7 @@ Articles types: | [Which Locks Count Toward Lock Escalation?] | Kendra Little | 2017-04-03 | [DBA][DEV] | | [The challenge is on! Community call for creating the fastest number series generator] | Itzik Ben-Gan | 2020-12-09 | [DBA][DEV] | | [SQL Injection Prevention Cheat Sheet] | OWASP | 2020-07-14 | [SEC] | +| [A cheat sheet for isolation levels in SQL Server] | Dan Jackson | 2020-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2604,3 +2605,4 @@ Articles types: [Which Locks Count Toward Lock Escalation?]:https://littlekendra.com/2017/04/03/which-locks-count-toward-lock-escalation/ [The challenge is on! Community call for creating the fastest number series generator]:https://sqlperformance.com/2020/12/t-sql-queries/number-series-challenge [SQL Injection Prevention Cheat Sheet]:https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html +[A cheat sheet for isolation levels in SQL Server]:https://blog.coeo.com/a-cheat-sheet-for-isolation-levels-in-sql-server From 17f43a8f17d5f90b886e1ef7e45b5f790c5873ee Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 26 Dec 2020 08:38:21 +0300 Subject: [PATCH 194/553] Add new article --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f531f817..251ed797 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1316,6 +1316,8 @@ Articles types: | [The challenge is on! Community call for creating the fastest number series generator] | Itzik Ben-Gan | 2020-12-09 | [DBA][DEV] | | [SQL Injection Prevention Cheat Sheet] | OWASP | 2020-07-14 | [SEC] | | [A cheat sheet for isolation levels in SQL Server] | Dan Jackson | 2020-01-01 | [DBA][DEV] | +| [Don't Fear the Trace] | Greg Gonzalez | 2011-04-26 | [DBA][DEV] | +| [Which sp_configure Options Clear the Plan Cache?] | Brent Ozar | 2017-05-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2606,3 +2608,5 @@ Articles types: [The challenge is on! Community call for creating the fastest number series generator]:https://sqlperformance.com/2020/12/t-sql-queries/number-series-challenge [SQL Injection Prevention Cheat Sheet]:https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html [A cheat sheet for isolation levels in SQL Server]:https://blog.coeo.com/a-cheat-sheet-for-isolation-levels-in-sql-server +[Don't Fear the Trace]:https://www.sentryone.com/blog/dont-fear-the-trace +[Which sp_configure Options Clear the Plan Cache?]:https://www.brentozar.com/archive/2017/09/sp_configure-options-clear-plan-cache/ From 4cb18230b12f3262bde0bcd9a0feba3ebff8f9d5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 27 Dec 2020 08:41:40 +0300 Subject: [PATCH 195/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 251ed797..e09c7161 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1318,6 +1318,7 @@ Articles types: | [A cheat sheet for isolation levels in SQL Server] | Dan Jackson | 2020-01-01 | [DBA][DEV] | | [Don't Fear the Trace] | Greg Gonzalez | 2011-04-26 | [DBA][DEV] | | [Which sp_configure Options Clear the Plan Cache?] | Brent Ozar | 2017-05-26 | [DBA][DEV] | +| [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2016-06-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2610,3 +2611,4 @@ Articles types: [A cheat sheet for isolation levels in SQL Server]:https://blog.coeo.com/a-cheat-sheet-for-isolation-levels-in-sql-server [Don't Fear the Trace]:https://www.sentryone.com/blog/dont-fear-the-trace [Which sp_configure Options Clear the Plan Cache?]:https://www.brentozar.com/archive/2017/09/sp_configure-options-clear-plan-cache/ +[The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups]:https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/ From c0d9d380075ef1c0b580643d282250919d81af49 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 28 Dec 2020 08:44:08 +0300 Subject: [PATCH 196/553] new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e09c7161..41226d65 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1319,6 +1319,7 @@ Articles types: | [Don't Fear the Trace] | Greg Gonzalez | 2011-04-26 | [DBA][DEV] | | [Which sp_configure Options Clear the Plan Cache?] | Brent Ozar | 2017-05-26 | [DBA][DEV] | | [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2016-06-26 | [DBA][DEV] | +| [Faster SQL Pagination with Keysets, Continued] | Lukas Eder | 2013-11-18 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2612,3 +2613,4 @@ Articles types: [Don't Fear the Trace]:https://www.sentryone.com/blog/dont-fear-the-trace [Which sp_configure Options Clear the Plan Cache?]:https://www.brentozar.com/archive/2017/09/sp_configure-options-clear-plan-cache/ [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups]:https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/ +[Faster SQL Pagination with Keysets, Continued]:https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/ From 84e8e92fa54d38d14783d6a9eba1ff2530fc8a55 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 29 Dec 2020 08:45:55 +0300 Subject: [PATCH 197/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 41226d65..d17bb4bd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1320,6 +1320,7 @@ Articles types: | [Which sp_configure Options Clear the Plan Cache?] | Brent Ozar | 2017-05-26 | [DBA][DEV] | | [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2016-06-26 | [DBA][DEV] | | [Faster SQL Pagination with Keysets, Continued] | Lukas Eder | 2013-11-18 | [DBA][DEV] | +| [We need tool support for keyset pagination] v | Markus Winand | 2014-08-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2614,3 +2615,4 @@ Articles types: [Which sp_configure Options Clear the Plan Cache?]:https://www.brentozar.com/archive/2017/09/sp_configure-options-clear-plan-cache/ [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups]:https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/ [Faster SQL Pagination with Keysets, Continued]:https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/ +[We need tool support for keyset pagination]:https://use-the-index-luke.com/no-offset From d795f62ab5ac6596fecca7982470309780a43c62 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 30 Dec 2020 08:47:59 +0300 Subject: [PATCH 198/553] article +1 --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index d17bb4bd..a46f637f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1320,7 +1320,8 @@ Articles types: | [Which sp_configure Options Clear the Plan Cache?] | Brent Ozar | 2017-05-26 | [DBA][DEV] | | [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2016-06-26 | [DBA][DEV] | | [Faster SQL Pagination with Keysets, Continued] | Lukas Eder | 2013-11-18 | [DBA][DEV] | -| [We need tool support for keyset pagination] v | Markus Winand | 2014-08-16 | [DBA][DEV] | +| [We need tool support for keyset pagination] | Markus Winand | 2014-08-16 | [DBA][DEV] | +| [Insight into the SQL Server buffer cache] | Ed Pollack | 2016-02-18 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2616,3 +2617,4 @@ Articles types: [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups]:https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/ [Faster SQL Pagination with Keysets, Continued]:https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/ [We need tool support for keyset pagination]:https://use-the-index-luke.com/no-offset +[Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ From be63e7a2d59280542a12078414f31a11f4c48966 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 31 Dec 2020 09:35:27 +0300 Subject: [PATCH 199/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a46f637f..6f432f3d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1322,6 +1322,7 @@ Articles types: | [Faster SQL Pagination with Keysets, Continued] | Lukas Eder | 2013-11-18 | [DBA][DEV] | | [We need tool support for keyset pagination] | Markus Winand | 2014-08-16 | [DBA][DEV] | | [Insight into the SQL Server buffer cache] | Ed Pollack | 2016-02-18 | [DBA][DEV] | +| Index-Only Scan: Avoiding Table Access] | Markus Winand | 2014-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2618,3 +2619,4 @@ Articles types: [Faster SQL Pagination with Keysets, Continued]:https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/ [We need tool support for keyset pagination]:https://use-the-index-luke.com/no-offset [Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ +[Index-Only Scan: Avoiding Table Access]:https://use-the-index-luke.com/sql/clustering/index-only-scan-covering-index From 764f86e7fa1b9786051a1af1b07f47bb1d8bb4a0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 1 Jan 2021 09:39:03 +0300 Subject: [PATCH 200/553] article +1 --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 6f432f3d..a690adf6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1322,7 +1322,8 @@ Articles types: | [Faster SQL Pagination with Keysets, Continued] | Lukas Eder | 2013-11-18 | [DBA][DEV] | | [We need tool support for keyset pagination] | Markus Winand | 2014-08-16 | [DBA][DEV] | | [Insight into the SQL Server buffer cache] | Ed Pollack | 2016-02-18 | [DBA][DEV] | -| Index-Only Scan: Avoiding Table Access] | Markus Winand | 2014-01-01 | [DBA][DEV] | +| [Index-Only Scan: Avoiding Table Access] | Markus Winand | 2014-01-01 | [DBA][DEV] | +| [The two top performance problems caused by ORM tool] | Markus Winand | 2013-04-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2620,3 +2621,4 @@ Articles types: [We need tool support for keyset pagination]:https://use-the-index-luke.com/no-offset [Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ [Index-Only Scan: Avoiding Table Access]:https://use-the-index-luke.com/sql/clustering/index-only-scan-covering-index +[The two top performance problems caused by ORM tool]:https://use-the-index-luke.com/blog/2013-04/the-two-top-performance-problems-caused-by-ORM-tools From 559a532d29b59b12936fb8778bb56a19f1eece8c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 2 Jan 2021 09:44:38 +0300 Subject: [PATCH 201/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a690adf6..b0239d90 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1324,6 +1324,7 @@ Articles types: | [Insight into the SQL Server buffer cache] | Ed Pollack | 2016-02-18 | [DBA][DEV] | | [Index-Only Scan: Avoiding Table Access] | Markus Winand | 2014-01-01 | [DBA][DEV] | | [The two top performance problems caused by ORM tool] | Markus Winand | 2013-04-23 | [DBA][DEV] | +| [Nested loops join n1 problem in ORM] | Markus Winand | 2013-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2622,3 +2623,4 @@ Articles types: [Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ [Index-Only Scan: Avoiding Table Access]:https://use-the-index-luke.com/sql/clustering/index-only-scan-covering-index [The two top performance problems caused by ORM tool]:https://use-the-index-luke.com/blog/2013-04/the-two-top-performance-problems-caused-by-ORM-tools +[Nested loops join n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem From 824211bcdcec8ab1342cc192a5215dfdf84ca5c4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 3 Jan 2021 09:47:59 +0300 Subject: [PATCH 202/553] article +1 --- Articles/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index b0239d90..aa8b9838 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1324,7 +1324,8 @@ Articles types: | [Insight into the SQL Server buffer cache] | Ed Pollack | 2016-02-18 | [DBA][DEV] | | [Index-Only Scan: Avoiding Table Access] | Markus Winand | 2014-01-01 | [DBA][DEV] | | [The two top performance problems caused by ORM tool] | Markus Winand | 2013-04-23 | [DBA][DEV] | -| [Nested loops join n1 problem in ORM] | Markus Winand | 2013-01-01 | [DBA][DEV] | +| [Nested loops join and n1 problem in ORM] | Markus Winand | 2013-01-01 | [DBA][DEV] | +| [Hash join partial objects] | Markus Winand | 2013-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2623,4 +2624,5 @@ Articles types: [Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ [Index-Only Scan: Avoiding Table Access]:https://use-the-index-luke.com/sql/clustering/index-only-scan-covering-index [The two top performance problems caused by ORM tool]:https://use-the-index-luke.com/blog/2013-04/the-two-top-performance-problems-caused-by-ORM-tools -[Nested loops join n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem +[Nested loops join and n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem +[Hash join partial objects]:https://use-the-index-luke.com/sql/join/hash-join-partial-objects From acfccc16c497c74a04ade39f209b3dde7e9dcd5b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 4 Jan 2021 09:50:04 +0300 Subject: [PATCH 203/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index aa8b9838..0f7dc085 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1326,6 +1326,7 @@ Articles types: | [The two top performance problems caused by ORM tool] | Markus Winand | 2013-04-23 | [DBA][DEV] | | [Nested loops join and n1 problem in ORM] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Hash join partial objects] | Markus Winand | 2013-01-01 | [DBA][DEV] | +| [Myth: Select * (asterisk) is bad] | Markus Winand | 2013-11-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2626,3 +2627,4 @@ Articles types: [The two top performance problems caused by ORM tool]:https://use-the-index-luke.com/blog/2013-04/the-two-top-performance-problems-caused-by-ORM-tools [Nested loops join and n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem [Hash join partial objects]:https://use-the-index-luke.com/sql/join/hash-join-partial-objects +[Myth: Select * (asterisk) is bad]:https://use-the-index-luke.com/blog/2013-08/its-not-about-the-star-stupid From fc26a00431f308384742deacc161cb48e60d8fac Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 5 Jan 2021 09:51:56 +0300 Subject: [PATCH 204/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0f7dc085..ad5dad4c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1327,6 +1327,7 @@ Articles types: | [Nested loops join and n1 problem in ORM] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Hash join partial objects] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Myth: Select * (asterisk) is bad] | Markus Winand | 2013-11-03 | [DBA][DEV] | +| [Indexing LIKE Filters] | Markus Winand | 2013-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2628,3 +2629,4 @@ Articles types: [Nested loops join and n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem [Hash join partial objects]:https://use-the-index-luke.com/sql/join/hash-join-partial-objects [Myth: Select * (asterisk) is bad]:https://use-the-index-luke.com/blog/2013-08/its-not-about-the-star-stupid +[Indexing LIKE Filters]:https://use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuning From 8f9883d1925c06754ea0a992a3376a353625775c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 6 Jan 2021 10:08:57 +0300 Subject: [PATCH 205/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ad5dad4c..30497e35 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1328,6 +1328,7 @@ Articles types: | [Hash join partial objects] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Myth: Select * (asterisk) is bad] | Markus Winand | 2013-11-03 | [DBA][DEV] | | [Indexing LIKE Filters] | Markus Winand | 2013-01-01 | [DBA][DEV] | +| [Date and time conditions causing SQL performance problems] | Markus Winand | 2013-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2630,3 +2631,4 @@ Articles types: [Hash join partial objects]:https://use-the-index-luke.com/sql/join/hash-join-partial-objects [Myth: Select * (asterisk) is bad]:https://use-the-index-luke.com/blog/2013-08/its-not-about-the-star-stupid [Indexing LIKE Filters]:https://use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuning +[Date and time conditions causing SQL performance problems]:https://use-the-index-luke.com/sql/where-clause/obfuscation/dates From 473e3aa752bdebb866015792f209d55c4547c6c5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 7 Jan 2021 09:05:00 +0300 Subject: [PATCH 206/553] Remove dead link article --- Articles/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 30497e35..6e25bbf2 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -495,7 +495,6 @@ Articles types: | [Troubleshooting THREADPOOL Waits] | Klaus Aschenbrenner · | 2015-10-20 | [DEV] | | [Andy’s Excellent SSIS-in-the-Cloud Adventure, Part 1 – Build an ADFv2 IR Instance] | Andy Leonard · | 2018-01-28 | [AZ][SSIS] | | [PRINT vs. RAISERROR] | sqlity.net · | 2012-05-27 | [DEV] | -| [Does a Clustered Index Give a Default Ordering?] | Kendra Little · | 2018-02-02 | [DEV] | | [Without ORDER BY, You Can’t Depend On the Order of Results] | Michael J Swart · | 2013-09-13 | [DEV] | | [Query Store and “in memory”] | Erin Stellato · | 2018-01-31 | [QS] | | [Setting and Identifying Row Goals in Execution Plans] | Paul White · | 2018-02-12 | [DEV] | @@ -1798,7 +1797,6 @@ Articles types: [Troubleshooting THREADPOOL Waits]:https://www.sqlpassion.at/archive/2011/10/25/troubleshooting-threadpool-waits/ [Andy’s Excellent SSIS-in-the-Cloud Adventure, Part 1 – Build an ADFv2 IR Instance]:https://andyleonard.blog/2018/01/andys-excellent-ssis-in-the-cloud-adventure-part-1/ [PRINT vs. RAISERROR]:http://sqlity.net/en/984/print-vs-raiserror/ -[Does a Clustered Index Give a Default Ordering?]:https://sqlworkbooks.com/2018/02/does-a-clustered-index-give-a-default-ordering/ [Without ORDER BY, You Can’t Depend On the Order of Results]:http://michaeljswart.com/2013/09/without-order-by-you-cant-depend-on-the-order-of-results/ [Query Store and “in memory”]:https://www.sqlskills.com/blogs/erin/query-store-and-in-memory/ [Setting and Identifying Row Goals in Execution Plans]:https://sqlperformance.com/2018/02/sql-plan/setting-and-identifying-row-goals From 874291d25abcac97f00fbba360dba8c262954466 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 8 Jan 2021 09:10:59 +0300 Subject: [PATCH 207/553] Remove dead link --- Articles/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 6e25bbf2..57409843 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -800,7 +800,6 @@ Articles types: | [Feature Restrictions in SQL Server 2019 are Worse Than Useless: a False Sense of Security And Wasted Opportunity] | Solomon Rutzky | 2019-08-05 | [SEC] | | [How to get SQL Server Sysadmin Privileges as a Local Admin with PowerUpSQL] | Scott Sutherland | 2017-05-23 | [PS][SEC] | | [Views of the Same Problem: Network Admin, DBA, and Developer] | Kyle Brandt | 2011-03-16 | [DBA][DEV] | -| [The SQL Server Data Row Size Question: Why is It Bigger?] | Kendra Little | 2019-03-19 | [DBA][DEV] | | [Finding Max Concurrent Operations With T-SQL (Part 1)] | Kevin Feasel | 2019-01-02 | [DEV] | | [Finding Max Concurrent Operations With T-SQL (Part 2)] | Kevin Feasel | 2019-01-03 | [DEV] | | [Stack Overflow: The Architecture - 2016 Edition] | Nick Craver | 2019-02-17 | [DBA][DEV] | @@ -2101,7 +2100,6 @@ Articles types: [Feature Restrictions in SQL Server 2019 are Worse Than Useless: a False Sense of Security And Wasted Opportunity]:https://sqlquantumleap.com/2019/08/05/feature-restrictions-in-sql-server-2019-are-worse-than-useless-a-false-sense-of-security-and-wasted-opportunity/ [How to get SQL Server Sysadmin Privileges as a Local Admin with PowerUpSQL]:https://blog.netspi.com/get-sql-server-sysadmin-privileges-local-admin-powerupsql/ [Views of the Same Problem: Network Admin, DBA, and Developer]:https://blog.serverfault.com/2011/03/16/views-of-the-same-problem-network-admin-dba-and-developer/ -[The SQL Server Data Row Size Question: Why is It Bigger?]:https://sqlworkbooks.com/2019/03/the-sql-server-data-row-size-question-why-is-it-bigger/ [Finding Max Concurrent Operations With T-SQL (Part 1)]:https://36chambers.wordpress.com/2019/01/02/finding-max-concurrent-operations-with-t-sql-part-1/ [Finding Max Concurrent Operations With T-SQL (Part 2)]:https://36chambers.wordpress.com/2019/01/03/finding-max-concurrent-operations-with-t-sql-part-2/ [Stack Overflow: The Architecture - 2016 Edition]:https://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/ From 5b7031c67698d4d7cd94d4ae79c885561aebd7c8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 9 Jan 2021 09:11:55 +0300 Subject: [PATCH 208/553] Remove dead link --- Articles/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 57409843..747dcfc4 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -443,7 +443,6 @@ Articles types: | [Say NO to Venn Diagrams When Explaining JOINs] | Lukas Eder | 2016-07-05 | [DBA][DEV] | | [Surprise Delta Stores] | Joe Obbish | 2017-11-07 | [DEV] | | [SQL 2014 Clustered Columnstore index rebuild and maintenance considerations] | Denzil Ribeiro | 2015-07-08 | [DBA][DEV] | -| [The Case of the Weirdly Long COLUMNSTORE_BUILD_THROTTLE Wait] | Kendra Little | 2017-11-09 | [DEV] | | [Multiple Output Datasets With R and SQL Server] | Kendra Little | 2017-11-06 | [DEV][R] | | [How to Avoid Excessive Sorts in Window Functions] | Lukas Eder | 2017-11-06 | [DEV] | | [Extracting a DAX Query Plan With Analysis Services 2016 Extended Events] | Koen Verbeeck | 2017-10-03 | [DAX], [XE] | @@ -1744,7 +1743,6 @@ Articles types: [Say NO to Venn Diagrams When Explaining JOINs]:https://blog.jooq.org/2016/07/05/say-no-to-venn-diagrams-when-explaining-joins/ [Surprise Delta Stores]:https://orderbyselectnull.com/2017/11/07/delta-stores/ [SQL 2014 Clustered Columnstore index rebuild and maintenance considerations]:https://blogs.msdn.microsoft.com/sqlcat/2015/07/08/sql-2014-clustered-columnstore-index-rebuild-and-maintenance-considerations/ -[The Case of the Weirdly Long COLUMNSTORE_BUILD_THROTTLE Wait]:https://sqlworkbooks.com/2017/11/the-case-of-the-weirdly-long-columnstore_build_throttle-wait/ [Multiple Output Datasets With R and SQL Server]:https://itsalljustelectrons.blogspot.ru/2017/11/Multiple-Output-Datasets-with-R-and-SQL-Server.html [How to Avoid Excessive Sorts in Window Functions]:https://blog.jooq.org/2017/11/06/how-to-avoid-excessive-sorts-in-window-functions/ [Extracting a DAX Query Plan With Analysis Services 2016 Extended Events]:https://www.mssqltips.com/sqlservertip/5106/extracting-a-dax-query-plan-with-analysis-services-2016-extended-events/ From a2d492bc2e9200f913b11eada39ca029ebdc3512 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 10 Jan 2021 09:13:18 +0300 Subject: [PATCH 209/553] Remove dead link --- Articles/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 747dcfc4..7c702687 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -383,7 +383,6 @@ Articles types: | [The SQL Hall of Shame] | Adam Machanic | 2017-06-14 | [DBA][DEV] | | [A Better Way To Select Star] | Erik Darling | 2017-07-05 | [DEV] | | [UDP vs TCP] | Kenneth Fisher | 2017-06-07 | [DBA] | -| [When a Nonclustered Index and Statistics Make a Query Slower] | Kendra Little | 2017-03-24 | [DBA][DEV] | | [Lipoaspiration in your SQL Server Database] | Fabiano Amorim | 2011-03-03 | [DEV] | | [13 Things You Should Know About Statistics and the Query Optimizer] | Fabiano Amorim | 2010-01-07 | [DBA][DEV] | | [Creating R Stored Procedures in SQL Server 2016 Using sqlrutils] | Niels Berglund | 2017-06-25 | [DEV][R] | @@ -1683,7 +1682,6 @@ Articles types: [The SQL Hall of Shame]:http://dataeducation.com/the-sql-hall-of-shame/ [A Better Way To Select Star]:https://www.brentozar.com/archive/2017/07/better-way-select-star/ [UDP vs TCP]:https://sqlstudies.com/2017/06/07/udp-vs-tcp/ -[When a Nonclustered Index and Statistics Make a Query Slower]:https://sqlworkbooks.com/2017/05/when-a-nonclustered-index-and-statistics-make-a-query-slower/ [Lipoaspiration in your SQL Server Database]:https://www.red-gate.com/simple-talk/sql/performance/lipoaspiration-in-your-sql-server-database/ [13 Things You Should Know About Statistics and the Query Optimizer]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/13-things-you-should-know-about-statistics-and-the-query-optimizer/ [Creating R Stored Procedures in SQL Server 2016 Using sqlrutils]:http://www.nielsberglund.com/2017/06/25/creating-r-stored-procedures-in-sql-server-2016-using-sqlrutils/ From 9422e54bf3f6ad2d7c4d18a81b23a7c376bfb047 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 11 Jan 2021 09:19:30 +0300 Subject: [PATCH 210/553] Remove dead link --- Articles/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 7c702687..c4296006 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -374,7 +374,6 @@ Articles types: | [The Ultimate SQL Server JSON Cheat Sheet] | Bert Wagner | 2017-03-07 | [DEV][X] | | [Are your indexes being thwarted by mismatched datatypes?] | Bert Wagner | 2017-08-01 | [DEV] | | [Why Missing Index Recommendations Aren’t Perfect] | Brent Ozar | 2017-08-02 | [DBA][DEV] | -| [Top 5 Misleading SQL Server Performance Counters] | Kendra Little | 2017-06-05 | [DBA][DEV] | | [The Case of the Space at the End] | Adam St. Pierre | 2017-07-24 | [DEV] | | [SELECT…INTO in SQL Server 2017] | Andrew Pruski | 2017-08-02 | [DEV] | | [Your Service Level Agreement is a Disaster] | Jennifer McCown | 2017-07-24 | [DBA] | @@ -1673,7 +1672,6 @@ Articles types: [The Ultimate SQL Server JSON Cheat Sheet]:https://bertwagner.com/2017/03/07/the-ultimate-sql-server-json-cheat-sheet/ [Are your indexes being thwarted by mismatched datatypes?]:https://bertwagner.com/2017/08/01/are-your-indexes-being-thwarted-by-mismatched-datatypes/ [Why Missing Index Recommendations Aren’t Perfect]:https://www.brentozar.com/archive/2017/08/missing-index-recommendations-arent-perfect/ -[Top 5 Misleading SQL Server Performance Counters]:https://sqlworkbooks.com/2017/06/top-5-misleading-sql-server-performance-counters/ [The Case of the Space at the End]:http://www.sqlservercentral.com/articles/ANSI_PADDING/157467/ [SELECT…INTO in SQL Server 2017]:https://dbafromthecold.com/2017/08/02/select-into-in-sql-server-2017/ [Your Service Level Agreement is a Disaster]:http://minionware.net/service-level-agreement-disaster/ From ae63a0adcbdd0a8fd3b1b0b6a4b91e378b5b7b67 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 12 Jan 2021 11:13:19 +0300 Subject: [PATCH 211/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c4296006..7529bb78 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1324,6 +1324,7 @@ Articles types: | [Myth: Select * (asterisk) is bad] | Markus Winand | 2013-11-03 | [DBA][DEV] | | [Indexing LIKE Filters] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Date and time conditions causing SQL performance problems] | Markus Winand | 2013-01-01 | [DBA][DEV] | +| [Dates and Times in SQL Server: more functions you should never use] | Randolph West | 2018-05-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2622,3 +2623,4 @@ Articles types: [Myth: Select * (asterisk) is bad]:https://use-the-index-luke.com/blog/2013-08/its-not-about-the-star-stupid [Indexing LIKE Filters]:https://use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuning [Date and time conditions causing SQL performance problems]:https://use-the-index-luke.com/sql/where-clause/obfuscation/dates +[Dates and Times in SQL Server: more functions you should never use]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ From a7a514db6dc950e0b6568f3c6eb8f7e5532bc362 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 13 Jan 2021 11:15:40 +0300 Subject: [PATCH 212/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 7529bb78..fb67d236 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1325,6 +1325,7 @@ Articles types: | [Indexing LIKE Filters] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Date and time conditions causing SQL performance problems] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Dates and Times in SQL Server: more functions you should never use] | Randolph West | 2018-05-16 | [DBA][DEV] | +| [Dates and Times in SQL Server: T-SQL functions to get the current date and time] | Randolph West | 2018-04-25 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2624,3 +2625,4 @@ Articles types: [Indexing LIKE Filters]:https://use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuning [Date and time conditions causing SQL performance problems]:https://use-the-index-luke.com/sql/where-clause/obfuscation/dates [Dates and Times in SQL Server: more functions you should never use]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ +[Dates and Times in SQL Server: T-SQL functions to get the current date and time]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ From d6e9b08019ba8a19af0db5ef3df47ae884a48052 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:53:24 -0500 Subject: [PATCH 213/553] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aa1668f..6d39ea37 100644 --- a/README.md +++ b/README.md @@ -366,7 +366,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [TSqlStrong - T-Sql type checker that detects improper joins, possibly null value operations, enumeration check constraint violations, incorrect use of temporary table at call site, and more](https://github.com/JSuder-xx/TSqlStrong) (by John Suder) - [SQL Power Doc - is a collection of Windows PowerShell scripts and modules that discover, document, and diagnose SQL Server instances and their underlying Windows OS & machine configuration](https://github.com/kendalvandyke/sqlpowerdoc) (by Kendal Van Dyke) - [rsqlserver - Sql Server driver database interface (DBI) driver for R](https://github.com/agstudy/rsqlserver) - - [sp_SizeOptimiser - a stored procedure that recommends space saving and corrective data type measures based on SQL Server database schemas](https://github.com/LowlyDBA/ExpressSQL) (by John McCall) + - [DBA MultiTool - T-SQL scripts for the long haul: optimizing storage, on-the-fly documentation, and general administrative needs.](https://github.com/LowlyDBA/ExpressSQL) (by John McCall) - [language-extensions-sqlserver - SQL Server Language Extensions project](https://github.com/microsoft/sql-server-language-extensions) (by Microsoft) - [AzureRMR - R package for interacting with Azure Resource Manager](https://github.com/Azure/AzureRMR) (by Microsoft) - [EntityFramework.Utilities - Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts](https://github.com/MikaelEliasson/EntityFramework.Utilities) (by Mikael Eliasson) From 7abf60937586b5b284b172ffc54cf2a3188b4d68 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:55:28 -0500 Subject: [PATCH 214/553] update sizeoptimiser --- Stored_Procedure/dbo.sp_SizeOptimiser.sql | 1090 ---------------- Stored_Procedure/dbo.sp_sizeoptimiser.sql | 1367 +++++++++++++++++++++ 2 files changed, 1367 insertions(+), 1090 deletions(-) delete mode 100644 Stored_Procedure/dbo.sp_SizeOptimiser.sql create mode 100644 Stored_Procedure/dbo.sp_sizeoptimiser.sql diff --git a/Stored_Procedure/dbo.sp_SizeOptimiser.sql b/Stored_Procedure/dbo.sp_SizeOptimiser.sql deleted file mode 100644 index 7693ea27..00000000 --- a/Stored_Procedure/dbo.sp_SizeOptimiser.sql +++ /dev/null @@ -1,1090 +0,0 @@ --- EXEC [dbo].[sp_sizeoptimiser] @IncludeDatabases = N'NIIGAZ'; - -/* Cleanup existing versions */ -IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) - BEGIN - DROP PROCEDURE [dbo].[sp_sizeoptimiser]; - END - -IF EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') - BEGIN - DROP TYPE [dbo].[SizeOptimiserTableType] - END -GO - -/**************************************************************/ -/* Create user defined table type for database list parameter */ -/**************************************************************/ -IF NOT EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') - CREATE TYPE [dbo].[SizeOptimiserTableType] AS TABLE( - [database_name] [sysname] NOT NULL, - PRIMARY KEY CLUSTERED ([database_name] ASC) WITH (IGNORE_DUP_KEY = OFF)) -GO - -/***************************/ -/* Create stored procedure */ -/***************************/ -IF NOT EXISTS(SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) - BEGIN - EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_sizeoptimiser] AS'; - END; -GO - -ALTER PROCEDURE [dbo].[sp_sizeoptimiser] - @IndexNumThreshold INT = 10, - @IncludeDatabases [dbo].[SizeOptimiserTableType] READONLY, - @ExcludeDatabases [dbo].[SizeOptimiserTableType] READONLY, - @IncludeSysDatabases BIT = 0, - @IncludeSSRSDatabases BIT = 0, - @isExpress BIT = NULL - -WITH RECOMPILE -AS - SET NOCOUNT ON; - SET ANSI_NULLS ON; - SET QUOTED_IDENTIFIER ON; - - BEGIN TRY - - DECLARE @hasSparse BIT = 0, - @debug BIT = 0, - @hasTempStat BIT = 0, - @HasPersistedSamplePercent BIT = 0; - DECLARE @MajorVersion TINYINT = 0, - @CheckNumber TINYINT = 0; - DECLARE @minorVersion INT = 0; - DECLARE @LastUpdated NVARCHAR(20) = '2019-02-23', - @version NVARCHAR(50) = CAST(SERVERPROPERTY('PRODUCTVERSION') AS NVARCHAR), - @checkSQL NVARCHAR(MAX) = N'', - @msg NVARCHAR(MAX) = N''; - - --Variables for cursors - DECLARE @db_name SYSNAME; - DECLARE @tempCheckSQL NVARCHAR(MAX); - - /* Validate @IndexNumThreshold */ - IF (@IndexNumThreshold < 1 OR @IndexNumThreshold > 999) - BEGIN - SET @msg = '@IndexNumThreshold must be between 1 and 999.'; - RAISERROR(@msg, 16, 1); - END - - /* Validate database list */ - IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 AND (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 - BEGIN - SET @msg = 'Both @IncludeDatabases and @ExcludeDatabases cannot be specified.'; - RAISERROR(@msg, 16, 1); - END - - CREATE TABLE #Databases ( - [database_name] SYSNAME NOT NULL); - - /*Build database list if no parameters set*/ - IF (SELECT COUNT(*) FROM @IncludeDatabases) = 0 AND (SELECT COUNT(*) FROM @ExcludeDatabases) = 0 - BEGIN - INSERT INTO #Databases - SELECT [sd].[name] - FROM [sys].[databases] AS [sd] - WHERE ([sd].[database_id] > 4 OR @IncludeSysDatabases = 1) - AND ([sd].[name] NOT IN ('ReportServer', 'ReportServerTempDB') OR @IncludeSSRSDatabases = 1) - AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' - AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' - AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; - END; - /*Build database list from @IncludeDatabases */ - ELSE IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 - BEGIN - INSERT INTO #Databases - SELECT [sd].[name] - FROM @IncludeDatabases AS [d] - INNER JOIN [sys].[databases] AS [sd] ON [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '') - WHERE DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' - AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' - AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; - - IF (SELECT COUNT(*) FROM @IncludeDatabases) > (SELECT COUNT(*) FROM #Databases) - BEGIN - DECLARE @ErrorDatabaseList NVARCHAR(MAX); - - WITH ErrorDatabase AS( - SELECT [database_name] - FROM @IncludeDatabases - EXCEPT - SELECT [database_name] - FROM #Databases) - - SELECT @ErrorDatabaseList = ISNULL(@ErrorDatabaseList + N', ' + [database_name], [database_name]) - FROM ErrorDatabase; - - SET @msg = 'Supplied databases do not exist or are not accessible: ' + @ErrorDatabaseList + '.'; - RAISERROR(@msg, 16, 1); - END; - END; - /*Build database list from @ExcludeDatabases */ - ELSE IF (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 - BEGIN - INSERT INTO #Databases - SELECT [sd].[name] - FROM [sys].[databases] AS [sd] - WHERE NOT EXISTS (SELECT [d].[database_name] FROM @IncludeDatabases AS [d] WHERE [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '')) - AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' - AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' - AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; - END - - /* Find edition */ - IF(@isExpress IS NULL AND CAST(SERVERPROPERTY('Edition') AS VARCHAR(50)) LIKE '%express%') - BEGIN - SET @isExpress = 1; - END; - - /* Find Version */ - DECLARE @tmpVersion NVARCHAR(100); - - SET @MajorVersion = (SELECT CAST(LEFT(@version, CHARINDEX('.', @version, 0)-1) AS INT)); - SET @tmpVersion = (SELECT RIGHT(@version, LEN(@version) - CHARINDEX('.', @version, 0))); - SET @tmpVersion = (SELECT RIGHT(@tmpVersion, LEN(@tmpVersion) - CHARINDEX('.', @tmpVersion, 0))); - SET @minorVersion = (SELECT LEFT(@tmpVersion,CHARINDEX('.', @tmpVersion, 0) -1)); - - /* Check for Sparse Columns feature */ - IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_sparse' AND OBJECT_NAME(ac.object_id) = 'all_columns') - BEGIN - SET @hasSparse = 1; - END; - - /*Check for is_temp value on statistics*/ - IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_temporary' AND OBJECT_NAME(ac.object_id) = 'all_columns') - BEGIN - SET @hasTempStat = 1; - END; - - /*Check for Persisted Sample Percent update */ - IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'persisted_sample_percent' AND OBJECT_NAME(ac.object_id) = 'dm_db_stats_properties') - BEGIN - SET @HasPersistedSamplePercent = 1; - END; - - /* Print info */ - SET @msg = 'sp_optimiser'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = '------------'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = ''; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'Time: ' + CAST(GETDATE() AS NVARCHAR(50)) - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'Express Edition: ' + CAST(@isExpress AS CHAR(1)) - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'SQL Major Version: ' + CAST(@MajorVersion AS VARCHAR(5)); - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'SQL Minor Version: ' + CAST(@minorVersion AS VARCHAR(20)); - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'Sparse Columns Available: ' + CAST(@hasSparse AS CHAR(1)); - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'Persisted Sample Percent Available: ' + CAST(@HasPersistedSamplePercent AS CHAR(1)); - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = ''; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - SET @msg = 'Building results table...'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - - /*Build results table */ - IF OBJECT_ID(N'tempdb..#results') IS NOT NULL - BEGIN - DROP TABLE #results; - END; - - CREATE TABLE #results - ([check_num] INT NOT NULL, - [check_type] NVARCHAR(50) NOT NULL, - [db_name] SYSNAME NOT NULL, - [obj_type] SYSNAME NOT NULL, - [obj_name] SYSNAME NOT NULL, - [col_name] SYSNAME NULL, - [message] NVARCHAR(500) NULL, - [ref_link] NVARCHAR(500) NULL); - - /* Header row */ - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N'Lets do this' - ,N'Vroom vroom' - ,N'beep boop' - ,N'Off to the races' - ,N'Ready set go' - ,N'Thanks for using' - ,N'https://spsizeoptimiser.lowlydba.com/'; - - RAISERROR('Running size checks...', 10, 1) WITH NOWAIT; - RAISERROR('', 10, 1) WITH NOWAIT; - - /* Date & Time Data Type Usage */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Date and Time Data Types'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) - ,QUOTENAME(c.name) - ,N''Columns storing date or time should use a temporal specific data type, but this column is using '' + ty.name + ''.'' - ,N''https://spsizeoptimiser.lowlydba.com/#time-based-formats'' - FROM sys.columns as c - inner join sys.tables as t on t.object_id = c.object_id - inner join sys.types as ty on ty.user_type_id = c.user_type_id - WHERE c.is_identity = 0 --exclude identity cols - AND t.is_ms_shipped = 0 --exclude sys table - AND (c.name LIKE ''%date%'' OR c.name LIKE ''%time%'') - AND [c].[name] NOT LIKE ''%days%'' - AND ty.name NOT IN (''datetime'', ''datetime2'', ''datetimeoffset'', ''date'', ''smalldatetime'', ''time'');' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; --Date and Time Data Type Check - - /* Archaic varchar Lengths (255/256) */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Archaic varchar Lengths'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; WITH archaic AS ( - SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] - ,QUOTENAME(c.name) AS [col_name] - ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length / 2 AS varchar(MAX)) + N'' based on requirements'' AS [message] - ,N''https://spsizeoptimiser.lowlydba.com/#arbitrary-varchar-length'' AS [ref_link] - FROM sys.columns c - INNER JOIN sys.tables as t on t.object_id = c.object_id - INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id - WHERE c.is_identity = 0 --exclude identity cols - AND t.is_ms_shipped = 0 --exclude sys table - AND ty.name = ''NVARCHAR'' - AND c.max_length IN (510, 512) - UNION - SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) - ,QUOTENAME(c.name) - ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length AS varchar(MAX)) + N'' based on requirements'' - ,N''https://spsizeoptimiser.lowlydba.com/#arbitrary-varchar-length'' - FROM sys.columns as c - INNER JOIN sys.tables as t on t.object_id = c.object_id - INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id - WHERE c.is_identity = 0 --exclude identity cols - AND t.is_ms_shipped = 0 --exclude sys table - AND ty.name = ''VARCHAR'' - AND c.max_length IN (255, 256)) - - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,[obj_name] - ,[col_name] - ,[message] - ,[ref_link] - FROM [archaic];' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; --Archaic varchar Lengths - - /* Unspecified VARCHAR Length */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Unspecified VARCHAR Length'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + 'USE ' + [database_name] + '; - WITH UnspecifiedVarChar AS ( - SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] - ,QUOTENAME(c.name) AS [col_name] - ,N''VARCHAR column without specified length, it should not have a length of '' + CAST (c.max_length AS varchar(10)) + '''' AS [message] - ,N''https://spsizeoptimiser.lowlydba.com/#unspecified-varchar-length'' AS [ref_link] - FROM sys.columns as c - INNER JOIN sys.tables as t on t.object_id = c.object_id - INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id - WHERE c.is_identity = 0 --exclude identity cols - AND t.is_ms_shipped = 0 --exclude sys table - AND ty.name IN (''VARCHAR'', ''NVARCHAR'') - AND c.max_length = 1) - - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,[obj_name] - ,[col_name] - ,[message] - ,[ref_link] - FROM [UnspecifiedVarChar];' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; --Unspecified VARCHAR Length - - /* Mad MAX - Varchar(MAX) */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Mad MAX VARCHAR'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) - ,QUOTENAME(c.name) - ,N''Column is NVARCHAR(MAX) which allows very large row sizes. Consider a character limit.'' - ,N''https://spsizeoptimiser.lowlydba.com/#mad-varchar-max'' - FROM sys.columns as c - INNER JOIN sys.tables as t on t.object_id = c.object_id - INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id - WHERE t.is_ms_shipped = 0 --exclude sys table - AND ty.[name] = ''nvarchar'' - AND c.max_length = -1;' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; --NVARCHAR MAX Check - - /* NVARCHAR data type in Express*/ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Use of NVARCHAR (EXPRESS).'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - IF(@isExpress = 1) - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME([o].schema_id)) + ''.'' + QUOTENAME(OBJECT_NAME([o].object_id)) - ,QUOTENAME([ac].[name]) - ,N''nvarchar columns take 2x the space per char of varchar. Only use if you need Unicode characters.'' - ,N''https://spsizeoptimiser.lowlydba.com/#nvarchar-in-express'' - FROM [sys].[all_columns] AS [ac] - INNER JOIN [sys].[types] AS [t] ON [t].[user_type_id] = [ac].[user_type_id] - INNER JOIN [sys].[objects] AS [o] ON [o].object_id = [ac].object_id - WHERE [t].[name] = ''NVARCHAR'' - AND [o].[is_ms_shipped] = 0' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; - ELSE - BEGIN - RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; - END; --NVARCHAR Use Check - - /* FLOAT and REAL data types */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Use of FLOAT/REAL data types'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,[o].[type_desc] - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) - ,QUOTENAME(ac.name) - ,N''Best practice is to use DECIMAL/NUMERIC instead of '' + st.name + '' for non floating point math.'' - ,N''https://spsizeoptimiser.lowlydba.com/#float-and-real-data-types'' - FROM sys.all_columns AS ac - INNER JOIN sys.objects AS o ON o.object_id = ac.object_id - INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id - WHERE st.name IN(''FLOAT'', ''REAL'') - AND o.type_desc = ''USER_TABLE'';' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; -- FLOAT/REAL Check - - /* Deprecated data types (NTEXT, TEXT, IMAGE) */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Deprecated data types'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,[o].[type_desc] - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) - ,QUOTENAME(ac.name) - ,N''Deprecated data type in use: '' + st.name + ''.'' - ,N''https://spsizeoptimiser.lowlydba.com/#deprecated-data-types'' - FROM sys.all_columns AS ac - INNER JOIN sys.objects AS o ON o.object_id = ac.object_id - INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id - WHERE st.name IN(''NEXT'', ''TEXT'', ''IMAGE'') - AND o.type_desc = ''USER_TABLE'';' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; --Don't use deprecated data types check - - /* BIGINT for identity values in Express*/ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - BIGINT used for identity columns (EXPRESS)'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - IF(@isExpress = 1) - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,N''USER_TABLE'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) - ,QUOTENAME(c.name) - ,N''BIGINT used on IDENTITY column in SQL Express. If values will never exceed 2,147,483,647 use INT instead.'' - ,N''https://spsizeoptimiser.lowlydba.com/#bigint-as-identity'' - FROM sys.columns as c - INNER JOIN sys.tables as t on t.object_id = c.object_id - INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id - WHERE t.is_ms_shipped = 0 --exclude sys table - AND ty.name = ''BIGINT'' - AND c.is_identity = 1;' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; -- BIGINT for identity Check - ELSE --Skip check - BEGIN - RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; - END; - - /* Numeric or decimal with 0 scale */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - NUMERIC or DECIMAL with scale of 0'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Data Types'' - ,[o].[type_desc] - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) - ,QUOTENAME(ac.name) - ,N''Column is '' + UPPER(st.name) + ''('' + CAST(ac.precision AS VARCHAR) + '','' + CAST(ac.scale AS VARCHAR) + '')'' - + '' . Consider using an INT variety for space reduction since the scale is 0.'' - ,N''https://spsizeoptimiser.lowlydba.com/#numeric-or-decimal-0-scale)'' - FROM sys.objects AS o - INNER JOIN sys.all_columns AS ac ON ac.object_id = o.object_id - INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id - WHERE ac.scale = 0 - AND ac.precision < 19 - AND st.name IN(''DECIMAL'', ''NUMERIC'');' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; -- Numeric or decimal with 0 scale check - - /* User DB or model db Growth set past 10GB - ONLY IF EXPRESS*/ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Data file growth set past 10GB (EXPRESS).'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - IF(@isExpress = 1) - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''File Growth'' - ,N''DATABASE'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(DB_NAME(database_id)) - ,NULL - ,N''Database file '' + name + '' has a maximum growth set to '' + CASE - WHEN max_size = -1 - THEN ''Unlimited'' - WHEN max_size > 0 - THEN CAST((max_size / 1024) * 8 AS VARCHAR(MAX)) - END + '', which is over the user database maximum file size of 10GB.'' - ,N''https://spsizeoptimiser.lowlydba.com/#database-growth-past-10GB'' - FROM sys.master_files mf - WHERE (max_size > 1280000 OR max_size = -1) -- greater than 10GB or unlimited - AND [mf].[database_id] > 5 - AND [mf].[data_space_id] > 0 -- limit doesn''t apply to log files;' - FROM #Databases - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; -- User DB or model db Growth check - ELSE - BEGIN - RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; - END; - - /* User DB or model db growth set to % */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Data file growth set to percentage.'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N'File Growth' - ,N'DATABASE' - ,QUOTENAME(DB_NAME([sd].[database_id])) - ,[mf].[name] - ,NULL - ,N'Database file '+[mf].[name]+' has growth set to % instead of a fixed amount. This may grow quickly.' - ,N'https://spsizeoptimiser.lowlydba.com/#database-growth-type' - FROM [sys].[master_files] AS [mf] - INNER JOIN [sys].[databases] AS [sd] ON [sd].[database_id] = [mf].[database_id] - INNER JOIN #Databases AS [d] ON [d].[database_name] = [sd].[name] - WHERE [mf].[is_percent_growth] = 1 - AND [mf].[data_space_id] = 1; --ignore log files - END; -- User DB or model db growth set to % Check - - /* Default fill factor (EXPRESS ONLY)*/ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Non-default fill factor (EXPRESS)'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - IF(@isExpress = 1) - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Architecture'' - ,N''INDEX'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME([o].[schema_id])) + ''.'' + QUOTENAME([o].[name]) + ''.'' + QUOTENAME([i].[name]) - ,NULL - ,N''Non-default fill factor on this index. Not inherently bad, but will increase table size more quickly.'' - ,N''https://spsizeoptimiser.lowlydba.com/#default-fill-factor'' - FROM [sys].[indexes] AS [i] - INNER JOIN [sys].[objects] AS [o] ON [o].[object_id] = [i].[object_id] - WHERE [i].[fill_factor] NOT IN(0, 100);' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@CheckNumber TINYINT', @CheckNumber = @CheckNumber; - END; -- Non-default fill factor check - ELSE --Skip check - BEGIN - RAISERROR(' Skipping check, not express...', 10, 1) WITH NOWAIT; - END; - - /* Number of indexes */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Questionable number of indexes'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - SET @checkSQL = N''; - SELECT @checkSQL = @checkSQL + N'USE ' + [database_name] + N'; - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N''Architecture'' - ,N''INDEX'' - ,QUOTENAME(DB_NAME()) - ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) - ,NULL - ,''There are '' + CAST(COUNT(DISTINCT(i.index_id)) AS VARCHAR) + '' indexes on this table taking up '' + CAST(CAST(SUM(s.[used_page_count]) * 8 / 1024.00 AS DECIMAL(10, 2)) AS VARCHAR) + '' MB of space.'' - ,''https://spsizeoptimiser.lowlydba.com/#number-of-indexes'' - FROM sys.indexes AS i - INNER JOIN sys.tables AS t ON i.object_id = t.object_id - INNER JOIN sys.dm_db_partition_stats AS s ON s.object_id = i.object_id - AND s.index_id = i.index_id - WHERE t.is_ms_shipped = 0 --exclude sys table - AND i.type_desc = ''NONCLUSTERED'' --exclude clustered indexes from count - GROUP BY t.name, - t.schema_id - HAVING COUNT(DISTINCT(i.index_id)) > @IndexNumThreshold;' - FROM #Databases; - EXEC sp_executesql @checkSQL, N'@IndexNumThreshold TINYINT, @CheckNumber TINYINT', @IndexNumThreshold = @IndexNumThreshold, @CheckNumber = @CheckNumber; - END; -- Questionable number of indexes check - - /* Inefficient Indexes */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Inefficient indexes'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - BEGIN - IF OBJECT_ID('tempdb..#DuplicateIndex') IS NOT NULL - BEGIN; - DROP TABLE #DuplicateIndex; - END; - IF OBJECT_ID('tempdb..#OverlappingIndex') IS NOT NULL - BEGIN; - DROP TABLE #OverlappingIndex; - END; - - CREATE TABLE #DuplicateIndex - ([check_type] NVARCHAR(50) NOT NULL - ,[obj_type] SYSNAME NOT NULL - ,[db_name] SYSNAME NOT NULL - ,[obj_name] SYSNAME NOT NULL - ,[col_name] SYSNAME NULL - ,[message] NVARCHAR(500) NULL - ,[object_id] INT NOT NULL - ,[index_id] INT NOT NULL); - - CREATE TABLE #OverlappingIndex - ([check_type] NVARCHAR(50) NOT NULL - ,[obj_type] SYSNAME NOT NULL - ,[db_name] SYSNAME NOT NULL - ,[obj_name] SYSNAME NOT NULL - ,[col_name] SYSNAME NULL - ,[message] NVARCHAR(500) NULL - ,[object_id] INT NOT NULL - ,[index_id] INT NOT NULL); - - SET @checkSQL = - N' USE ? ; - BEGIN - IF OBJECT_ID(''tempdb..#Indexes'') IS NOT NULL - BEGIN; - DROP TABLE [#Indexes]; - END; - IF OBJECT_ID(''tempdb..#IdxChecksum'') IS NOT NULL - BEGIN; - DROP TABLE [#IdxChecksum]; - END; - IF OBJECT_ID(''tempdb..#MatchingIdxInclChecksum'') IS NOT NULL - BEGIN; - DROP TABLE [#MatchingIdxInclChecksum]; - END; - IF OBJECT_ID(''tempdb..#MatchingIdxChecksum'') IS NOT NULL - BEGIN; - DROP TABLE [#MatchingIdxChecksum]; - END; - - /* Retrieve all indexes */ - SELECT ac.[name] AS [col_name] - ,row_number () OVER (PARTITION BY ind.[object_id], ind.index_id ORDER BY indc.index_column_id ) AS row_num - ,ind.index_id - ,ind.[object_id] - ,DENSE_RANK() OVER (ORDER BY ind.[object_id], ind.index_id) AS [index_num] - ,indc.is_included_column - ,NULL AS [ix_checksum] - ,NULL AS [ix_incl_checksum] - ,ao.[schema_id] - INTO #Indexes - FROM sys.indexes as [ind] - INNER JOIN sys.index_columns AS [indc] ON [ind].[object_id] = [indc].[object_id] AND ind.index_id = indc.index_id - INNER JOIN sys.all_columns as [ac] ON [ac].[column_id] = [indc].[column_id] and indc.[object_id] = ac.[object_id] - INNER JOIN sys.all_objects AS [ao] ON [ao].[object_id] = [ac].[object_id] - WHERE ao.is_ms_shipped = 0 - ORDER BY ind.[object_id]; - - DECLARE @Counter BIGINT = (SELECT 1); - DECLARE @MaxNumIndex BIGINT = (SELECT MAX(Index_num) FROM #Indexes); - - /* Iterate through each index, adding together columns for each */ - WHILE @Counter <= @MaxNumIndex - BEGIN - DECLARE @IndexedColumns NVARCHAR(MAX) = N''''; - DECLARE @IndexedColumnsInclude NVARCHAR(MAX) = N''''; - - /* Add together index columns */ - SELECT @IndexedColumns += CAST([col_name] AS SYSNAME) - FROM #Indexes - WHERE is_included_column = 0 - AND index_num = @Counter - ORDER BY row_num; - - /* Add together index + included columns */ - SELECT @IndexedColumnsInclude += CAST([col_name] AS SYSNAME) - FROM #Indexes - WHERE index_num = @Counter - ORDER BY row_num; - - /* Generate a checksum for index columns - and index + included columns for each index */ - UPDATE #Indexes - SET [ix_checksum] = CHECKSUM(@IndexedColumns), [ix_incl_checksum] = CHECKSUM(@IndexedColumnsInclude) - WHERE index_num = @Counter; - - SET @COUNTER += 1; - END; - - /* Narrow down to one row per index */ - SELECT DISTINCT [object_id], index_id, [ix_checksum], [ix_incl_checksum], [schema_id] - INTO #IdxChecksum - FROM #Indexes; - - /* Find duplicate indexes */ - SELECT COUNT(*) AS [num_dup_indexes], [ix_incl_checksum], [object_id] - INTO #MatchingIdxInclChecksum - FROM #IdxChecksum - GROUP BY [ix_incl_checksum], [object_id] - HAVING COUNT(*) > 1; - - /* Find overlapping indexes with same indexed columns */ - SELECT COUNT(*) AS [num_dup_indexes], [ix_checksum], [object_id] - INTO #MatchingIdxChecksum - FROM #IdxChecksum - GROUP BY [ix_checksum], [object_id] - HAVING COUNT(*) > 1 - - INSERT INTO #DuplicateIndex - SELECT N''Inefficient Indexes - Duplicate'' AS [check_type] - ,N''INDEX'' AS [obj_type] - ,QUOTENAME(DB_NAME()) AS [db_name] - ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] - ,NULL AS [col_name] - ,''Indexes in group '' + CAST(DENSE_RANK() over (order by miic.[ix_incl_checksum]) AS VARCHAR(5)) + '' share the same indexed and any included columns.'' AS [message] - ,ic.[object_id] - ,ic.[index_id] - FROM #MatchingIdxInclChecksum AS miic - INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = miic.[object_id] AND ic.[ix_incl_checksum] = miic.[ix_incl_checksum] - INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] - - INSERT INTO #OverlappingIndex - SELECT N''Inefficient Indexes - Overlapping'' AS [check_type] - ,N''INDEX'' AS [obj_type] - ,QUOTENAME(DB_NAME()) AS [db_name] - ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] - ,NULL AS [col_name] - ,''Indexes in group '' + CAST(DENSE_RANK() OVER (order by mic.[ix_checksum]) AS VARCHAR(5)) + '' share the same indexed columns.'' AS [message] - ,ic.[object_id] - ,ic.[index_id] - FROM #MatchingIdxChecksum AS mic - INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = mic.[object_id] AND ic.[ix_checksum] = mic.[ix_checksum] - INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] - /* Dont include any indexes that are already identified as 100% duplicates */ - WHERE NOT EXISTS (SELECT * FROM #DuplicateIndex AS [di] WHERE [di].[object_id] = ic.[object_id] AND di.index_id = ic.index_id); - END' - - DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD - FOR SELECT QUOTENAME([database_name]) - FROM #Databases; - - OPEN [DB_Cursor]; - - FETCH NEXT FROM [DB_Cursor] - INTO @db_name - - /* Run index query for each database */ - WHILE @@FETCH_STATUS = 0 - BEGIN - SET @tempCheckSQL = REPLACE(@checkSQL, N'?', @db_name); - EXEC sp_executesql @tempCheckSQL; - FETCH NEXT FROM [DB_Cursor] - INTO @db_name; - END; - CLOSE [DB_Cursor]; - DEALLOCATE [DB_Cursor]; - - /* Duplicate Indexes */ - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,[check_type] - ,[obj_type] - ,[db_name] - ,[obj_name] - ,[col_name] - ,[message] - ,N'https://spsizeoptimiser.lowlydba.com/#inefficient-indexes' - FROM #DuplicateIndex; - - /* Overlapping Indexes */ - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,[check_type] - ,[obj_type] - ,[db_name] - ,[obj_name] - ,[col_name] - ,[message] - ,N'https://spsizeoptimiser.lowlydba.com/#inefficient-indexes' - FROM #OverlappingIndex; - - END; -- Inefficient indexes check - - /* Sparse columns */ - SET @CheckNumber = @CheckNumber + 1; - SET @msg = N'Check ' + CAST(@CheckNumber AS NVARCHAR(3)) + ' - Sparse column eligibility'; - RAISERROR(@msg, 10, 1) WITH NOWAIT; - IF @hasSparse = 1 - BEGIN - IF OBJECT_ID('tempdb..#SparseTypes') IS NOT NULL - BEGIN; - DROP TABLE [#SparseTypes]; - END; - IF OBJECT_ID('tempdb..#Stats') IS NOT NULL - BEGIN; - DROP TABLE [#Stats]; - END; - IF OBJECT_ID('tempdb..#StatsHeaderStaging') IS NOT NULL - BEGIN; - DROP TABLE [#StatsHeaderStaging]; - END; - IF OBJECT_ID('tempdb..#StatHistogramStaging') IS NOT NULL - BEGIN; - DROP TABLE [#StatHistogramStaging]; - END; - - CREATE TABLE #SparseTypes ( - [ID] INT IDENTITY(1,1) NOT NULL, - [name] VARCHAR(20), - [user_type_ID] INT, - [scale] TINYINT NULL, - [precision] TINYINT NOT NULL, - [threshold_null_perc] TINYINT NOT NULL); - - CREATE CLUSTERED INDEX cidx_#sparsetypes ON #SparseTypes([ID]); - - /* Reference values for when it makes sense to use the sparse feature based on 40% minimum space savings - including if those recommendations change based on scale / precision. Conservative estimates are used - when a column is in between the high and low values in the table. - https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns?view=sql-server-2017#estimated-space-savings-by-data-type */ - INSERT INTO #SparseTypes ([name], [user_type_ID], [scale], [precision], [threshold_null_perc]) - VALUES ('BIT',104, 0,0, 98), - ('TINYINT',48, 0,0, 86), - ('SMALLINT',52, 0,0, 76), - ('INT',56, 0,0, 64), - ('BIGINT',127, 0,0, 52), - ('REAL',59, 0,0, 64), - ('FLOAT',62, 0,0, 52), - ('SMALLMONEY',122, 0,0, 64), - ('MONEY',60, 0,0, 52), - ('SMALLDATETIME',58, 0,0, 64), - ('DATETIME',61, 0,0, 52), - ('UNIQUEIDENTIFIER',36, 0,0, 43), - ('DATE',40, 0,0, 69), - ('DATETIME2',42, 0,0, 57), - ('DATETIME2',42, 7,0, 52), - ('TIME',41, 0,0, 69), - ('TIME',41, 7,0, 60), - ('DATETIMEOFFSET',43, 0,0, 52), - ('DATETIMEOFFSET',43, 7,0, 49), - ('VARCHAR',167, 0,0, 60), - ('CHAR',175, 0,0, 60), - ('NVARCHAR',231, 0,0, 60), - ('NCHAR',239, 0,0, 60), - ('VARBINARY',165, 0,0, 60), - ('BINARY',173, 0,0, 60), - ('XML',241, 0,0, 60), - ('HIERARCHYID',128, 0,0, 60), - ('DECIMAL', 106, NULL, 1, 60), - ('DECIMAL', 106, NULL, 38, 42), - ('NUMERIC', 108, NULL, 1, 60), - ('NUMERIC', 108, NULL, 38, 42); - - --For STAT_HEADER data - CREATE TABLE #StatsHeaderStaging ( - [name] SYSNAME - ,[updated] DATETIME2(0) - ,[rows] BIGINT - ,[rows_sampled] BIGINT - ,[steps] INT - ,[density] DECIMAL(6,3) - ,[average_key_length] DECIMAL(5,2) - ,[string_index] VARCHAR(10) - ,[filter_expression] nvarchar(max) - ,[unfiltered_rows] BIGINT); - - --Check for extra persisted sample percent column - IF @HasPersistedSamplePercent = 1 - BEGIN - ALTER TABLE #StatsHeaderStaging - ADD [persisted_sample_percent] INT; - END; - - --For HISTOGRAM data - CREATE TABLE #StatHistogramStaging ( - [range_hi_key] NVARCHAR(MAX) - ,[range_rows] BIGINT - ,[eq_rows] DECIMAL(38,2) - ,[distinct_range_rows] BIGINT - ,[avg_range_rows] BIGINT); - - --For combined DBCC stat data (SHOW_STAT + HISTOGRAM) - CREATE TABLE #Stats ( - [stats_id] INT IDENTITY(1,1) - ,[db_name] SYSNAME - ,[stat_name] SYSNAME - ,[stat_updated] DATETIME2(0) - ,[rows] BIGINT - ,[rows_sampled] BIGINT - ,[schema_name] SYSNAME - ,[table_name] SYSNAME NULL - ,[col_name] SYSNAME NULL - ,[eq_rows] BIGINT NULL - ,[null_perc] AS CAST([eq_rows] AS DECIMAL (38,2)) /[rows] * 100 - ,[threshold_null_perc] SMALLINT); - - CREATE CLUSTERED INDEX cidx_#stats ON #Stats([stats_id]); - - SET @checkSQL = - N' USE ?; - BEGIN - DECLARE @schemaName SYSNAME - ,@tableName SYSNAME - ,@statName SYSNAME - ,@colName SYSNAME - ,@threshold_null_perc SMALLINT; - - DECLARE @DBCCSQL NVARCHAR(MAX) = N''''; - DECLARE @DBCCStatSQL NVARCHAR(MAX) = N''''; - DECLARE @DBCCHistSQL NVARCHAR(MAX) = N''''; - - DECLARE [DBCC_Cursor] CURSOR LOCAL FAST_FORWARD - FOR - SELECT DISTINCT sch.name AS [schema_name] - ,t.name AS [table_name] - ,s.name AS [stat_name] - ,ac.name AS [col_name] - ,threshold_null_perc - FROM [sys].[stats] AS [s] - INNER JOIN [sys].[stats_columns] AS [sc] on sc.stats_id = s.stats_id - INNER JOIN [sys].[tables] AS [t] on t.object_id = s.object_id - INNER JOIN [sys].[schemas] AS [sch] on sch.schema_id = t.schema_id - INNER JOIN [sys].[all_columns] AS [ac] on ac.column_id = sc.column_id - AND [ac].[object_id] = [t].[object_id] - AND [ac].[object_id] = [sc].[object_id] - INNER JOIN [sys].[types] AS [typ] ON [typ].[user_type_id] = [ac].[user_type_id] - LEFT JOIN [sys].[indexes] AS [i] ON i.object_id = t.object_id - AND i.name = s.name - LEFT JOIN [sys].[index_columns] AS [ic] ON [ic].[object_id] = [i].[object_id] - AND [ic].[column_id] = [ac].[column_id] - AND ic.index_id = i.index_id ' - + /* Special considerations for variable length data types */ + - N'INNER JOIN [#SparseTypes] AS [st] ON [st].[user_type_id] = [typ].[user_type_id] - AND (typ.name NOT IN (''DECIMAL'', ''NUMERIC'', ''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'')) - OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND st.precision = ac.precision AND st.precision = 1) - OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND ac.precision > 1 AND st.precision = 38) - OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND st.scale = ac.scale AND st.scale = 0) - OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND ac.scale > 0 AND st.scale = 7) - WHERE [sc].[stats_column_id] = 1 - AND [s].[has_filter] = 0 - AND [s].[no_recompute] = 0 - AND [ac].[is_nullable] = 1 '; - - IF @hasTempStat = 1 - BEGIN - SET @checkSQL = @checkSQL + N'AND [s].[is_temporary] = 0 '; - END - - SET @checkSQL = @checkSQL + N'AND ([ic].[index_column_id] = 1 OR [ic].[index_column_id] IS NULL) - AND ([i].[type_desc] =''NONCLUSTERED'' OR [i].[type_desc] IS NULL); - - OPEN [DBCC_Cursor]; - - FETCH NEXT FROM [DBCC_Cursor] - INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; - - WHILE @@FETCH_STATUS = 0 - BEGIN; - DECLARE @SchemaTableName SYSNAME = QUOTENAME(@schemaName) + ''.'' + QUOTENAME(@tableName); ' - - + /* Build DBCC statistics queries */ + - N'SET @DBCCSQL = N''DBCC SHOW_STATISTICS(@SchemaTableName, @statName)''; - SET @DBCCStatSQL = @DBCCSQL + '' WITH STAT_HEADER, NO_INFOMSGS;''; - SET @DBCCHistSQL = @DBCCSQL + '' WITH HISTOGRAM, NO_INFOMSGS;''; ' - - + /* Stat Header temp table*/ + - N'INSERT INTO #StatsHeaderStaging - EXEC sp_executesql @DBCCStatSQL - ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' - ,@SchemaTableName = @SchemaTableName - ,@statName = @statName; ' - - + /* Histogram temp table*/ + - N'INSERT INTO #StatHistogramStaging - EXEC sp_executesql @DBCCHistSQL - ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' - ,@SchemaTableName = @SchemaTableName - ,@statName = @statName; - - INSERT INTO #Stats - SELECT QUOTENAME(DB_NAME()) - ,[head].[name] - ,[head].[updated] - ,[head].[rows] - ,[head].[rows_Sampled] - ,@schemaName - ,@tableName - ,@colName - ,[hist].[eq_rows] - ,@threshold_null_perc - FROM #StatsHeaderStaging head - CROSS APPLY #StatHistogramStaging hist - WHERE hist.RANGE_HI_KEY IS NULL - AND hist.eq_rows > 0 - AND head.Unfiltered_rows > 0 - AND head.rows > 1000; - - TRUNCATE TABLE #StatsHeaderStaging; - TRUNCATE TABLE #StatHistogramStaging; - - FETCH NEXT FROM DBCC_Cursor - INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; - END; - CLOSE [DBCC_Cursor]; - DEALLOCATE [DBCC_Cursor]; - END;' - - DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD - FOR SELECT QUOTENAME([database_name]) - FROM #Databases; - - OPEN [DB_Cursor]; - - FETCH NEXT FROM [DB_Cursor] - INTO @db_name; - - /* Run stat query for each database */ - WHILE @@FETCH_STATUS = 0 - BEGIN - SET @tempCheckSQL = REPLACE(@checkSQL, N'?', @db_name); - EXEC sp_executesql @tempCheckSQL; - FETCH NEXT FROM [DB_Cursor] - INTO @db_name; - END; - CLOSE [DB_Cursor]; - DEALLOCATE [DB_Cursor]; - - INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) - SELECT @CheckNumber - ,N'Architecture' - ,N'USER_TABLE' - ,QUOTENAME([db_name]) as "db_name" - ,QUOTENAME([schema_name]) + '.' + QUOTENAME([table_name]) - ,QUOTENAME([col_name]) - ,N'Candidate for converting to a space-saving sparse column based on NULL distribution of more than ' + CAST(threshold_null_perc AS VARCHAR(3))+ ' percent.' - ,N'https://spsizeoptimiser.lowlydba.com/#sparse-columns' - FROM #stats - WHERE [null_perc] >= [threshold_null_perc]; - END; -- Should sparse columns be used check - ELSE - BEGIN; - RAISERROR(' Skipping check, sparse columns not available in this version...', 10, 1) WITH NOWAIT; - END; - - /* Wrap it up */ - SELECT * - FROM #results - ORDER BY check_num, [check_type], [message], [db_name], obj_type, obj_name, [col_name]; - - RAISERROR('', 10, 1) WITH NOWAIT; - RAISERROR('Done!', 10, 1) WITH NOWAIT; - - END TRY - - BEGIN CATCH; - BEGIN - DECLARE @ErrorNumber INT = ERROR_NUMBER(); - DECLARE @ErrorLine INT = ERROR_LINE(); - DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE(); - DECLARE @ErrorSeverity INT = ERROR_SEVERITY(); - DECLARE @ErrorState INT = ERROR_STATE(); - - IF (@debug = 1) - BEGIN - PRINT 'Actual error number: ' + CAST(@ErrorNumber AS VARCHAR(10)); - PRINT 'Actual line number: ' + CAST(@ErrorLine AS VARCHAR(10)); - PRINT 'Check number: ' + CAST(@CheckNumber AS VARCHAR(10)); - END - - RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState) WITH NOWAIT; - END - END CATCH; -GO \ No newline at end of file diff --git a/Stored_Procedure/dbo.sp_sizeoptimiser.sql b/Stored_Procedure/dbo.sp_sizeoptimiser.sql new file mode 100644 index 00000000..b090bd54 --- /dev/null +++ b/Stored_Procedure/dbo.sp_sizeoptimiser.sql @@ -0,0 +1,1367 @@ +SET ANSI_NULLS ON; +GO + +SET QUOTED_IDENTIFIER ON; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'TYPE',N'SizeOptimiserTableType', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TYPE',@level1name=N'SizeOptimiserTableType'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMinorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMinorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMajorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMajorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IndexNumThreshold' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IndexNumThreshold' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IncludeDatabases' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IncludeDatabases' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@ExcludeDatabases' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@ExcludeDatabases' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IncludeSysDatabases' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IncludeSysDatabases' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IncludeSSRSDatabases' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IncludeSSRSDatabases' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@Verbose' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@Verbose' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IsExpress' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IsExpress' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; + END +GO + +/******************************/ +/* Cleanup existing versions */ +/******************************/ +IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) + BEGIN + DROP PROCEDURE [dbo].[sp_sizeoptimiser]; + END; + +IF EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') + BEGIN + DROP TYPE [dbo].[SizeOptimiserTableType]; + END; +GO + +/**************************************************************/ +/* Create user defined table type for database list parameter */ +/**************************************************************/ +IF NOT EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo') + BEGIN + CREATE TYPE [dbo].[SizeOptimiserTableType] AS TABLE( + [database_name] [sysname] NOT NULL, + PRIMARY KEY CLUSTERED ([database_name] ASC) WITH (IGNORE_DUP_KEY = OFF)); + END; +GO + +/***************************/ +/* Create stored procedure */ +/***************************/ +IF NOT EXISTS(SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]')) + BEGIN + EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_sizeoptimiser] AS'; + END; +GO + +ALTER PROCEDURE [dbo].[sp_sizeoptimiser] + @IndexNumThreshold SMALLINT = 10 + ,@IncludeDatabases [dbo].[SizeOptimiserTableType] READONLY + ,@ExcludeDatabases [dbo].[SizeOptimiserTableType] READONLY + ,@IncludeSysDatabases BIT = 0 + ,@IncludeSSRSDatabases BIT = 0 + ,@Verbose BIT = 1 + /* Parameters defined here for testing only */ + ,@IsExpress BIT = NULL + ,@SqlMajorVersion TINYINT = NULL + ,@SqlMinorVersion SMALLINT = NULL + +WITH RECOMPILE +AS + +/* +sp_sizeoptimiser - Recommends space saving measures for data footprints. + +Part of the DBA MultiTool http://dba-multitool.org + +Version: 20201110 + +MIT License + +Copyright (c) 2020 John McCall + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +========= + +Example: + + DECLARE @include SizeOptimiserTableType; + + INSERT INTO @include ([database_name]) + VALUES (N'WideWorldImporters'); + + EXEC [dbo].[sp_sizeoptimiser] @IncludeDatabases = @include +*/ + +BEGIN + SET NOCOUNT ON; + + BEGIN TRY + + DECLARE @HasTempStat BIT = 0 + ,@HasPersistedSamplePercent BIT = 0 + ,@CheckNumber TINYINT = 0 + ,@EngineEdition TINYINT + ,@CheckSQL NVARCHAR(MAX) = N'' + ,@Msg NVARCHAR(MAX) = N'' + ,@DbName SYSNAME = N'' + ,@TempCheckSQL NVARCHAR(MAX) = N'' + ,@BaseURL VARCHAR(1000) = 'http://dba-multitool.org/'; + + /* Validate @IndexNumThreshold */ + IF (@IndexNumThreshold < 1 OR @IndexNumThreshold > 999) + BEGIN + SET @Msg = '@IndexNumThreshold must be between 1 and 999.'; + RAISERROR(@Msg, 16, 1); + END + + /* Validate database list */ + IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 AND (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 + BEGIN + SET @Msg = 'Both @IncludeDatabases and @ExcludeDatabases cannot be specified.'; + RAISERROR(@Msg, 16, 1); + END + + CREATE TABLE #Databases ( + [database_name] SYSNAME NOT NULL); + + /* Build database list if no parameters set */ + IF (SELECT COUNT(*) FROM @IncludeDatabases) = 0 AND (SELECT COUNT(*) FROM @ExcludeDatabases) = 0 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM [sys].[databases] AS [sd] + WHERE ([sd].[database_id] > 4 OR @IncludeSysDatabases = 1) + AND ([sd].[name] NOT IN ('ReportServer', 'ReportServerTempDB') OR @IncludeSSRSDatabases = 1) + AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; + END; + /* Build database list from @IncludeDatabases */ + ELSE IF (SELECT COUNT(*) FROM @IncludeDatabases) >= 1 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM @IncludeDatabases AS [d] + INNER JOIN [sys].[databases] AS [sd] ON [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '') + WHERE DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE'; + + IF (SELECT COUNT(*) FROM @IncludeDatabases) > (SELECT COUNT(*) FROM #Databases) + BEGIN + DECLARE @ErrorDatabaseList NVARCHAR(MAX); + + WITH ErrorDatabase AS( + SELECT [database_name] + FROM @IncludeDatabases + EXCEPT + SELECT [database_name] + FROM #Databases) + + SELECT @ErrorDatabaseList = ISNULL(@ErrorDatabaseList + N', ' + [database_name], [database_name]) + FROM ErrorDatabase; + + SET @Msg = 'Supplied databases do not exist or are not accessible: ' + @ErrorDatabaseList + '.'; + RAISERROR(@Msg, 16, 1); + END; + END; + /* Build database list from @ExcludeDatabases */ + ELSE IF (SELECT COUNT(*) FROM @ExcludeDatabases) >= 1 + BEGIN + INSERT INTO #Databases + SELECT [sd].[name] + FROM [sys].[databases] AS [sd] + WHERE NOT EXISTS (SELECT [d].[database_name] + FROM @IncludeDatabases AS [d] + WHERE [sd].[name] COLLATE database_default = REPLACE(REPLACE([d].[database_name], '[', ''), ']', '')) + AND DATABASEPROPERTYEX([sd].[name], 'UPDATEABILITY') = N'READ_WRITE' + AND DATABASEPROPERTYEX([sd].[name], 'USERACCESS') = N'MULTI_USER' + AND DATABASEPROPERTYEX([sd].[name], 'STATUS') = N'ONLINE' + AND [sd].[name] <> 'tempdb'; + END + + /* Find edition */ + IF (@IsExpress IS NULL AND CAST(SERVERPROPERTY('Edition') AS VARCHAR(50)) LIKE 'Express%') + BEGIN + SET @IsExpress = 1; + END; + ELSE IF (@IsExpress IS NULL) + BEGIN; + SET @IsExpress = 0; + END; + + /* Find engine edition */ + IF (@EngineEdition IS NULL) + BEGIN + SET @EngineEdition = CAST(SERVERPROPERTY('EditionEdition') AS TINYINT); + END; + + /* Find Version */ + IF (@SqlMajorVersion IS NULL) + BEGIN; + SET @SqlMajorVersion = CAST(SERVERPROPERTY('ProductMajorVersion') AS TINYINT); + END; + IF (@SqlMinorVersion IS NULL) + BEGIN; + SET @SqlMinorVersion = CAST(SERVERPROPERTY('ProductMinorVersion') AS SMALLINT); + END; + + /* Validate Version */ + IF (@SqlMajorVersion < 11) + BEGIN; + SET @Msg = 'SQL Server versions below 2012 are not supported, sorry!'; + RAISERROR(@Msg, 16, 1); + END; + + /* Check for is_temp value on statistics */ + IF 1 = (SELECT 1 FROM [sys].[all_columns] AS [ac] WHERE [ac].[name] = 'is_temporary' AND OBJECT_NAME([ac].[object_id]) = 'all_columns') + BEGIN; + SET @HasTempStat = 1; + END; + + /* Check for Persisted Sample Percent update */ + IF 1 = (SELECT 1 FROM [sys].[all_columns] AS [ac] WHERE [ac].[name] = 'persisted_sample_percent' AND OBJECT_NAME([ac].[object_id]) = 'dm_db_stats_properties') + BEGIN; + SET @HasPersistedSamplePercent = 1; + END; + + IF (@Verbose = 1) + BEGIN; + /* Print info */ + SET @Msg = 'sp_sizeoptimiser'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = '------------'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('Time: ', GETDATE()); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('SQL Major Version: ', @SqlMajorVersion); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('SQL Minor Version: ', @SqlMinorVersion); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('Is Express Edition: ', @IsExpress); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('Is feature "persisted sample percent" available: ', @HasPersistedSamplePercent); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT(CHAR(13), CHAR(10)); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + /* Build temp tables */ + IF OBJECT_ID(N'tempdb..#results') IS NOT NULL + BEGIN; + DROP TABLE #results; + END; + + CREATE TABLE #results + ([check_num] INT NOT NULL, + [check_type] NVARCHAR(50) NOT NULL, + [db_name] SYSNAME NOT NULL, + [obj_type] SYSNAME NOT NULL, + [obj_name] NVARCHAR(400) NOT NULL, + [col_name] SYSNAME NULL, + [message] NVARCHAR(500) NULL, + [ref_link] NVARCHAR(500) NULL); + + IF OBJECT_ID('tempdb..#DuplicateIndex') IS NOT NULL + BEGIN; + DROP TABLE #DuplicateIndex; + END; + + CREATE TABLE #DuplicateIndex + ([check_type] NVARCHAR(50) NOT NULL + ,[obj_type] SYSNAME NOT NULL + ,[db_name] SYSNAME NOT NULL + ,[obj_name] SYSNAME NOT NULL + ,[col_name] SYSNAME NULL + ,[message] NVARCHAR(500) NULL + ,[object_id] INT NOT NULL + ,[index_id] INT NOT NULL); + + IF OBJECT_ID('tempdb..#OverlappingIndex') IS NOT NULL + BEGIN; + DROP TABLE #OverlappingIndex; + END; + + CREATE TABLE #OverlappingIndex + ([check_type] NVARCHAR(50) NOT NULL + ,[obj_type] SYSNAME NOT NULL + ,[db_name] SYSNAME NOT NULL + ,[obj_name] SYSNAME NOT NULL + ,[col_name] SYSNAME NULL + ,[message] NVARCHAR(500) NULL + ,[object_id] INT NOT NULL + ,[index_id] INT NOT NULL); + + /* Header row */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'Lets do this' + ,N'Vroom vroom' + ,N'beep boop' + ,N'Off to the races' + ,N'Ready set go' + ,N'Thanks for using' + ,@BaseURL; + + /* Date & Time Data Type Usage */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Date and Time Data Types'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([t].[schema_id])) + ''.'' + QUOTENAME([t].[name]) + ,QUOTENAME([c].[name]) + ,N''Columns storing date or time should use a temporal specific data type, but this column is using '' + ty.name + ''.'' + ,CONCAT(@BaseURL COLLATE database_default, ''time-based-formats'') + FROM [sys].[columns] AS [c] + INNER JOIN [sys].[tables] AS [t] on [t].[object_id] = [c].[object_id] + INNER JOIN [sys].[types] AS [ty] on [ty].[user_type_id] = [c].[user_type_id] + WHERE [c].[is_identity] = 0 --exclude identity cols + AND [t].[is_ms_shipped] = 0 --exclude sys table + AND ([c].[name] LIKE ''%date%'' OR [c].[name] LIKE ''%time%'') + AND [c].[name] NOT LIKE ''%UpdatedBy%'' + AND [c].[name] NOT LIKE ''%days%'' + AND [ty].[name] NOT IN (''datetime'', ''datetime2'', ''datetimeoffset'', ''date'', ''smalldatetime'', ''time'');' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --Date and Time Data Type Check + + /* Archaic varchar Lengths (255/256) */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Archaic varchar Lengths'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; WITH archaic AS ( + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] + ,QUOTENAME(c.name) AS [col_name] + ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length / 2 AS varchar(MAX)) + N'' based on requirements?'' AS [message] + ,CONCAT(@BaseURL COLLATE database_default, ''arbitrary-varchar-length'') AS [ref_link] + FROM sys.columns c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''NVARCHAR'' + AND c.max_length IN (510, 512) + UNION + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''Possible arbitrary variable length column in use. Is the '' + ty.name + N'' length of '' + CAST (c.max_length AS varchar(MAX)) + N'' based on requirements'' + ,CONCAT(@BaseURL COLLATE database_default, ''arbitrary-varchar-length'') + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''VARCHAR'' + AND c.max_length IN (255, 256)) + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,[obj_name] + ,[col_name] + ,[message] + ,[ref_link] + FROM [archaic];' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --Archaic varchar Lengths + + /* Unspecified VARCHAR Length */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber,' - Unspecified VARCHAR Length'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + '; + WITH UnspecifiedVarChar AS ( + SELECT QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) AS [obj_name] + ,QUOTENAME(c.name) AS [col_name] + ,N''VARCHAR column without specified length, it should not have a length of '' + CAST (c.max_length AS varchar(10)) + '''' AS [message] + ,CONCAT(@BaseURL COLLATE database_default, ''unspecified-varchar-length'') AS [ref_link] + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE c.is_identity = 0 --exclude identity cols + AND t.is_ms_shipped = 0 --exclude sys table + AND ty.name IN (''VARCHAR'', ''NVARCHAR'') + AND c.max_length = 1) + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,[obj_name] + ,[col_name] + ,[message] + ,[ref_link] + FROM [UnspecifiedVarChar];' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --Unspecified VARCHAR Length + + /* Mad MAX - Varchar(MAX) */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Mad MAX VARCHAR'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''Column is NVARCHAR(MAX) which allows very large row sizes. Consider a character limit.'' + ,CONCAT(@BaseURL COLLATE database_default, ''mad-varchar-max'') + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND ty.[name] = ''nvarchar'' + AND c.max_length = -1;' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --NVARCHAR MAX Check + + /* NVARCHAR data type in Express */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Use of NVARCHAR (EXPRESS)'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF (@IsExpress = 1) + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([o].schema_id)) + ''.'' + QUOTENAME(OBJECT_NAME([o].object_id)) + ,QUOTENAME([ac].[name]) + ,N''nvarchar columns take 2x the space per char of varchar. Only use if you need Unicode characters.'' + ,CONCAT(@BaseURL COLLATE database_default, ''nvarchar-in-express'') + FROM [sys].[all_columns] AS [ac] + INNER JOIN [sys].[types] AS [t] ON [t].[user_type_id] = [ac].[user_type_id] + INNER JOIN [sys].[objects] AS [o] ON [o].object_id = [ac].object_id + WHERE [t].[name] = ''NVARCHAR'' + AND [o].[is_ms_shipped] = 0' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --NVARCHAR Use Check + ELSE IF (@Verbose = 1) --Skip check + BEGIN; + RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; + END; -- Skip check + END; --NVARCHAR Use Check + + /* FLOAT and REAL data types */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg =CONCAT(N'Check ', @CheckNumber, ' - Use of FLOAT/REAL data types'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([o].[schema_id])) + ''.'' + QUOTENAME([o].[name]) + ,QUOTENAME([ac].[name]) + ,N''Best practice is to use DECIMAL/NUMERIC instead of '' + UPPER([st].[name]) + '' for non floating point math.'' + ,CONCAT(@BaseURL COLLATE database_default, ''float-and-real-data-types'') + FROM [sys].[all_columns] AS [ac] + INNER JOIN [sys].[objects] AS [o] ON [o].[object_id] = [ac].[object_id] + INNER JOIN [sys].[systypes] AS [st] ON [st].[xtype] = [ac].[system_type_id] + WHERE [st].[name] IN (''FLOAT'', ''REAL'') + AND [o].[type_desc] = ''USER_TABLE'';' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- FLOAT/REAL Check + + /* Deprecated data types (NTEXT, TEXT, IMAGE) */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Deprecated data types'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Deprecated data type in use: '' + st.name + ''.'' + ,CONCAT(@BaseURL COLLATE database_default, ''deprecated-data-types'') + FROM sys.all_columns AS ac + INNER JOIN sys.objects AS o ON o.object_id = ac.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE st.name IN(''NEXT'', ''TEXT'', ''IMAGE'') + AND o.type_desc = ''USER_TABLE'';' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --Don't use deprecated data types check + + /* BIGINT for identity values in Express */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - BIGINT used for identity columns (EXPRESS)'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF (@IsExpress = 1) + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,N''USER_TABLE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,QUOTENAME(c.name) + ,N''BIGINT used on IDENTITY column in SQL Express. If values will never exceed 2,147,483,647 use INT instead.'' + ,CONCAT(@BaseURL COLLATE database_default, ''bigint-as-identity'') + FROM sys.columns as c + INNER JOIN sys.tables as t on t.object_id = c.object_id + INNER JOIN sys.types as ty on ty.user_type_id = c.user_type_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND ty.name = ''BIGINT'' + AND c.is_identity = 1;' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- BIGINT for identity Check + ELSE IF (@Verbose = 1) --Skip check + BEGIN + RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; + END; ----Skip check + END; -- BIGINT for identity Check + + /* Numeric or decimal with 0 scale */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - NUMERIC or DECIMAL with scale of 0'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Column is '' + UPPER(st.name) + ''('' + CAST(ac.precision AS VARCHAR) + '','' + CAST(ac.scale AS VARCHAR) + '')'' + + '' . Consider using an INT variety for space reduction since the scale is 0.'' + ,CONCAT(@BaseURL COLLATE database_default, ''numeric-or-decimal-0-scale'') + FROM sys.objects AS o + INNER JOIN sys.all_columns AS ac ON ac.object_id = o.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE ac.scale = 0 + AND ac.precision < 19 + AND st.name IN(''DECIMAL'', ''NUMERIC'') + AND o.is_ms_shipped = 0;' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- Numeric or decimal with 0 scale check + + /* Enum columns not implemented as foreign key */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Enum columns not implemented as foreign key.'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Data Types'' + ,[o].[type_desc] + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(o.schema_id)) + ''.'' + QUOTENAME(o.name) + ,QUOTENAME(ac.name) + ,N''Column is potentially an enum that should be a foreign key to a normalized table for data integrity, space savings, and performance.'' + ,CONCAT(@BaseURL COLLATE database_default, ''enum-column-not-implemented-as-foreign-key'') + FROM sys.objects AS o + INNER JOIN sys.all_columns AS ac ON ac.object_id = o.object_id + INNER JOIN sys.systypes AS st ON st.xtype = ac.system_type_id + WHERE (ac.[name] LIKE ''%Type'' OR ac.[name] LIKE ''%Status'') + AND o.is_ms_shipped = 0 + AND [o].[type] = ''U'' + AND st.[name] IN (''nvarchar'', ''varchar'', ''char'');' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- Enum columns not implemented as foreign key + + /* User DB or model db Growth set past 10GB - ONLY IF EXPRESS */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Data file growth set past 10GB (EXPRESS)'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF (@IsExpress = 1) + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''File Growth'' + ,N''DATABASE'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(DB_NAME(database_id)) + ,NULL + ,N''Database file '' + name + '' has a maximum growth set to '' + + CASE + WHEN max_size = -1 + THEN ''Unlimited'' + WHEN max_size > 0 + THEN CAST((max_size / 1024) * 8 AS VARCHAR(MAX)) + END + '', which is over the user database maximum file size of 10GB.'' + ,CONCAT(@BaseURL COLLATE database_default, ''database-growth-past-10GB'') + FROM sys.master_files mf + WHERE (max_size > 1280000 OR max_size = -1) -- greater than 10GB or unlimited + AND [mf].[database_id] > 5 + AND [mf].[data_space_id] > 0 -- limit doesn''t apply to log files;' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- User DB or model db Growth check + ELSE IF (@Verbose = 1) --Skip check + BEGIN; + RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; + END; + END; -- User DB or model db Growth check + + /* User DB or model db growth set to % */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Data file growth set to percentage.'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF (@EngineEdition <> 5) --Not Azure SQL + BEGIN + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'File Growth' + ,N'DATABASE' + ,QUOTENAME(DB_NAME([sd].[database_id])) + ,[mf].[name] + ,NULL + ,N'Database file '+[mf].[name]+' has growth set to % instead of a fixed amount. This may grow quickly.' + ,CONCAT(@BaseURL, 'database-growth-type') + FROM [sys].[master_files] AS [mf] + INNER JOIN [sys].[databases] AS [sd] ON [sd].[database_id] = [mf].[database_id] + INNER JOIN #Databases AS [d] ON [d].[database_name] = [sd].[name] + WHERE [mf].[is_percent_growth] = 1 + AND [mf].[data_space_id] = 1; --ignore log files + END; + END; -- User DB or model db growth set to % Check + + /* Default fill factor (EXPRESS ONLY) */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Non-default fill factor (EXPRESS)'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF(@IsExpress = 1) + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Architecture'' + ,N''INDEX'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([o].[schema_id])) + ''.'' + QUOTENAME([o].[name]) + ''.'' + QUOTENAME([i].[name]) + ,NULL + ,N''Non-default fill factor on this index. Not inherently bad, but will increase table size more quickly.'' + ,CONCAT(@BaseURL COLLATE database_default, ''default-fill-factor'') + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[objects] AS [o] ON [o].[object_id] = [i].[object_id] + WHERE [i].[fill_factor] NOT IN(0, 100);' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- Non-default fill factor check + ELSE IF (@Verbose = 1) --Skip check + BEGIN; + RAISERROR(' Skipping check, not Express...', 10, 1) WITH NOWAIT; + END; + END; --Default fill factor + + /* Number of indexes */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT('Check ', @CheckNumber, ' - Questionable number of indexes'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Architecture'' + ,N''INDEX'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME(t.schema_id)) + ''.'' + QUOTENAME(t.name) + ,NULL + ,''There are '' + CAST(COUNT(DISTINCT(i.index_id)) AS VARCHAR) + '' indexes on this table taking up '' + CAST(CAST(SUM(s.[used_page_count]) * 8 / 1024.00 AS DECIMAL(10, 2)) AS VARCHAR) + '' MB of space.'' + ,CONCAT(@BaseURL COLLATE database_default, ''number-of-indexes'') + FROM sys.indexes AS i + INNER JOIN sys.tables AS t ON i.object_id = t.object_id + INNER JOIN sys.dm_db_partition_stats AS s ON s.object_id = i.object_id + AND s.index_id = i.index_id + WHERE t.is_ms_shipped = 0 --exclude sys table + AND i.type_desc = ''NONCLUSTERED'' --exclude clustered indexes from count + GROUP BY t.name, + t.schema_id + HAVING COUNT(DISTINCT(i.index_id)) > @IndexNumThreshold;' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@IndexNumThreshold TINYINT, @CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @IndexNumThreshold = @IndexNumThreshold, @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; -- Questionable number of indexes check + + /* Inefficient Indexes */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Inefficient indexes'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N' USE ? ; + BEGIN + IF OBJECT_ID(''tempdb..#Indexes'') IS NOT NULL + BEGIN; + DROP TABLE [#Indexes]; + END; + IF OBJECT_ID(''tempdb..#IdxChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#IdxChecksum]; + END; + IF OBJECT_ID(''tempdb..#MatchingIdxInclChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#MatchingIdxInclChecksum]; + END; + IF OBJECT_ID(''tempdb..#MatchingIdxChecksum'') IS NOT NULL + BEGIN; + DROP TABLE [#MatchingIdxChecksum]; + END; ' + + + /* Retrieve all indexes */ + + N'SELECT ac.[name] AS [col_name] + ,row_number () OVER (PARTITION BY ind.[object_id], ind.index_id ORDER BY indc.index_column_id ) AS row_num + ,ind.index_id + ,ind.[object_id] + ,DENSE_RANK() OVER (ORDER BY ind.[object_id], ind.index_id) AS [index_num] + ,indc.is_included_column + ,NULL AS [ix_checksum] + ,NULL AS [ix_incl_checksum] + ,ao.[schema_id] + INTO #Indexes + FROM sys.indexes as [ind] + INNER JOIN sys.index_columns AS [indc] ON [ind].[object_id] = [indc].[object_id] AND ind.index_id = indc.index_id + INNER JOIN sys.all_columns as [ac] ON [ac].[column_id] = [indc].[column_id] and indc.[object_id] = ac.[object_id] + INNER JOIN sys.all_objects AS [ao] ON [ao].[object_id] = [ac].[object_id] + WHERE ao.is_ms_shipped = 0 + ORDER BY ind.[object_id]; + + DECLARE @Counter BIGINT = (SELECT 1); + DECLARE @MaxNumIndex BIGINT = (SELECT MAX(index_num) FROM #Indexes); ' + + + /* Iterate through each index, adding together columns for each */ + + N'WHILE @Counter <= @MaxNumIndex + BEGIN + DECLARE @IndexedColumns NVARCHAR(MAX) = N''''; + DECLARE @IndexedColumnsInclude NVARCHAR(MAX) = N''''; ' + + + /* Add together index columns */ + + N'SELECT @IndexedColumns += CAST([col_name] AS SYSNAME) + FROM #Indexes + WHERE is_included_column = 0 + AND index_num = @Counter + ORDER BY row_num; ' + + + /* Add together index + included columns */ + + N'SELECT @IndexedColumnsInclude += CAST([col_name] AS SYSNAME) + FROM #Indexes + WHERE index_num = @Counter + ORDER BY row_num; ' + + + /* Generate a checksum for index columns and index + included columns for each index */ + + N'UPDATE #Indexes + SET [ix_checksum] = CHECKSUM(@IndexedColumns), [ix_incl_checksum] = CHECKSUM(@IndexedColumnsInclude) + WHERE index_num = @Counter; + + SET @Counter += 1; + END; ' + + + /* Narrow down to one row per index */ + + N'SELECT DISTINCT [object_id], index_id, [ix_checksum], [ix_incl_checksum], [schema_id] + INTO #IdxChecksum + FROM #Indexes; ' + + + /* Find duplicate indexes */ + + N'SELECT COUNT(*) AS [num_dup_indexes], [ix_incl_checksum], [object_id] + INTO #MatchingIdxInclChecksum + FROM #IdxChecksum + GROUP BY [ix_incl_checksum], [object_id] + HAVING COUNT(*) > 1; ' + + + /* Find overlapping indexes with same indexed columns */ + + N'SELECT COUNT(*) AS [num_dup_indexes], [ix_checksum], [object_id] + INTO #MatchingIdxChecksum + FROM #IdxChecksum + GROUP BY [ix_checksum], [object_id] + HAVING COUNT(*) > 1 + + INSERT INTO #DuplicateIndex + SELECT N''Inefficient Indexes - Duplicate'' AS [check_type] + ,N''INDEX'' AS [obj_type] + ,QUOTENAME(DB_NAME()) AS [db_name] + ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] + ,NULL AS [col_name] + ,''Indexes in group '' + CAST(DENSE_RANK() over (order by miic.[ix_incl_checksum]) AS VARCHAR(5)) + '' share the same indexed and any included columns.'' AS [message] + ,ic.[object_id] + ,ic.[index_id] + FROM #MatchingIdxInclChecksum AS miic + INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = miic.[object_id] AND ic.[ix_incl_checksum] = miic.[ix_incl_checksum] + INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] + + INSERT INTO #OverlappingIndex + SELECT N''Inefficient Indexes - Overlapping'' AS [check_type] + ,N''INDEX'' AS [obj_type] + ,QUOTENAME(DB_NAME()) AS [db_name] + ,QUOTENAME(SCHEMA_NAME([schema_id])) + ''.'' + QUOTENAME(OBJECT_NAME(ic.[object_id])) + ''.'' + QUOTENAME(i.[name]) AS [obj_name] + ,NULL AS [col_name] + ,''Indexes in group '' + CAST(DENSE_RANK() OVER (order by mic.[ix_checksum]) AS VARCHAR(5)) + '' share the same indexed columns.'' AS [message] + ,ic.[object_id] + ,ic.[index_id] + FROM #MatchingIdxChecksum AS mic + INNER JOIN #IdxChecksum AS ic ON ic.[object_id] = mic.[object_id] AND ic.[ix_checksum] = mic.[ix_checksum] + INNER JOIN sys.indexes AS [i] ON [i].[index_id] = ic.index_id AND i.[object_id] = ic.[object_id] ' + + /* Dont include any indexes that are already identified as 100% duplicates */ + + N'WHERE NOT EXISTS (SELECT * FROM #DuplicateIndex AS [di] WHERE [di].[object_id] = ic.[object_id] AND di.index_id = ic.index_id); + END'; + + DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD + FOR SELECT QUOTENAME([database_name]) + FROM #Databases; + + OPEN [DB_Cursor]; + + FETCH NEXT FROM [DB_Cursor] + INTO @DbName; + + /* Run index query for each database */ + WHILE @@FETCH_STATUS = 0 + BEGIN; + SET @TempCheckSQL = REPLACE(@CheckSQL, N'?', @DbName); + EXEC sp_executesql @TempCheckSQL; + FETCH NEXT FROM [DB_Cursor] + INTO @DbName; + END; + CLOSE [DB_Cursor]; + DEALLOCATE [DB_Cursor]; + + /* Duplicate Indexes */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,[check_type] + ,[obj_type] + ,[db_name] + ,[obj_name] + ,[col_name] + ,[message] + ,CONCAT(@BaseURL,'inefficient-indexes') + FROM #DuplicateIndex; + + /* Overlapping Indexes */ + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,[check_type] + ,[obj_type] + ,[db_name] + ,[obj_name] + ,[col_name] + ,[message] + ,CONCAT(@BaseURL,'inefficient-indexes') + FROM #OverlappingIndex; + + END; -- Inefficient indexes check + + /* Sparse columns */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Sparse column eligibility'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN; + IF OBJECT_ID('tempdb..#SparseTypes') IS NOT NULL + BEGIN; + DROP TABLE [#SparseTypes]; + END; + IF OBJECT_ID('tempdb..#Stats') IS NOT NULL + BEGIN; + DROP TABLE [#Stats]; + END; + IF OBJECT_ID('tempdb..#StatsHeaderStaging') IS NOT NULL + BEGIN; + DROP TABLE [#StatsHeaderStaging]; + END; + IF OBJECT_ID('tempdb..#StatHistogramStaging') IS NOT NULL + BEGIN; + DROP TABLE [#StatHistogramStaging]; + END; + + CREATE TABLE #SparseTypes ( + [ID] INT IDENTITY(1,1) NOT NULL, + [name] VARCHAR(20), + [user_type_id] INT, + [scale] TINYINT NULL, + [precision] TINYINT NOT NULL, + [threshold_null_perc] TINYINT NOT NULL); + + CREATE CLUSTERED INDEX cidx_#sparsetypes ON #SparseTypes([ID]); + + /* Reference values for when it makes sense to use the sparse feature based on 40% minimum space savings + including if those recommendations change based on scale / precision. Conservative estimates are used + when a column is in between the high and low values in the table. + https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns?view=sql-server-2017#estimated-space-savings-by-data-type */ + INSERT INTO #SparseTypes ([name], [user_type_id], [scale], [precision], [threshold_null_perc]) + VALUES ('BIT',104, 0,0, 98), + ('TINYINT',48, 0,0, 86), + ('SMALLINT',52, 0,0, 76), + ('INT',56, 0,0, 64), + ('BIGINT',127, 0,0, 52), + ('REAL',59, 0,0, 64), + ('FLOAT',62, 0,0, 52), + ('SMALLMONEY',122, 0,0, 64), + ('MONEY',60, 0,0, 52), + ('SMALLDATETIME',58, 0,0, 64), + ('DATETIME',61, 0,0, 52), + ('UNIQUEIDENTIFIER',36, 0,0, 43), + ('DATE',40, 0,0, 69), + ('DATETIME2',42, 0,0, 57), + ('DATETIME2',42, 7,0, 52), + ('TIME',41, 0,0, 69), + ('TIME',41, 7,0, 60), + ('DATETIMEOFFSET',43, 0,0, 52), + ('DATETIMEOFFSET',43, 7,0, 49), + ('VARCHAR',167, 0,0, 60), + ('CHAR',175, 0,0, 60), + ('NVARCHAR',231, 0,0, 60), + ('NCHAR',239, 0,0, 60), + ('VARBINARY',165, 0,0, 60), + ('BINARY',173, 0,0, 60), + ('XML',241, 0,0, 60), + ('HIERARCHYID',128, 0,0, 60), + ('DECIMAL', 106, NULL, 1, 60), + ('DECIMAL', 106, NULL, 38, 42), + ('NUMERIC', 108, NULL, 1, 60), + ('NUMERIC', 108, NULL, 38, 42); + + --For STAT_HEADER data + CREATE TABLE #StatsHeaderStaging ( + [name] SYSNAME + ,[updated] DATETIME2(0) + ,[rows] BIGINT + ,[rows_sampled] BIGINT + ,[steps] INT + ,[density] DECIMAL(6,3) + ,[average_key_length] REAL + ,[string_index] VARCHAR(10) + ,[filter_expression] NVARCHAR(MAX) + ,[unfiltered_rows] BIGINT); + + --Check for extra persisted sample percent column + IF @HasPersistedSamplePercent = 1 + BEGIN; + ALTER TABLE #StatsHeaderStaging ADD [persisted_sample_percent] INT; + END; + + --For HISTOGRAM data + CREATE TABLE #StatHistogramStaging ( + [range_hi_key] NVARCHAR(MAX) + ,[range_rows] BIGINT + ,[eq_rows] DECIMAL(38,2) + ,[distinct_range_rows] BIGINT + ,[avg_range_rows] BIGINT); + + --For combined DBCC stat data (SHOW_STAT + HISTOGRAM) + CREATE TABLE #Stats ( + [stats_id] INT IDENTITY(1,1) + ,[db_name] SYSNAME + ,[stat_name] SYSNAME + ,[stat_updated] DATETIME2(0) + ,[rows] BIGINT + ,[rows_sampled] BIGINT + ,[schema_name] SYSNAME + ,[table_name] SYSNAME NULL + ,[col_name] SYSNAME NULL + ,[eq_rows] BIGINT NULL + ,[null_perc] AS CAST([eq_rows] AS DECIMAL (38,2)) / NULLIF([rows], 0) * 100 + ,[threshold_null_perc] SMALLINT); + + CREATE CLUSTERED INDEX cidx_#stats ON #Stats([stats_id]); + + SET @CheckSQL = + N' USE ?; + BEGIN + DECLARE @schemaName SYSNAME + ,@tableName SYSNAME + ,@statName SYSNAME + ,@colName SYSNAME + ,@threshold_null_perc SMALLINT; + + DECLARE @DBCCSQL NVARCHAR(MAX) = N''''; + DECLARE @DBCCStatSQL NVARCHAR(MAX) = N''''; + DECLARE @DBCCHistSQL NVARCHAR(MAX) = N''''; + + DECLARE [DBCC_Cursor] CURSOR LOCAL FAST_FORWARD + FOR + SELECT DISTINCT sch.name AS [schema_name] + ,t.name AS [table_name] + ,s.name AS [stat_name] + ,ac.name AS [col_name] + ,threshold_null_perc + FROM [sys].[stats] AS [s] + INNER JOIN [sys].[stats_columns] AS [sc] on sc.stats_id = s.stats_id + INNER JOIN [sys].[tables] AS [t] on t.object_id = s.object_id + INNER JOIN [sys].[schemas] AS [sch] on sch.schema_id = t.schema_id + INNER JOIN [sys].[all_columns] AS [ac] on ac.column_id = sc.column_id + AND [ac].[object_id] = [t].[object_id] + AND [ac].[object_id] = [sc].[object_id] + INNER JOIN [sys].[types] AS [typ] ON [typ].[user_type_id] = [ac].[user_type_id] + INNER JOIN [sys].[indexes] AS [i] ON [i].[object_id] = [t].[object_id] ' + + /* Special considerations for variable length data types */ + + N'INNER JOIN [#SparseTypes] AS [st] ON [st].[user_type_id] = [typ].[user_type_id] + AND (typ.name NOT IN (''DECIMAL'', ''NUMERIC'', ''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'')) + OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND st.precision = ac.precision AND st.precision = 1) + OR (typ.name IN (''DECIMAL'', ''NUMERIC'') AND ac.precision > 1 AND st.precision = 38) + OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND st.scale = ac.scale AND st.scale = 0) + OR (typ.name IN (''DATETIME2'', ''TIME'', ''DATETIMEOFFSET'') AND ac.scale > 0 AND st.scale = 7) + WHERE [sc].[stats_column_id] = 1 + AND [s].[has_filter] = 0 + AND [s].[no_recompute] = 0 + AND [ac].[is_nullable] = 1 + AND NOT EXISTS (SELECT 1 -- Compressed tables not compatible with sparse cols + FROM [sys].[partitions] AS [p] + WHERE [p].[object_id] = [i].[object_id] + AND [p].[data_compression] > 0) '; + IF @HasTempStat = 1 + BEGIN; + SET @CheckSQL = @CheckSQL + N'AND [s].[is_temporary] = 0; '; + END; + + SET @CheckSQL = @CheckSQL + N' + OPEN [DBCC_Cursor]; + + FETCH NEXT FROM [DBCC_Cursor] + INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; + + WHILE @@FETCH_STATUS = 0 + BEGIN; + DECLARE @SchemaTableName SYSNAME = QUOTENAME(@schemaName) + ''.'' + QUOTENAME(@tableName); ' + + + /* Build DBCC statistics queries */ + + N'SET @DBCCSQL = N''DBCC SHOW_STATISTICS(@SchemaTableName, @statName)''; + SET @DBCCStatSQL = @DBCCSQL + '' WITH STAT_HEADER, NO_INFOMSGS;''; + SET @DBCCHistSQL = @DBCCSQL + '' WITH HISTOGRAM, NO_INFOMSGS;''; ' + + + /* Stat Header temp table */ + + N'INSERT INTO #StatsHeaderStaging + EXEC sp_executesql @DBCCStatSQL + ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' + ,@SchemaTableName = @SchemaTableName + ,@statName = @statName; ' + + + /* Histogram temp table */ + + N'INSERT INTO #StatHistogramStaging + EXEC sp_executesql @DBCCHistSQL + ,N''@SchemaTableName SYSNAME, @statName SYSNAME'' + ,@SchemaTableName = @SchemaTableName + ,@statName = @statName; + + INSERT INTO #Stats + SELECT DB_NAME() + ,[head].[name] + ,[head].[updated] + ,[head].[rows] + ,[head].[rows_sampled] + ,@schemaName + ,@tableName + ,@colName + ,[hist].[eq_rows] + ,@threshold_null_perc + FROM #StatsHeaderStaging head + CROSS APPLY #StatHistogramStaging hist + WHERE hist.range_hi_key IS NULL + AND hist.eq_rows > 0 + AND head.unfiltered_rows > 0 + AND head.rows > 1000; + + TRUNCATE TABLE #StatsHeaderStaging; + TRUNCATE TABLE #StatHistogramStaging; + + FETCH NEXT FROM DBCC_Cursor + INTO @schemaName, @tableName, @statName, @colName, @threshold_null_perc; + END; + CLOSE [DBCC_Cursor]; + DEALLOCATE [DBCC_Cursor]; + END;'; + + DECLARE [DB_Cursor] CURSOR LOCAL FAST_FORWARD + FOR SELECT QUOTENAME([database_name]) + FROM #Databases; + + OPEN [DB_Cursor]; + + FETCH NEXT FROM [DB_Cursor] + INTO @DbName; + + /* Run stat query for each database */ + WHILE @@FETCH_STATUS = 0 + BEGIN; + SET @TempCheckSQL = REPLACE(@CheckSQL, N'?', @DbName); + EXEC sp_executesql @TempCheckSQL; + FETCH NEXT FROM [DB_Cursor] + INTO @DbName; + END; + CLOSE [DB_Cursor]; + DEALLOCATE [DB_Cursor]; + + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N'Architecture' + ,N'USER_TABLE' + ,QUOTENAME([db_name]) + ,QUOTENAME([schema_name]) + '.' + QUOTENAME([table_name]) + ,QUOTENAME([col_name]) + ,N'Candidate for converting to a space-saving sparse column based on NULL distribution of more than ' + CAST([threshold_null_perc] AS VARCHAR(3))+ ' percent.' + ,CONCAT(@BaseURL, 'sparse-columns') + FROM #Stats + WHERE [null_perc] >= [threshold_null_perc]; + END; -- Sparse column check + + /* Heap Tables */ + SET @CheckNumber = @CheckNumber + 1; + IF (@Verbose = 1) + BEGIN; + SET @Msg = CONCAT(N'Check ', @CheckNumber, ' - Heap Tables'); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + BEGIN + SET @CheckSQL = N''; + SELECT @CheckSQL = @CheckSQL + + N'USE ' + QUOTENAME([database_name]) + N'; + INSERT INTO #results ([check_num], [check_type], [obj_type], [db_name], [obj_name], [col_name], [message], [ref_link]) + SELECT @CheckNumber + ,N''Architecture'' + ,N''INDEX'' + ,QUOTENAME(DB_NAME()) + ,QUOTENAME(SCHEMA_NAME([t].[schema_id])) + ''.'' + QUOTENAME([t].[name]) + ,NULL + ,N''Heap tables can result in massive fragmentation and have additional indexing overhead.'' + ,CONCAT(@BaseURL COLLATE database_default, ''heap-tables'') + FROM [sys].[tables] AS [t] + INNER JOIN [sys].[indexes] AS [i] ON [i].[object_id] = [t].[object_id] + WHERE [i].[type] = 0' + FROM #Databases; + EXEC sp_executesql @CheckSQL, N'@CheckNumber TINYINT, @BaseURL VARCHAR(1000)', @CheckNumber = @CheckNumber, @BaseURL = @BaseURL; + END; --Heap Tables + + /* Wrap it up */ + SELECT [check_num] + ,[check_type] + ,[db_name] + ,[obj_type] + ,[obj_name] + ,[col_name] + ,[message] + ,[ref_link] + FROM #results + ORDER BY [check_num], [check_type], [db_name], [obj_type], [obj_name], [col_name], [message]; + + END TRY + + BEGIN CATCH; + BEGIN; + DECLARE @ErrorNumber INT = ERROR_NUMBER(); + DECLARE @ErrorLine INT = ERROR_LINE(); + DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE(); + DECLARE @ErrorSeverity INT = ERROR_SEVERITY(); + DECLARE @ErrorState INT = ERROR_STATE(); + + RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState) WITH NOWAIT; + SET @msg = CONCAT('Actual error number: ', @ErrorNumber); + RAISERROR(@msg, 16, 1); + SET @msg = CONCAT('Actual line number: ', @ErrorLine); + RAISERROR(@msg, 16, 1); + SET @msg = CONCAT('Check number: ', @CheckNumber); + RAISERROR(@msg, 16, 1); + END; + END CATCH; +END; +GO + +EXEC sys.sp_addextendedproperty @name=N'Description', @value=N'Recommends space saving and corrective data type measures based on SQL Server database schemas. Documentation at https://expresssql.lowlydba.com' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'Description', @value=N'Required table type for sp_sizeoptimiser.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TYPE',@level1name=N'SizeOptimiserTableType'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMajorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMinorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IndexNumThreshold', @value=N'Number of indexes to classify a table as having too many indexes on it. Default value is 10.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IncludeDatabases', @value=N'Which databases to run the script on in the form of a user defined table type. If not supplied, all accessible user databases are targeted. Cannot be used in conjunction with @ExcludeDatabases.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@ExcludeDatabases', @value=N'Which databases to exclude in the form of a user defined table type. Cannot be used in conjunction with @IncludeDatabases.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IncludeSysDatabases', @value=N'Whether or not to include system databases in the script''s analysis. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IncludeSSRSDatabases', @value=N'Whether or not to include SQL Server Reporting Services databases in the script''s analysis. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@Verbose', @value=N'Whether or not to print additional information during the script run. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IsExpress', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_sizeoptimiser'; +GO From 8a60c439777468f0e76ee6fc157a5d9b9bd21785 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:56:09 -0500 Subject: [PATCH 215/553] add other dba-multitool scripts --- Stored_Procedure/sp_doc.sql | 1432 ++++++++++++++++++++++++++++++ Stored_Procedure/sp_estindex.sql | 877 ++++++++++++++++++ Stored_Procedure/sp_helpme.sql | 477 ++++++++++ 3 files changed, 2786 insertions(+) create mode 100644 Stored_Procedure/sp_doc.sql create mode 100644 Stored_Procedure/sp_estindex.sql create mode 100644 Stored_Procedure/sp_helpme.sql diff --git a/Stored_Procedure/sp_doc.sql b/Stored_Procedure/sp_doc.sql new file mode 100644 index 00000000..51f01222 --- /dev/null +++ b/Stored_Procedure/sp_doc.sql @@ -0,0 +1,1432 @@ +SET ANSI_NULLS ON; +GO + +SET QUOTED_IDENTIFIER ON; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMinorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMinorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMajorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMajorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@ExtendedPropertyName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@ExtendedPropertyName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@DatabaseName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@DatabaseName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@LimitStoredProcLength' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@LimitStoredProcLength' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@Emojis' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@Emojis' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@Verbose' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_doc', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@Verbose' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; + END +GO + +/***************************/ +/* Create stored procedure */ +/***************************/ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_doc]') AND [type] IN (N'P', N'PC')) +BEGIN +EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_doc] AS'; +END +GO + +ALTER PROCEDURE [dbo].[sp_doc] + @DatabaseName SYSNAME = NULL + ,@ExtendedPropertyName SYSNAME = 'Description' + ,@LimitStoredProcLength BIT = 1 + ,@Emojis BIT = 0 + ,@Verbose BIT = 1 + /* Parameters defined here for testing only */ + ,@SqlMajorVersion TINYINT = 0 + ,@SqlMinorVersion SMALLINT = 0 +WITH RECOMPILE +AS + +/* +sp_doc - Always have current documentation by generating it on the fly in markdown. + +Part of the DBA MultiTool http://dba-multitool.org + +Version: 20201221 + +MIT License + +Copyright (c) 2020 John McCall + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +========= + +Example: + + EXEC sp_doc @DatabaseName = 'WideWorldImporters'; + +*/ + +BEGIN + SET NOCOUNT ON; + + DECLARE @Sql NVARCHAR(MAX) + ,@ParmDefinition NVARCHAR(500) + ,@QuotedDatabaseName SYSNAME + ,@Msg NVARCHAR(MAX) + ,@SensitivityClassification BIT + -- Variables used for Emoji mode + ,@Yes VARCHAR(20) = 'yes' + ,@No VARCHAR(20) = 'no' + ,@PK VARCHAR(20) = NULL + ,@FK VARCHAR(20) = NULL + ,@Column VARCHAR(20) = NULL; + + -- Find Version + IF (@SqlMajorVersion = 0) + BEGIN; + SET @SqlMajorVersion = CAST(SERVERPROPERTY('ProductMajorVersion') AS TINYINT); + END; + IF (@SqlMinorVersion = 0) + BEGIN; + SET @SqlMinorVersion = CAST(SERVERPROPERTY('ProductMinorVersion') AS TINYINT); + END; + + -- Validate Version + IF (@SqlMajorVersion < 11) + BEGIN; + SET @Msg = 'SQL Server versions below 2012 are not supported, sorry!'; + RAISERROR(@Msg, 16, 1); + END; + + -- Check database name + IF (@DatabaseName IS NULL) + BEGIN + SET @DatabaseName = DB_NAME(); + IF (@Verbose = 1) + BEGIN; + SET @Msg = 'No database provided, assuming current database.'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + END + ELSE IF (DB_ID(@DatabaseName) IS NULL) + BEGIN; + SET @Msg = 'Database not available.'; + RAISERROR(@Msg, 16, 1); + END; + + SET @QuotedDatabaseName = QUOTENAME(@DatabaseName); --Avoid injections + + -- Check Emoji Mode + IF (@Emojis = 1) + BEGIN; + SET @Yes = ':heavy_check_mark:'; + SET @No = ':x:'; + SET @PK = ':key: '; + SET @FK = ':old_key: '; + SET @Column = ':page_facing_up: '; + END; + + -- Check for Sensitivity Classifications + IF EXISTS (SELECT 1 FROM [sys].[system_views] WHERE [name] = 'sensitivity_classifications') + BEGIN + SET @Sql = N'USE ' + @QuotedDatabaseName + '; + IF EXISTS (SELECT 1 FROM [sys].[sensitivity_classifications]) + BEGIN + SET @SensitivityClassification = 1; + END; + ELSE + BEGIN + SET @SensitivityClassification = 0; + END;'; + SET @ParmDefinition = N'@SensitivityClassification BIT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@SensitivityClassification OUTPUT; + END; + + --Create table to hold EP data + SET @Sql = N'USE ' + @QuotedDatabaseName + '; + CREATE TABLE #markdown ( + [id] INT IDENTITY(1,1), + [value] NVARCHAR(MAX));'; + + /****************************** + Generate markdown for database + ******************************/ + --Database Name + SET @Sql = @Sql + N' + INSERT INTO #markdown (value) + VALUES (CONCAT(''# '', @DatabaseName) COLLATE DATABASE_DEFAULT);' + + + --Database extended properties + + N'INSERT INTO #markdown (value) + SELECT CONCAT(CHAR(13), CHAR(10), CAST([value] AS VARCHAR(8000))) + FROM [sys].[extended_properties] AS [ep] + WHERE [ep].[class] = 0 + AND [ep].[name] = @ExtendedPropertyName;' + + + --Database metadata + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Property | Value |'')) + ,(''| --- | --- |''); + + INSERT INTO #markdown + SELECT CONCAT(''| '', ''SQL Server Version'', '' | '', CAST(SERVERPROPERTY(''ProductVersion'') AS SYSNAME), '' |'') + UNION ALL + SELECT CONCAT(''| '', ''Compatibility Level'', '' | '', [compatibility_level], '' |'') + FROM [sys].[databases] + WHERE [name] = DB_NAME() + UNION ALL + SELECT CONCAT(''| '', ''Collation'', '' | '', [collation_name], '' |'') + FROM [sys].[databases] + WHERE [name] = DB_NAME(); + ' + + + /**************************** + Generate markdown for tables + ****************************/ + --Variables + + N'DECLARE @objectid INT, + @indexobjectid INT, + @TrigObjectId INT, + @CheckConstObjectId INT, + @DefaultConstObjectId INT; + + DECLARE @key_columns NVARCHAR(MAX), + @include_columns NVARCHAR(MAX);'; + + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[tables] WHERE [type] = ''U'' AND [is_ms_shipped] = 0) + BEGIN + INSERT INTO #markdown (value) + VALUES (''----'') + ,(CONCAT(CHAR(13), CHAR(10), ''## Tables'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown (value) + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[tables] + WHERE [type] = ''U'' + AND [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[tables] + WHERE [type] = ''U'' + AND [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid));' + + + --Extended Properties + + N'INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), CAST([ep].[value] AS NVARCHAR(4000))) + FROM [sys].[tables] AS [t] WITH(NOLOCK) + INNER JOIN [sys].[extended_properties] AS [ep] WITH(NOLOCK) ON [t].[object_id] = [ep].[major_id] + WHERE [t].[object_id] = @objectid + AND [ep].[minor_id] = 0 --On the table + AND [ep].[name] = @ExtendedPropertyName;'; + + + IF @SensitivityClassification = 1 + BEGIN + SET @Sql = @Sql + N' + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Column | Type | Null | Foreign Key | Default | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' | Classification |'')) + ,(''| --- | --- | --- | --- | --- | --- | --- |'');'; + END + ELSE + BEGIN + SET @Sql = @Sql + N' + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Column | Type | Null | Foreign Key | Default | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' |'')) + ,(''| --- | --- | --- | --- | --- | --- |'');'; + END; + + --Columns + SET @Sql = @Sql + N' + INSERT INTO #markdown + SELECT CONCAT(''| '' + ,CASE + WHEN [ic].[object_id] IS NOT NULL + THEN CONCAT(@PK, ''**'',[c].[name],''**'') + WHEN [fk].[parent_object_id] IS NOT NULL + THEN CONCAT(@FK, [c].[name]) + ELSE CONCAT(@Column, [c].[name]) + END + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([user_type_id])) + ,CASE + WHEN TYPE_NAME([user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST(precision AS varchar(5)), N'','',CAST(scale AS varchar(5)), N'')'') + WHEN TYPE_NAME([user_type_id]) IN (''varchar'', ''char'', ''varbinary'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END + WHEN TYPE_NAME([user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST(scale AS varchar(5)), ''('') + WHEN TYPE_NAME([user_type_id]) in (N''float'') + THEN CASE + WHEN [c].precision = 53 + THEN N'''' + ELSE CONCAT(N''('',CAST([c].precision AS varchar(5)),N'')'') + END + WHEN TYPE_NAME([c].user_type_id) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') + THEN N'''' + WHEN TYPE_NAME([user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length]/2 AS VARCHAR(10)), ''('') + END + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END) + ,'' | '' + ,CASE [c].[is_nullable] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,CASE + WHEN [fk].[parent_object_id] IS NOT NULL + THEN CONCAT(''['',QUOTENAME(OBJECT_SCHEMA_NAME([fk].[referenced_object_id])), ''.'', QUOTENAME(OBJECT_NAME([fk].[referenced_object_id])), ''.'', QUOTENAME(COL_NAME([fk].[referenced_object_id], [fk].[referenced_column_id])),'']'',''(#'',LOWER(OBJECT_SCHEMA_NAME([fk].[referenced_object_id])), LOWER(OBJECT_NAME([fk].[referenced_object_id])), '')'') + ELSE '''' + END + ,'' | '' + ,OBJECT_DEFINITION([dc].[object_id]) + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + ,'' |'''; + IF @SensitivityClassification = 1 + BEGIN + SET @Sql = @Sql + N' + ,CASE + WHEN [sc].[label] IS NOT NULL + THEN CONCAT('' Label: '', CAST([sc].[Label] AS SYSNAME), ''
'', ''Type: '', CAST([sc].[Information_Type] AS SYSNAME), ''
'', ''Rank: '', CAST([Rank_Desc] AS SYSNAME), ''
'') + ELSE '' '' + END + ,'' |'''; + END + SET @Sql = @Sql + N')'; + SET @Sql = @Sql + N' + FROM [sys].[tables] AS [t] WITH(NOLOCK) + INNER JOIN [sys].[columns] AS [c] WITH(NOLOCK) ON [t].[object_id] = [c].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] WITH(NOLOCK) ON [t].[object_id] = [ep].[major_id] + AND [ep].[minor_id] > 0 + AND [ep].[minor_id] = [c].[column_id] + AND [ep].[class] = 1 --Object/col + AND [ep].[name] = @ExtendedPropertyName + LEFT JOIN [sys].[foreign_key_columns] AS [fk] WITH(NOLOCK) ON [fk].[parent_object_id] = [c].[object_id] + AND [fk].[parent_column_id] = [c].[column_id] + LEFT JOIN [sys].[default_constraints] AS [dc] WITH(NOLOCK) ON [dc].[parent_object_id] = [c].[object_id] + AND [dc].[parent_column_id] = [c].[column_id] + LEFT JOIN [sys].[indexes] AS [pk] WITH(NOLOCK) ON [pk].[object_id] = [t].[object_id] + AND [pk].[is_primary_key] = 1 + LEFT JOIN [sys].[index_columns] AS [ic] WITH(NOLOCK) ON [ic].[index_id] = [pk].[index_id] + AND [ic].[object_id] = [t].[object_id] + AND [ic].[column_id] = [c].[column_id]'; + + IF @SensitivityClassification = 1 + BEGIN + SET @Sql = @Sql + N' + LEFT JOIN [sys].[sensitivity_classifications] AS [sc] WITH(NOLOCK) ON [sc].[major_id] = [t].[object_id] + AND [sc].[minor_id] = [c].[column_id]'; + END; + + SET @Sql = @Sql + N' + WHERE [t].[object_id] = @objectid;' + + + --Indexes + + N'IF EXISTS (SELECT 1 FROM [sys].[indexes] WHERE [object_id] = @objectid AND [type] > 0) + BEGIN + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''#### '', ''Indexes'') + DECLARE [index_cursor] CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [ind].[index_id] + FROM [sys].[indexes] AS [ind] + WHERE [ind].[object_id] = @objectId + AND [ind].[type] > 0 -- Not heap + ORDER BY [ind].[is_primary_key] DESC, [ind].[is_unique_constraint] DESC, [ind].[name] DESC + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Name | Type | Key Columns | Include Columns | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' |'')) + ,(''| --- | --- | --- | --- | --- |''); + + OPEN [index_cursor] + FETCH NEXT FROM [index_cursor] INTO @indexobjectid + WHILE @@FETCH_STATUS = 0 + BEGIN + ' + + + -- Get key columns as a csv list + + N'SELECT @key_columns = STUFF(( + SELECT CONCAT('', '', QUOTENAME([col].[name])) + FROM [sys].[indexes] AS [ind] + INNER JOIN [sys].[index_columns] AS [ic] ON [ind].[object_id] = [ic].[object_id] + AND [ic].[index_id] = [ind].[index_id] + INNER JOIN [sys].[columns] AS [col] ON [ic].[object_id] = [col].[object_id] + AND [ic].[column_id] = [col].[column_id] + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid + AND [ic].[is_included_column] = 0 + FOR XML PATH('''') + ), 1, 2, ''''); ' + + + -- Get included columns as a csv list + + N'SELECT @include_columns = STUFF(( + SELECT CONCAT('', '', QUOTENAME([col].[name])) + FROM [sys].[indexes] AS [ind] + INNER JOIN [sys].[index_columns] AS [ic] ON [ind].[object_id] = [ic].[object_id] + AND [ic].[index_id] = [ind].[index_id] + INNER JOIN [sys].[columns] AS [col] ON [ic].[object_id] = [col].[object_id] + AND [ic].[column_id] = [col].[column_id] + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid + AND [ic].[is_included_column] = 1 + FOR XML PATH('''') + ), 1, 2, ''''); + + INSERT INTO #markdown (value) + SELECT CONCAT(''| '' + ,CASE + WHEN [ind].[is_primary_key] = 1 + THEN CONCAT(@PK, ''**'',[ind].[name],''**'') + ELSE [ind].[name] + END + , '' | '' + , LOWER([ind].[type_desc]) COLLATE DATABASE_DEFAULT + , '' | '' + , @key_columns COLLATE DATABASE_DEFAULT + , '' | '' + , @include_columns COLLATE DATABASE_DEFAULT + , '' | '' + , CAST([ep].[value] AS NVARCHAR(4000)) COLLATE DATABASE_DEFAULT + , '' |'') + FROM [sys].[indexes] AS [ind] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [ind].[object_id] = [ep].[major_id] + AND [ep].[minor_id] = [ind].[index_id] + AND [ep].[class] = 7 -- Index + AND [ep].[name] = @ExtendedPropertyName + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid; + + FETCH NEXT FROM [index_cursor] INTO @indexobjectid; + END; + + CLOSE [index_cursor]; + DEALLOCATE [index_cursor]; + END; + ' + + + --Triggers + + N'IF EXISTS (SELECT * FROM [sys].[triggers] WHERE [parent_id] = @objectid) + BEGIN + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''#### '', ''Triggers'') + DECLARE [trig_cursor] CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[triggers] + WHERE [parent_id] = @objectId + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN [trig_cursor] + FETCH NEXT FROM [trig_cursor] INTO @TrigObjectId + WHILE @@FETCH_STATUS = 0 + BEGIN + INSERT INTO #markdown (value) + VALUES (CONCAT(''##### '', OBJECT_SCHEMA_NAME(@TrigObjectId), ''.'', OBJECT_NAME(@TrigObjectId))) + ,(CONCAT(''###### '', ''Definition'')) + ,(CONCAT(''
Click to expand'', CHAR(13), CHAR(10)));' + + + --Object definition + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@CheckConstObjectId))) + ,(''```''); + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + + FETCH NEXT FROM [trig_cursor] INTO @TrigObjectId; + END; + + CLOSE [trig_cursor]; + DEALLOCATE [trig_cursor]; + END;' + + + --Check Constraints + + N'IF EXISTS (SELECT 1 FROM [sys].[check_constraints] WHERE [parent_object_id] = @objectid) + BEGIN + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''#### '', ''Check Constraints'') + DECLARE [check_cursor] CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[check_constraints] + WHERE [parent_object_id] = @objectid + ORDER BY OBJECT_SCHEMA_NAME(object_id), [name] ASC; + + OPEN [check_cursor] + FETCH NEXT FROM [check_cursor] INTO @CheckConstObjectId + WHILE @@FETCH_STATUS = 0 + BEGIN + INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10),''##### '', OBJECT_SCHEMA_NAME(@CheckConstObjectId), ''.'', OBJECT_NAME(@CheckConstObjectId))) + ,(CONCAT(CHAR(13), CHAR(10),''###### '', ''Definition'')) + ,(CONCAT(CHAR(13), CHAR(10),''
Click to expand''));' + + + --Object definition + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@CheckConstObjectId))) + ,(''```''); + + INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + + FETCH NEXT FROM [check_cursor] INTO @CheckConstObjectId; + END; + + CLOSE [check_cursor]; + DEALLOCATE [check_cursor]; + END;' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')) + + FETCH NEXT FROM obj_cursor INTO @objectid; + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible table section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for tables + + /*************************** + Generate markdown for views + ***************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[views] WHERE [is_ms_shipped] = 0) + BEGIN; + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''## Views'')) ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown (value) + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[views] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[views] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid));' + + + --Extended Properties + + N'INSERT INTO #markdown + SELECT CAST([ep].[value] AS NVARCHAR(4000)) + FROM [sys].[views] AS [v] + INNER JOIN [sys].[extended_properties] AS [ep] ON [v].[object_id] = [ep].[major_id] + WHERE [v].[object_id] = @objectid + AND [ep].[minor_id] = 0 + AND [ep].[name] = @ExtendedPropertyName; + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Column | Type | Null | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' |'')) + ,(''| --- | ---| --- | --- |'');' + + + --Projected columns + + N'INSERT INTO #markdown + SELECT CONCAT(''| '', [c].[name] + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([user_type_id])) + ,CASE + WHEN TYPE_NAME([user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST(precision AS varchar(5)), N'','',CAST(scale AS varchar(5)), N'')'') + WHEN TYPE_NAME([user_type_id]) IN (''varchar'', ''char'', ''varbinary'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END + WHEN TYPE_NAME([user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST(scale AS varchar(5)), ''('') + WHEN TYPE_NAME([user_type_id]) in (N''float'') + THEN CASE + WHEN [c].precision = 53 + THEN N'''' + ELSE CONCAT(N''('',CAST([c].precision AS varchar(5)),N'')'') + END + WHEN TYPE_NAME([c].user_type_id) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') + THEN N'''' + WHEN TYPE_NAME([user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length]/2 AS VARCHAR(10)), ''('') + END + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END) + ,'' | '' + ,CASE [c].[is_nullable] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + ,'' |'') + FROM [sys].[views] AS [o] + INNER JOIN [sys].[columns] AS [c] ON [o].[object_id] = [c].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [o].[object_id] = [ep].[major_id] + AND [ep].[minor_id] = [c].[column_id] + AND [ep].[name] = @ExtendedPropertyName + WHERE [o].[is_ms_shipped] = 0 -- User objects only + AND [o].[type] = ''V'' -- VIEW + AND [o].[object_id] = @objectid + ORDER BY SCHEMA_NAME([o].[schema_id]), [o].[type_desc], OBJECT_NAME([ep].major_id); + + INSERT INTO #markdown (value) + VALUES(CONCAT(CHAR(13), CHAR(10), ''#### Definition'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand''));' + + + --Object definition + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@objectid))) + ,(''```'');' + + + --Indexes + + N'IF EXISTS (SELECT 1 FROM [sys].[indexes] WHERE [object_id] = @objectid) + BEGIN + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''#### '', ''Indexes'') + DECLARE [index_cursor] CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [ind].[index_id] + FROM [sys].[indexes] AS [ind] + WHERE [ind].[object_id] = @objectId + AND [ind].[type] > 0 -- Not heap + ORDER BY [ind].[is_primary_key] DESC, [ind].[is_unique_constraint] DESC, [ind].[name] DESC + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Name | Type | Key Columns | Include Columns | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' |'')) + ,(''| --- | --- | --- | --- | --- |''); + + OPEN [index_cursor] + FETCH NEXT FROM [index_cursor] INTO @indexobjectid + WHILE @@FETCH_STATUS = 0 + BEGIN + ' + + -- Get key columns as a csv list + + N'SELECT @key_columns = STUFF(( + SELECT CONCAT('', '', QUOTENAME([col].[name])) + FROM [sys].[indexes] AS [ind] + INNER JOIN [sys].[index_columns] AS [ic] ON [ind].[object_id] = [ic].[object_id] + AND [ic].[index_id] = [ind].[index_id] + INNER JOIN [sys].[columns] AS [col] ON [ic].[object_id] = [col].[object_id] + AND [ic].[column_id] = [col].[column_id] + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid + AND [ic].[is_included_column] = 0 + FOR XML PATH('''') + ), 1, 2, ''''); ' + + + -- Get included columns as a csv list + + N'SELECT @include_columns = STUFF(( + SELECT CONCAT('', '', QUOTENAME([col].[name])) + FROM [sys].[indexes] AS [ind] + INNER JOIN [sys].[index_columns] AS [ic] ON [ind].[object_id] = [ic].[object_id] + AND [ic].[index_id] = [ind].[index_id] + INNER JOIN [sys].[columns] AS [col] ON [ic].[object_id] = [col].[object_id] + AND [ic].[column_id] = [col].[column_id] + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid + AND [ic].[is_included_column] = 1 + FOR XML PATH('''') + ), 1, 2, ''''); + + INSERT INTO #markdown (value) + SELECT CONCAT(''| '' + ,CASE + WHEN [ind].[is_primary_key] = 1 + THEN CONCAT(@PK, ''**'',[ind].[name],''**'') + ELSE [ind].[name] + END + , '' | '' + , LOWER([ind].[type_desc]) COLLATE DATABASE_DEFAULT + , '' | '' + , @key_columns COLLATE DATABASE_DEFAULT + , '' | '' + , @include_columns COLLATE DATABASE_DEFAULT + , '' | '' + , CAST([ep].[value] AS NVARCHAR(4000)) COLLATE DATABASE_DEFAULT + , '' |'') + FROM [sys].[indexes] AS [ind] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [ind].[object_id] = [ep].[major_id] + AND [ep].[minor_id] = [ind].[index_id] + AND [ep].[class] = 7 -- Index + AND [ep].[name] = @ExtendedPropertyName + WHERE [ind].[object_id] = @objectid + AND [ind].[index_id] = @indexobjectid; + + FETCH NEXT FROM [index_cursor] INTO @indexobjectid; + END; + + CLOSE [index_cursor]; + DEALLOCATE [index_cursor]; + END; + ' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + ,(CONCAT(CHAR(13), CHAR(10), ''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')); + + FETCH NEXT FROM obj_cursor INTO @objectid; + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible view section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for views + + /************************************** + Generate markdown for stored procedures + **************************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[procedures] WHERE [is_ms_shipped] = 0) + BEGIN; + INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''## Stored Procedures'')) ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[procedures] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME(object_id), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[procedures] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid));' + + + --Extended properties + + N'INSERT INTO #markdown + SELECT CAST([ep].[value] AS NVARCHAR(4000)) + FROM [sys].[procedures] AS [p] + INNER JOIN [sys].[extended_properties] AS [ep] ON [p].[object_id] = [ep].[major_id] + WHERE [p].[object_id] = @objectid + AND [ep].[minor_id] = 0 + AND [ep].[name] = @ExtendedPropertyName;' + + + --Check for parameters + + N'IF EXISTS (SELECT * FROM [sys].[parameters] AS [param] WHERE [param].[object_id] = @objectid) + BEGIN + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Parameter | Type | Output | Description |'')) + ,(''| --- | --- | --- | --- |''); + + INSERT INTO #markdown + select CONCAT(''| '', CASE WHEN LEN([param].[name]) = 0 THEN ''*Output*'' ELSE [param].[name] END + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([user_type_id])) + ,CASE + WHEN TYPE_NAME([user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST(precision AS varchar(5)), N'','',CAST(scale AS varchar(5)), N'')'') + WHEN TYPE_NAME([user_type_id]) IN (''varchar'', ''char'', ''varbinary'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END + WHEN TYPE_NAME([user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST(scale AS varchar(5)), ''('') + WHEN TYPE_NAME([user_type_id]) in (N''float'') + THEN CASE + WHEN [param].precision = 53 + THEN N'''' + ELSE CONCAT(N''('',CAST([param].precision AS varchar(5)),N'')'') + END + WHEN TYPE_NAME([param].user_type_id) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') OR [is_readonly] = 1 + THEN N'''' + WHEN TYPE_NAME([user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length]/2 AS VARCHAR(10)), ''('') + END + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END) + ,'' | '' + ,CASE [is_output] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + , '' |'') + FROM [sys].[procedures] AS [proc] + INNER JOIN [sys].[parameters] AS [param] ON [param].[object_id] = [proc].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [proc].[object_id] = [ep].[major_id] + AND [ep].[name] = [param].[name] + WHERE [proc].[object_id] = @objectid + ORDER BY [param].[parameter_id] ASC; + END + + INSERT INTO #markdown (value) + VALUES(CONCAT(CHAR(13), CHAR(10), ''#### Definition'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand''));' + + + --Object definition + + N' + IF (@LimitStoredProcLength = 1 AND LEN(OBJECT_DEFINITION(@objectid)) > 8000) + BEGIN; + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), CAST(OBJECT_DEFINITION(@objectid) AS VARCHAR(8000)))) + ,(''/************************************************************************************************/'') + ,(''/* sp_doc: Max 8000 characters reached. Set @LimitStoredProcLength = 0 to show full definition. */'') + ,(''/************************************************************************************************/'') + ,(''```''); + END; + ELSE + BEGIN; + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@objectid))) + ,(''```''); + END;' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + ,(CONCAT(CHAR(13), CHAR(10), ''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')); + + FETCH NEXT FROM obj_cursor INTO @objectid + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible stored procedure section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for stored procedures + + /************************************* + Generate markdown for scalar functions + *************************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[objects] WHERE [is_ms_shipped] = 0 AND [type] = ''FN'') + BEGIN; + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''## Scalar Functions'')) ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[objects] + WHERE [is_ms_shipped] = 0 + AND [type] = ''FN'' --SQL_SCALAR_FUNCTION + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[objects] + WHERE [is_ms_shipped] = 0 + AND [type] = ''FN'' --SQL_SCALAR_FUNCTION + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid));' + + + --Extended properties + + N'INSERT INTO #markdown + SELECT CAST([ep].[value] AS NVARCHAR(4000)) + FROM [sys].[objects] AS [o] + INNER JOIN [sys].[extended_properties] AS [ep] ON [o].[object_id] = [ep].[major_id] + WHERE [o].[object_id] = @objectid + AND [ep].[minor_id] = 0 + AND [ep].[name] = @ExtendedPropertyName;' + + + --Check for parameters + + N'IF EXISTS (SELECT * FROM [sys].[parameters] AS [param] WHERE [param].[object_id] = @objectid) + BEGIN + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Parameter | Type | Output | Description |'')) + ,(''| --- | --- | --- | --- |''); + + INSERT INTO #markdown + select CONCAT(''| '', CASE WHEN LEN([param].[name]) = 0 THEN ''*Output*'' ELSE [param].[name] END + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([user_type_id])) + ,CASE + WHEN TYPE_NAME([user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST(precision AS varchar(5)), N'','',CAST(scale AS varchar(5)), N'')'') + WHEN TYPE_NAME([user_type_id]) IN (''varchar'', ''char'', ''varbinary'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END + WHEN TYPE_NAME([user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST(scale AS varchar(5)), ''('') + WHEN TYPE_NAME([user_type_id]) in (N''float'') + THEN CASE + WHEN [param].precision = 53 + THEN N'''' + ELSE CONCAT(N''('',CAST([param].precision AS varchar(5)),N'')'') + END + WHEN TYPE_NAME([param].user_type_id) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') OR [is_readonly] = 1 + THEN N'''' + WHEN TYPE_NAME([user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN CASE + WHEN [max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([max_length]/2 AS VARCHAR(10)), ''('') + END + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END) + ,'' | '' + ,CASE [is_output] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + , '' |'') + FROM [sys].[objects] AS [o] + INNER JOIN [sys].[parameters] AS [param] ON [param].[object_id] = [o].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [o].[object_id] = [ep].[major_id] + AND [ep].[name] = [param].[name] + WHERE [o].[object_id] = @objectid + ORDER BY [param].[parameter_id] ASC; + END; + + INSERT INTO #markdown (value) + VALUES(CONCAT(CHAR(13), CHAR(10), ''#### Definition'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand''));' + + + --Object definition + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@objectid))) + ,(''```'');' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + ,(CONCAT(CHAR(13), CHAR(10), ''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')); + + FETCH NEXT FROM obj_cursor INTO @objectid; + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible scalar functions section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for scalar functions + + /************************************ + Generate markdown for table functions + ************************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[objects] WHERE [is_ms_shipped] = 0 AND [type] = ''IF'') + BEGIN; + INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''## Table Functions'')) ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[objects] + WHERE [is_ms_shipped] = 0 + AND [type] = ''IF'' --SQL_INLINE_TABLE_VALUED_FUNCTION + ORDER BY OBJECT_SCHEMA_NAME(object_id), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[objects] + WHERE [is_ms_shipped] = 0 + AND [type] = ''IF'' --SQL_INLINE_TABLE_VALUED_FUNCTION + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid));' + + + --Extended properties + + N'INSERT INTO #markdown + SELECT CAST([ep].[value] AS NVARCHAR(4000)) + FROM [sys].[objects] AS [o] + INNER JOIN [sys].[extended_properties] AS [ep] ON [o].[object_id] = [ep].[major_id] + WHERE [o].[object_id] = @objectid + AND [ep].[minor_id] = 0 + AND [ep].[name] = @ExtendedPropertyName;' + + + --Check for parameters + + N'IF EXISTS (SELECT * FROM [sys].[parameters] AS [param] WHERE [param].[object_id] = @objectid) + BEGIN + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Parameter | Type | Output | Description |'')) + ,(''| --- | --- | --- | --- |''); + + INSERT INTO #markdown + select CONCAT(''| '', CASE WHEN LEN([param].[name]) = 0 THEN ''*Output*'' ELSE [param].[name] END + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([user_type_id])) + ,CASE + WHEN TYPE_NAME([user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST(precision AS varchar(5)), N'','',CAST(scale AS varchar(5)), N'')'') + WHEN TYPE_NAME([user_type_id]) IN (''varchar'', ''char'') + THEN QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + WHEN TYPE_NAME([user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST(scale AS varchar(5)), ''('') + WHEN TYPE_NAME([user_type_id]) in (N''float'') + THEN CASE + WHEN precision = 53 + THEN N'''' + ELSE QUOTENAME(CAST(precision AS varchar(5)),''('') END + WHEN TYPE_NAME([user_type_id]) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') + THEN N'''' + ELSE CASE + WHEN [is_readonly] = 1 --User defined table type + THEN N'''' + WHEN [max_length] = -1 + THEN N''(MAX)'' + WHEN TYPE_NAME([user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN QUOTENAME(CAST([max_length]/2 AS VARCHAR(10)), ''('') + ELSE QUOTENAME(CAST([max_length] AS VARCHAR(10)), ''('') + END + END) + ,'' | '' + ,CASE [is_output] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + , '' |'') + FROM [sys].[objects] AS [o] + INNER JOIN [sys].[parameters] AS [param] ON [param].[object_id] = [o].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [o].[object_id] = [ep].[major_id] + AND [ep].[name] = [param].[name] + WHERE [o].[object_id] = @objectid + ORDER BY [param].[parameter_id] ASC; + END; + + INSERT INTO #markdown (value) + VALUES(CONCAT(CHAR(13), CHAR(10), ''#### Definition'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand''));' + + + --Object definition + + N'INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''```sql'', + CHAR(13), CHAR(10), OBJECT_DEFINITION(@objectid))) + ,(''```'');' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')) + ,(CONCAT(CHAR(13), CHAR(10),''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')); + + FETCH NEXT FROM obj_cursor INTO @objectid; + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible table functions section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for table functions + + /****************************** + Generate markdown for synonyms + ******************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[synonyms] WHERE [is_ms_shipped] = 0) + BEGIN; + INSERT INTO #markdown ([value]) + VALUES (CONCAT(CHAR(13), CHAR(10), ''## Synonyms'')) ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'')); + ' + + + + N'INSERT INTO #markdown + SELECT CONCAT(''* ['', OBJECT_SCHEMA_NAME(object_id), ''.'', OBJECT_NAME(object_id), ''](#'', REPLACE(LOWER(OBJECT_SCHEMA_NAME(object_id)), '' '', ''-''), REPLACE(LOWER(OBJECT_NAME(object_id)), '' '', ''-''), '')'') + FROM [sys].[synonyms] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [object_id] + FROM [sys].[synonyms] + WHERE [is_ms_shipped] = 0 + ORDER BY OBJECT_SCHEMA_NAME([object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', OBJECT_SCHEMA_NAME(@objectid), ''.'', OBJECT_NAME(@objectid), CHAR(13), CHAR(10)); ' + + + --Extended properties + + N'INSERT INTO #markdown + SELECT CAST([ep].[value] AS NVARCHAR(4000)) + FROM [sys].[synonyms] AS [s] + INNER JOIN [sys].[extended_properties] AS [ep] ON [s].[object_id] = [ep].[major_id] + WHERE [s].[object_id] = @objectid + AND [ep].[minor_id] = 0 + AND [ep].[name] = @ExtendedPropertyName; + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Synonym | Base Object |'')) + ,(''| --- | --- |'');' + + + --Object mapping + + N'INSERT INTO #markdown + SELECT CONCAT(''| '', OBJECT_SCHEMA_NAME([syn].[object_id]), ''.'', OBJECT_NAME([syn].[object_id]) + ,'' | '' + ,CASE WHEN PARSENAME([base_object_name], 3) = DB_NAME() + THEN CONCAT(''['', PARSENAME([base_object_name], 3), ''.'', PARSENAME([base_object_name], 2), ''.'', PARSENAME([base_object_name], 1), '']'', ''(#'', PARSENAME([base_object_name], 2), ''.'', PARSENAME([base_object_name], 1), '')'') + ELSE CONCAT(PARSENAME([base_object_name], 3), PARSENAME([base_object_name], 2), PARSENAME([base_object_name], 1)) + END + ,'' |'') + FROM [sys].[synonyms] AS [syn] + WHERE [syn].[object_id] = @objectid;' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10),''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')); + + FETCH NEXT FROM obj_cursor INTO @objectid + + END + CLOSE obj_cursor + DEALLOCATE obj_cursor;' + + + --End collapsible synonyms section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for synonyms + + /*********************************************** + Generate markdown for user defined table types + ***********************************************/ + --Build table of contents + SET @Sql = @Sql + N' + IF EXISTS (SELECT 1 FROM [sys].[table_types] WHERE [is_user_defined] = 1) + BEGIN + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''## User Defined Table Types'')) + ,(CONCAT(CHAR(13), CHAR(10), ''
Click to expand'', CHAR(13), CHAR(10))); + ' + + + + N'INSERT INTO #markdown (value) + SELECT CONCAT(''* ['', SCHEMA_NAME([schema_id]), ''.'', [name], ''](#'', REPLACE(LOWER(SCHEMA_NAME([schema_id])), '' '', ''-''), REPLACE(LOWER([name]), '' '', ''-''), '')'') + FROM [sys].[table_types] + WHERE [is_user_defined] = 1 + ORDER BY OBJECT_SCHEMA_NAME([type_table_object_id]), [name] ASC;' + + + --Object details + + N'DECLARE obj_cursor CURSOR + LOCAL STATIC READ_ONLY FORWARD_ONLY + FOR + SELECT [type_table_object_id] + FROM [sys].[table_types] + WHERE [is_user_defined] = 1 + ORDER BY OBJECT_SCHEMA_NAME([type_table_object_id]), [name] ASC; + + OPEN obj_cursor + FETCH NEXT FROM obj_cursor INTO @objectid + WHILE @@FETCH_STATUS = 0 + BEGIN + + INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), ''### '', SCHEMA_NAME([schema_id]), ''.'', [name]) + FROM [sys].[table_types] + WHERE [type_table_object_id] = @objectid + AND [is_user_defined] = 1;' + + + --Extended Properties + + N'INSERT INTO #markdown + SELECT CONCAT(CHAR(13), CHAR(10), CAST([ep].[value] AS NVARCHAR(4000))) + FROM [sys].[table_types] AS [tt] + INNER JOIN [sys].[extended_properties] AS [ep] ON [tt].[type_table_object_id] = [ep].[major_id] + WHERE [tt].[type_table_object_id] = @objectid + AND [ep].[minor_id] = 0 --On the table + AND [ep].[name] = @ExtendedPropertyName + AND [tt].[is_user_defined] = 1; + + INSERT INTO #markdown (value) + VALUES (CONCAT(CHAR(13), CHAR(10), ''| Column | Type | Null | Default | '', @ExtendedPropertyName COLLATE DATABASE_DEFAULT, '' |'')) + ,(''| --- | ---| --- | --- | --- |'');' + + + --Columns + + N'INSERT INTO #markdown + SELECT CONCAT(''| '' + ,CASE + WHEN [ic].[object_id] IS NOT NULL + THEN ISNULL(CONCAT(''**'',[c].[name],''**''), ''N/A'') + ELSE ISNULL([c].[name], ''N/A'') + END + ,'' | '' + ,CONCAT(UPPER(TYPE_NAME([c].[user_type_id])) + ,CASE + WHEN TYPE_NAME([c].[user_type_id]) IN (N''decimal'',N''numeric'') + THEN CONCAT(N''('',CAST([c].[precision] AS VARCHAR(5)), N'','',CAST([c].[scale] AS varchar(5)), N'')'') + WHEN TYPE_NAME([c].[user_type_id]) IN (''varchar'', ''char'', ''varbinary'') + THEN CASE + WHEN [c].[max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([c].[max_length] AS VARCHAR(10)), ''('') + END + WHEN TYPE_NAME([c].[user_type_id]) IN (N''time'',N''datetime2'',N''datetimeoffset'') + THEN QUOTENAME(CAST([c].[scale] AS VARCHAR(5)), ''('') + WHEN TYPE_NAME([c].[user_type_id]) in (N''float'') + THEN CASE + WHEN [c].precision = 53 + THEN N'''' + ELSE CONCAT(N''('',CAST([c].[precision] AS VARCHAR(5)),N'')'') + END + WHEN TYPE_NAME([c].[user_type_id]) IN (N''int'',N''bigint'',N''smallint'',N''tinyint'',N''money'',N''smallmoney'', + N''real'',N''datetime'',N''smalldatetime'',N''bit'',N''image'',N''text'',N''uniqueidentifier'', + N''date'',N''ntext'',N''sql_variant'',N''hierarchyid'',''geography'',N''timestamp'',N''xml'') + THEN N'''' + WHEN TYPE_NAME([c].[user_type_id]) IN (N''nvarchar'',N''nchar'', N''sysname'') + THEN CASE + WHEN [c].[max_length] = -1 + THEN N''(MAX)'' + ELSE QUOTENAME(CAST([c].[max_length]/2 AS VARCHAR(10)), ''('') + END + ELSE QUOTENAME(CAST([c].[max_length] AS VARCHAR(10)), ''('') + END) + ,'' | '' + ,CASE [c].[is_nullable] + WHEN 1 + THEN @Yes + ELSE @No + END + ,'' | '' + ,OBJECT_DEFINITION([dc].[object_id]) + ,'' | '' + ,CAST([ep].[value] AS NVARCHAR(4000)) + ,'' |'') + FROM [sys].[table_types] AS [tt] + INNER JOIN [sys].[columns] AS [c] ON [tt].[type_table_object_id] = [c].[object_id] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [tt].[type_table_object_id] = [ep].[major_id] + AND [ep].[minor_id] > 0 + AND [ep].[minor_id] = [c].[column_id] + AND [ep].[class] = 1 --Object/col + -- AND [ep].[name] = @ExtendedPropertyName + LEFT JOIN [sys].[foreign_key_columns] AS [fk] ON [fk].[parent_object_id] = [c].[object_id] + AND [fk].[parent_column_id] = [c].[column_id] + LEFT JOIN [sys].[default_constraints] [dc] ON [dc].[parent_object_id] = [c].[object_id] + AND [dc].[parent_column_id] = [c].[column_id] + LEFT JOIN [sys].[indexes] AS [pk] ON [pk].[object_id] = [tt].[type_table_object_id] + AND [pk].[is_primary_key] = 1 + LEFT JOIN [sys].[index_columns] AS [ic] ON [ic].[index_id] = [pk].[index_id] + AND [ic].[object_id] = [tt].[type_table_object_id] + AND [ic].[column_id] = [c].[column_id] + WHERE [tt].[type_table_object_id] = @objectid + AND [tt].[is_user_defined] = 1;' + + + --Back to top + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''[Back to top](#'', LOWER(@DatabaseName COLLATE DATABASE_DEFAULT), '')'')) + + FETCH NEXT FROM obj_cursor INTO @objectid; + + END; + CLOSE obj_cursor; + DEALLOCATE obj_cursor;' + + + --End collapsible table section + + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''
'')); + END;'; --End markdown for user defined table types + + --Attribution + SET @Sql = @Sql + N'INSERT INTO #markdown + VALUES (CONCAT(CHAR(13), CHAR(10), ''----'')) + ,(CONCAT(CHAR(13), CHAR(10), ''*Markdown generated by [sp_doc](http://dba-multitool.org)'')) + ,(CONCAT('' at '', SYSDATETIMEOFFSET(), ''.*''));'; + + --Return all data + SET @Sql = @Sql + N' + SELECT [value] + FROM #markdown + ORDER BY [ID] ASC;'; + + SET @ParmDefinition = N'@ExtendedPropertyName SYSNAME, @DatabaseName SYSNAME, @LimitStoredProcLength BIT, @Yes VARCHAR(20), @No VARCHAR(20), @PK VARCHAR(20), @FK VARCHAR(20), @Column VARCHAR(20)'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@ExtendedPropertyName + ,@DatabaseName + ,@LimitStoredProcLength + ,@Yes + ,@No + ,@PK + ,@FK + ,@Column; +END; +GO + +EXEC sys.sp_addextendedproperty @name=N'Description', @value=N'Generate on the fly database documentation in markdown. Documentation at https://expresssql.lowlydba.com' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@DatabaseName', @value=N'Target database to document. Default is the stored procedure''s database.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@ExtendedPropertyName', @value=N'Key for extended properties on objects. Default is ''Description''.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMajorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMinorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@LimitStoredProcLength', @value=N'Limit stored procedure contents to 8000 characters, to avoid memory issues with some IDEs. Default is 1.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@Emojis', @value=N'Use emojis when generating documentation. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@Verbose', @value=N'Whether or not to print additional information during the script run. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_doc'; +GO + diff --git a/Stored_Procedure/sp_estindex.sql b/Stored_Procedure/sp_estindex.sql new file mode 100644 index 00000000..7a35fddb --- /dev/null +++ b/Stored_Procedure/sp_estindex.sql @@ -0,0 +1,877 @@ +SET ANSI_NULLS ON; +GO + +SET QUOTED_IDENTIFIER ON; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@TableName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@TableName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMajorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMajorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SchemaName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SchemaName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IsUnique' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IsUnique' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IndexColumns' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IndexColumns' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@IncludeColumns' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@IncludeColumns' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@Filter' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@Filter' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@FillFactor' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@FillFactor' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@DatabaseName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@DatabaseName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@Verbose' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_estindex', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@Verbose' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; + END; +GO + +/***************************/ +/* Create stored procedure */ +/***************************/ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_estindex]') AND [type] IN (N'P', N'PC')) + BEGIN; + EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_estindex] AS'; + END +GO + +ALTER PROCEDURE [dbo].[sp_estindex] + @SchemaName SYSNAME = NULL + ,@TableName SYSNAME + ,@DatabaseName SYSNAME = NULL + ,@IndexColumns NVARCHAR(2048) + ,@IncludeColumns NVARCHAR(2048) = NULL + ,@IsUnique BIT = 0 + ,@Filter NVARCHAR(2048) = '' + ,@FillFactor TINYINT = 100 + ,@Verbose BIT = 0 + -- Unit testing only + ,@SqlMajorVersion TINYINT = 0 +AS +BEGIN + +SET NOCOUNT ON; + +/* +sp_estindex - Estimate a new index's size and statistics. + +Part of the DBA MultiTool http://dba-multitool.org + +Version: 2020121 + +MIT License + +Copyright (c) 2020 John McCall + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +-- TODO: + -- Handle clustered indexes - https://docs.microsoft.com/en-us/sql/relational-databases/databases/estimate-the-size-of-a-clustered-index?view=sql-server-ver15 + +========= + +Example: + + EXEC dbo.sp_estindex @SchemaName = 'dbo', @tableName = 'Marathon', @IndexColumns = 'racer_id, finish_time, is_disqualified'; + + EXEC dbo.sp_estindex @tableName = 'Marathon', @IndexColumns = 'racer_id, finish_time, is_disqualified', @Filter = 'WHERE racer_id IS NOT NULL', @FillFactor = 90; + +*/ + +DECLARE @Sql NVARCHAR(MAX) = N'' + ,@QualifiedTable NVARCHAR(257) + ,@IndexName SYSNAME = CONCAT('sp_estindex_hypothetical_idx_', DATEDIFF(SECOND,'1970-01-01 00:08:46', GETUTCDATE())) + ,@DropIndexSql NVARCHAR(MAX) + ,@Msg NVARCHAR(MAX) = N'' + ,@IndexType SYSNAME = 'NONCLUSTERED' + ,@IsHeap BIT + ,@IsClusterUnique BIT + ,@ObjectID INT + ,@IndexID INT + ,@ParmDefinition NVARCHAR(MAX) = N'' + ,@NumRows BIGINT + ,@UseDatabase NVARCHAR(200) + ,@UniqueSql VARCHAR(10) + ,@IncludeSql VARCHAR(2048) + ,@PageSize BIGINT = 8192 + ,@FreeBytesPerPage BIGINT = 8096; + +BEGIN TRY + -- Find Version + IF (@SqlMajorVersion = 0) + BEGIN; + SET @SqlMajorVersion = CAST(SERVERPROPERTY('ProductMajorVersion') AS TINYINT); + END; + + /* Validate Version */ + IF (@SqlMajorVersion < 11) + BEGIN; + SET @Msg = 'SQL Server versions below 2012 are not supported, sorry!'; + RAISERROR(@Msg, 16, 1); + END; + + /* Validate Fill Factor */ + IF (@FillFactor > 100 OR @FillFactor < 1) + BEGIN; + SET @Msg = 'Fill factor must be between 1 and 100.'; + THROW 51000, @Msg, 1; + END; + + /* Validate Database */ + IF (@DatabaseName IS NULL) + BEGIN; + SET @DatabaseName = DB_NAME(); + IF (@Verbose = 1) + BEGIN; + SET @Msg = 'No database provided, assuming current database.'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + END; + ELSE IF (DB_ID(@DatabaseName) IS NULL) + BEGIN; + SET @DatabaseName = DB_NAME(); + SET @Msg = 'Database does not exist.'; + RAISERROR(@Msg, 16, 1); + END; + + /* Validate Schema */ + IF (@SchemaName IS NULL) + BEGIN; + SET @SchemaName = 'dbo'; + IF (@Verbose = 1) + BEGIN; + SET @Msg = 'No schema provided, assuming dbo.'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + END; + + -- Set variables with validated params + SET @QualifiedTable = CONCAT(QUOTENAME(@SchemaName), '.', QUOTENAME(@TableName)); + SET @UseDatabase = N'USE ' + QUOTENAME(@DatabaseName) + '; '; + IF (@IsUnique = 1) + BEGIN; + SET @UniqueSql = ' UNIQUE '; + END; + IF (@IncludeColumns IS NOT NULL) + BEGIN; + SET @IncludeSql = CONCAT(' INCLUDE(', @IncludeColumns, ') '); + END; + + -- Find object id + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @ObjectID = [object_id] + FROM [sys].[all_objects] + WHERE [object_id] = OBJECT_ID(@QualifiedTable)'); + SET @ParmDefinition = N'@QualifiedTable NVARCHAR(257) + ,@ObjectID INT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@QualifiedTable + ,@ObjectID OUTPUT; + + -- Determine Heap or Clustered + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @IsHeap = CASE [type] WHEN 0 THEN 1 ELSE 0 END + ,@IsClusterUnique = [is_unique] + FROM [sys].[indexes] + WHERE [object_id] = OBJECT_ID(@QualifiedTable) + AND [type] IN (1, 0)'); + SET @ParmDefinition = N'@QualifiedTable NVARCHAR(257), @IsHeap BIT OUTPUT, @IsClusterUnique BIT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@QualifiedTable + ,@IsHeap OUTPUT + ,@IsClusterUnique OUTPUT; + + -- Safety check for leftover index from previous run + SET @DropIndexSql = CONCAT(@UseDatabase, + N'IF EXISTS (SELECT 1 FROM [sys].[indexes] WHERE [object_id] = OBJECT_ID(''',@QualifiedTable,''') AND [name] = ''',@IndexName,''') + DROP INDEX ', QUOTENAME(@IndexName), ' ON ', @QualifiedTable); + EXEC sp_executesql @DropIndexSql; + + -- Fetch missing index stats before creation + IF OBJECT_ID('tempdb..##TempMissingIndex') IS NOT NULL + BEGIN; + DROP TABLE ##TempMissingIndex; + END; + + SET @Sql = CONCAT(@UseDatabase, + N'SELECT [id].[statement] + ,[id].[equality_columns] + ,[id].[inequality_columns] + ,[id].[included_columns] + ,[gs].[unique_compiles] + ,[gs].[user_seeks] + ,[gs].[user_scans] + ,[gs].[avg_total_user_cost] -- Average cost of the user queries that could be reduced + ,[gs].[avg_user_impact] -- % + INTO ##TempMissingIndex + FROM [sys].[dm_db_missing_index_group_stats] [gs] + INNER JOIN [sys].[dm_db_missing_index_groups] [ig] ON [gs].[group_handle] = [ig].[index_group_handle] + INNER JOIN [sys].[dm_db_missing_index_details] [id] ON [ig].[index_handle] = [id].[index_handle] + WHERE [id].[database_id] = DB_ID() + AND [id].[object_id] = @ObjectID + OPTION (RECOMPILE);'); + SET @ParmDefinition = N'@ObjectID INT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@ObjectID; + + -- Create the hypothetical index + SET @Sql = CONCAT(@UseDatabase, 'CREATE ', @UniqueSql, @IndexType, ' INDEX ', QUOTENAME(@IndexName), ' ON ', @QualifiedTable, ' (', @IndexColumns, ') ',@IncludeSql, @Filter, ' WITH (STATISTICS_ONLY = -1)'); + EXEC sp_executesql @Sql; + + /*******************/ + /* Get index stats */ + /*******************/ + -- Use DBCC to avoid various inconsistencies + -- in equivalent DMVs between 2012-2016 + SET @Sql = CONCAT(@UseDatabase, 'DBCC SHOW_STATISTICS ("', @QualifiedTable,'", ', QUOTENAME(@IndexName), ')'); + EXEC sp_executesql @Sql; + + /***************************/ + /* Get missing index stats */ + /***************************/ + DECLARE @QuotedKeyColumns NVARCHAR(2048) + ,@QuotedInclColumns NVARCHAR(2048); + + --Get index columns in same format as dmv table + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @QuotedKeyColumns = CASE WHEN [ic].[is_included_column] = 0 + THEN CONCAT(COALESCE(@QuotedKeyColumns COLLATE DATABASE_DEFAULT + '', '', ''''), QUOTENAME([ac].[name])) + ELSE @QuotedKeyColumns + END, + @QuotedInclColumns = CASE WHEN [ic].[is_included_column] = 1 + THEN CONCAT(COALESCE(@QuotedInclColumns COLLATE DATABASE_DEFAULT + '', '', ''''), QUOTENAME([ac].[name])) + ELSE @QuotedInclColumns + END + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[index_columns] AS [ic] ON [i].[index_id] = [ic].[index_id] + AND [ic].object_id = [i].object_id + INNER JOIN [sys].[all_columns] AS [ac] ON [ac].[object_id] = [ic].[object_id] + AND [ac].[column_id] = [ic].[column_id] + WHERE [i].[name] = @IndexName + AND [i].[object_id] = @ObjectID + AND [i].[is_hypothetical] = 1;'); + SET @ParmDefinition = N'@IndexName SYSNAME, @ObjectID INT, @QuotedKeyColumns NVARCHAR(2048) OUTPUT, @QuotedInclColumns NVARCHAR(2048) OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@IndexName + ,@ObjectID + ,@QuotedKeyColumns OUTPUT + ,@QuotedInclColumns OUTPUT; + + -- Search missing index dmv for a match + SELECT 'Missing index stats' AS [description] + ,[statement] + ,[equality_columns] + ,[inequality_columns] + ,[included_columns] + ,[unique_compiles] + ,[user_seeks] + ,[user_scans] + ,[avg_total_user_cost] + ,[avg_user_impact] + FROM ##TempMissingIndex + WHERE COALESCE([equality_columns] + ', ', '') + [inequality_columns] = @QuotedKeyColumns + AND ([included_columns] = @QuotedInclColumns OR [included_columns] IS NULL); + + IF (SELECT COUNT(*) FROM ##TempMissingIndex) = 0 AND (@Verbose = 1) + BEGIN; + SET @Msg = 'No matching missing index statistics found.'; + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + DROP TABLE ##TempMissingIndex; + + /************************************************/ + /* Estimate index size - does NOT consider: */ + /* Partitioning, allocation pages, LOB values, */ + /* compression, or sparse columns */ + /************************************************/ + IF (@IndexType = 'NONCLUSTERED') -- http://dba-multitool.org/est-nonclustered-index-size + BEGIN; + DECLARE @NumVariableKeyCols INT = 0 + ,@MaxVarKeySize BIGINT = 0 + ,@NumFixedKeyCols INT = 0 + ,@FixedKeySize BIGINT = 0 + ,@NumKeyCols INT = 0 + ,@NullCols INT = 0 + ,@IndexNullBitmap BIGINT = 0 + ,@VariableKeySize BIGINT = 0 + ,@TotalFixedKeySize BIGINT = 0 + ,@IndexRowSize BIGINT = 0 + ,@IndexRowsPerPage BIGINT = 0 + ,@ClusterNumVarKeyCols INT = 0 + ,@MaxClusterVarKeySize BIGINT = 0 + ,@ClusterNumFixedKeyCols INT = 0 + ,@MaxClusterFixedKeySize BIGINT = 0 + ,@ClusterNullCols INT = 0; + + /**************************/ + /* 1. Calculate variables */ + /**************************/ + -- Row count + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @NumRows = [sp].[rows] -- Accounts for index filter if in use + FROM [sys].[objects] AS [o] + INNER JOIN [sys].[stats] AS [stat] ON [stat].[object_id] = [o].[object_id] + CROSS APPLY [sys].[dm_db_stats_properties]([stat].[object_id], [stat].[stats_id]) AS [sp] + WHERE [o].[object_id] = @ObjectID + AND [stat].[name] = @IndexName;'); + SET @ParmDefinition = N'@ObjectID INT, @IndexName SYSNAME, @NumRows BIGINT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@ObjectID + ,@IndexName + ,@NumRows OUTPUT; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('NumRows: ', @NumRows); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + --Key types and sizes + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @NumVariableKeyCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @MaxVarKeySize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN CASE [ac].[max_length] + WHEN -1 + THEN(4000 + 2) -- use same estimation as the query engine for max lenths + ELSE COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + END + ELSE 0 + END), 0), + @NumFixedKeyCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @FixedKeySize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + ELSE 0 + END), 0), + @NullCols = ISNULL(SUM(CAST([ac].[is_nullable] AS TINYINT)),0) + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[index_columns] AS [ic] ON [i].[index_id] = [ic].[index_id] + AND [ic].object_id = [i].object_id + INNER JOIN [sys].[all_columns] AS [ac] ON [ac].object_id = [ic].object_id + AND [ac].[column_id] = [ic].[column_id] + WHERE [i].[name] = @IndexName + AND [i].[object_id] = @ObjectID + AND [i].[is_hypothetical] = 1 + AND [ic].[is_included_column] = 0'); + SET @ParmDefinition = N'@IndexName SYSNAME, @ObjectID INT, @NumVariableKeyCols INT OUTPUT, + @MaxVarKeySize BIGINT OUTPUT, @NumFixedKeyCols INT OUTPUT, @FixedKeySize BIGINT OUTPUT, + @NullCols INT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@IndexName + ,@ObjectID + ,@NumVariableKeyCols OUTPUT + ,@MaxVarKeySize OUTPUT + ,@NumFixedKeyCols OUTPUT + ,@FixedKeySize OUTPUT + ,@NullCols OUTPUT; + + SET @NumKeyCols = @NumVariableKeyCols + @NumFixedKeyCols; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('NumVariableKeyCols: ', @NumVariableKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('MaxVarKeySize: ', @MaxVarKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NumFixedKeyCols: ', @NumFixedKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('FixedKeySize: ', @FixedKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NullCols: ', @NullCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NumKeyCols: ', @NumKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Account for data row locator for non-unique + IF (@IsHeap = 1 AND @IsUnique = 0) + BEGIN; + SET @NumKeyCols = @NumKeyCols + 1; + SET @NumVariableKeyCols = @NumVariableKeyCols + 1; + SET @MaxVarKeySize = @MaxVarKeySize + 8; --heap RID + END; + ELSE IF (@IsHeap = 0 AND @IsUnique = 0) + BEGIN; + --Clustered keys and sizes not included in the new index + SET @Sql = CONCAT(@UseDatabase, + N'WITH NewIndexCol AS ( + SELECT [ac].[name] + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[index_columns] AS [ic] ON [i].[index_id] = [ic].[index_id] + AND [ic].object_id = [i].object_id + INNER JOIN [sys].[all_columns] AS [ac] ON [ac].object_id = [ic].object_id + AND [ac].[column_id] = [ic].[column_id] + WHERE [i].[name] = @IndexName + AND [i].[object_id] = @ObjectID + AND [i].[is_hypothetical] = 1 + AND [ic].[is_included_column] = 0 + ) + SELECT @ClusterNumVarKeyCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @MaxClusterVarKeySize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN CASE [ac].[max_length] + WHEN -1 + THEN(4000 + 2) -- use same estimation as the query engine for max lenths + ELSE COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + END + ELSE 0 + END), 0), + @ClusterNumFixedKeyCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @MaxClusterFixedKeySize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + ELSE 0 + END), 0), + @ClusterNullCols = ISNULL(SUM(CAST([ac].[is_nullable] AS TINYINT)),0) + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[index_columns] AS [ic] ON [i].[index_id] = [ic].[index_id] + AND [ic].object_id = [i].object_id + INNER JOIN [sys].[all_columns] AS [ac] ON [ac].object_id = [ic].object_id + AND [ac].[column_id] = [ic].[column_id] + WHERE [i].[type] = 1 --Clustered + AND [i].[object_id] = @ObjectID + AND [ac].[name] NOT IN (SELECT [name] FROM [NewIndexCol]);'); + SET @ParmDefinition = N'@IndexName SYSNAME, @ObjectID INT, @ClusterNumVarKeyCols INT OUTPUT, + @MaxClusterVarKeySize BIGINT OUTPUT, @ClusterNumFixedKeyCols INT OUTPUT, + @MaxClusterFixedKeySize BIGINT OUTPUT, @ClusterNullCols INT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@IndexName + ,@ObjectID + ,@ClusterNumVarKeyCols OUTPUT + ,@MaxClusterVarKeySize OUTPUT + ,@ClusterNumFixedKeyCols OUTPUT + ,@MaxClusterFixedKeySize OUTPUT + ,@ClusterNullCols OUTPUT; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('ClusterNumVarKeyCols: ', @ClusterNumVarKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('ClusterNumFixedKeyCols: ', @ClusterNumFixedKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('MaxClusterVarKeySize: ', @MaxClusterVarKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('MaxClusterFixedKeySize: ', @MaxClusterFixedKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('ClusterNullCols: ', @ClusterNullCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Add counts from clustered index cols + SET @NumKeyCols = @NumKeyCols + (@ClusterNumVarKeyCols + @ClusterNumFixedKeyCols); + SET @FixedKeySize = @FixedKeySize + @MaxClusterFixedKeySize; + SET @NumVariableKeyCols = @NumVariableKeyCols + @ClusterNumVarKeyCols; + SET @MaxVarKeySize = @MaxVarKeySize + @MaxClusterVarKeySize; + SET @NullCols = @NullCols + @ClusterNullCols; + + IF (@IsClusterUnique = 0) + BEGIN; + SET @MaxVarKeySize = @MaxVarKeySize + 4; + SET @NumVariableKeyCols = @NumVariableKeyCols + 1; + SET @NumKeyCols = @NumKeyCols + 1; + END; + END; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('FixedKeySize: ', @FixedKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NumVariableKeyCols: ', @NumVariableKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NumKeyCols: ', @NumKeyCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('MaxVarKeySize: ', @MaxVarKeySize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NullCols: ', @NullCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Account for index null bitmap + IF (@NullCols > 0) + BEGIN; + SET @IndexNullBitmap = 2 + ((@NullCols + 7) / 8); + END; + + -- Calculate variable length data size + -- Assumes each col is 100% full + IF (@NumVariableKeyCols > 0) + BEGIN; + SET @VariableKeySize = 2 + (@NumVariableKeyCols * 2) + @MaxVarKeySize; --The bytes added to @MaxVarKeySize are for tracking each variable column. + END; + + -- Calculate index row size + SET @IndexRowSize = @FixedKeySize + @VariableKeySize + @IndexNullBitmap + 1 + 6; -- + 1 (for row header overhead of an index row) + 6 (for the child page ID pointer) + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('IndexRowSize: ', @IndexRowSize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + --Calculate number of index rows / page + SET @IndexRowsPerPage = FLOOR(@FreeBytesPerPage / (@IndexRowSize + 2)); -- + 2 for the row's entry in the page's slot array. + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('IndexRowsPerPage: ', @IndexRowsPerPage); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + /****************************************************************************/ + /* 2. Calculate the Space Used to Store Index Information in the Leaf Level */ + /****************************************************************************/ + -- Specify the number of fixed-length and variable-length columns at the leaf level + -- and calculate the space that is required for their storage + DECLARE @NumLeafCols INT = @NumKeyCols + ,@FixedLeafSize BIGINT = @FixedKeySize + ,@NumVariableLeafCols INT = @NumVariableKeyCols + ,@MaxVarLeafSize BIGINT = @MaxVarKeySize + ,@LeafNullBitmap BIGINT = 0 + ,@VariableLeafSize BIGINT = 0 + ,@LeafRowSize BIGINT = 0 + ,@LeafRowsPerPage BIGINT = 0 + ,@FreeRowsPerPage BIGINT = 0 + ,@NumLeafPages BIGINT = 0 + ,@LeafSpaceUsed BIGINT = 0; + + IF (@IncludeColumns IS NOT NULL) + BEGIN; + DECLARE @NumVariableInclCols INT = 0 + ,@MaxVarInclSize BIGINT = 0 + ,@NumFixedInclCols INT = 0 + ,@FixedInclSize BIGINT = 0; + + --Incl types and sizes + SET @Sql = CONCAT(@UseDatabase, + N'SELECT @NumVariableInclCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @MaxVarInclSize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN CASE [ac].[max_length] + WHEN -1 + THEN (4000 + 2) -- use same estimation as the query engine for max lenths + ELSE COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + END + ELSE 0 + END), 0), + @NumFixedInclCols = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN 1 + ELSE 0 + END), 0), + @FixedInclSize = ISNULL(SUM(CASE + WHEN TYPE_NAME([ac].[user_type_id]) NOT IN(''varchar'', ''nvarchar'', ''text'', ''ntext'', ''image'', ''varbinary'', ''xml'') + THEN COL_LENGTH(OBJECT_NAME([i].object_id), [ac].[name]) + ELSE 0 + END), 0) + FROM [sys].[indexes] AS [i] + INNER JOIN [sys].[index_columns] AS [ic] ON [i].[index_id] = [ic].[index_id] + AND [ic].object_id = [i].object_id + INNER JOIN [sys].[all_columns] AS [ac] ON [ac].object_id = [ic].object_id + AND [ac].[column_id] = [ic].[column_id] + WHERE [i].[name] = @IndexName + AND [i].[object_id] = @ObjectID + AND [i].[is_hypothetical] = 1 + AND [ic].[is_included_column] = 1;'); + SET @ParmDefinition = N'@IndexName SYSNAME, @ObjectID INT, @NumVariableInclCols INT OUTPUT, + @MaxVarInclSize BIGINT OUTPUT, @NumFixedInclCols INT OUTPUT, @FixedInclSize BIGINT OUTPUT'; + EXEC sp_executesql @Sql + ,@ParmDefinition + ,@IndexName + ,@ObjectID + ,@NumVariableInclCols OUTPUT + ,@MaxVarInclSize OUTPUT + ,@NumFixedInclCols OUTPUT + ,@FixedInclSize OUTPUT; + + -- Add included columns to rolling totals + SET @NumLeafCols = @NumLeafCols + (@NumVariableInclCols + @NumFixedInclCols); + SET @FixedLeafSize = @FixedLeafSize + @FixedInclSize; + SET @NumVariableLeafCols = @NumVariableLeafCols + @NumVariableInclCols; + SET @MaxVarLeafSize = @MaxVarLeafSize + @MaxVarInclSize; + END; + + -- Account for data row locator for unique indexes + -- If non-unique, already accounted for above + IF (@IsUnique = 1) + BEGIN; + IF (@IsHeap = 1) + BEGIN; + SET @NumLeafCols = @NumLeafCols + 1; + SET @NumVariableLeafCols = @NumVariableLeafCols + 1; + SET @MaxVarLeafSize = @MaxVarLeafSize + 8; -- the data row locator is the heap RID (size 8 bytes). + END; + ELSE -- Clustered + BEGIN; + SET @NumLeafCols = @NumLeafCols + (@ClusterNumVarKeyCols + @ClusterNumFixedKeyCols); + SET @FixedLeafSize = @FixedLeafSize + @ClusterNumFixedKeyCols; + SET @NumVariableLeafCols = @NumVariableLeafCols + @ClusterNumVarKeyCols; + SET @MaxVarLeafSize = @MaxVarLeafSize + @MaxClusterVarKeySize; + + IF (@IsClusterUnique = 0) + BEGIN; + SET @NumLeafCols = @NumLeafCols + 1; + SET @NumVariableLeafCols = @NumVariableLeafCols + 1; + SET @MaxVarLeafSize = @MaxVarLeafSize + 4; + END; + END; + END; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('NumLeafCols: ', @NumLeafCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('FixedLeafSize: ', @FixedLeafSize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('NumVariableLeafCols: ', @NumVariableLeafCols); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + SET @Msg = CONCAT('MaxVarLeafSize: ', @MaxVarLeafSize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Account for index null bitmap + SET @LeafNullBitmap = 2 + ((@NumLeafCols + 7) / 8); + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('LeafNullBitmap: ', @LeafNullBitmap); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate variable length data size + -- Assumes each col is 100% full + IF (@NumVariableLeafCols > 0) + BEGIN; + SET @VariableLeafSize = 2 + (@NumVariableLeafCols * 2) + @MaxVarLeafSize; + END; + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('VariableLeafSize: ', @VariableLeafSize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate index row size + SET @LeafRowSize = @FixedLeafSize + @VariableLeafSize + @LeafNullBitmap + 1; -- +1 for row header overhead of an index row) + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('LeafRowSize: ', @LeafRowSize); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate number of index rows / page + SET @LeafRowsPerPage = FLOOR(@FreeBytesPerPage / (@LeafRowSize + 2)); -- + 2 for the row's entry in the page's slot array. + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('LeafRowsPerPage: ', @LeafRowsPerPage); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate free rows / page + SET @FreeRowsPerPage = @FreeBytesPerPage * (( 100 - @FillFactor) / 100) / (@LeafRowSize + 2); -- + 2 for the row's entry in the page's slot array. + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('FreeRowsPerPage: ', @FreeRowsPerPage); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate pages for all rows + SET @NumLeafPages = CEILING(@NumRows / (@LeafRowsPerPage - @FreeRowsPerPage)); + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('NumLeafPages: ', @NumLeafPages); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + -- Calculate size of index at leaf level + SET @LeafSpaceUsed = @PageSize * @NumLeafPages; + + /*********************************************************************************/ + /* 3. Calculate the Space Used to Store Index Information in the Non-leaf Levels */ + /*********************************************************************************/ + DECLARE @NonLeafLevels BIGINT = 0, + @NumIndexPages BIGINT = 0, + @IndexSpaceUsed BIGINT = 0; + + -- Calculate the number of non-leaf levels in the index + SET @NonLeafLevels = CEILING(1 + LOG(@IndexRowsPerPage) * (@NumLeafPages / @IndexRowsPerPage)); + + IF (@Verbose = 1) + BEGIN + SET @Msg = CONCAT('NonLeafLevels: ', @NonLeafLevels); + RAISERROR(@Msg, 10, 1) WITH NOWAIT; + END; + + --Formula: IndexPages = Summation (Num_Leaf_Pages/Index_Rows_Per_Page^Level)where 1 <= Level <= Levels + WHILE (@NonLeafLevels > 1) + BEGIN + DECLARE @TempIndexPages FLOAT(30); + + -- TempIndexPages may be exceedingly small, so catch any arith overflows and call it 0 + BEGIN TRY; + SET @TempIndexPages = @NumLeafPages / POWER(@IndexRowsPerPage, @NonLeafLevels); + SET @NumIndexPages = @NumIndexPages + @TempIndexPages; + SET @NonLeafLevels = @NonLeafLevels - 1; + END TRY + BEGIN CATCH; + SET @NonLeafLevels = @NonLeafLevels - 1; + END CATCH; + END; + + -- Calculate size of the index + SET @IndexSpaceUsed = @PageSize * @NumIndexPages; + + /**************************************/ + /* 4. Total index and leaf space used */ + /**************************************/ + DECLARE @Total BIGINT = 0; + + SET @Total = @LeafSpaceUsed + @IndexSpaceUsed; + + SELECT @Total/1024 AS [Est. KB] + ,CAST(ROUND(@Total/1024.0/1024.0,2,1) AS DECIMAL(30,2)) AS [Est. MB] + ,CAST(ROUND(@Total/1024.0/1024.0/1024.0,2,1) AS DECIMAL(30,4)) AS [Est. GB]; + END; + + --Cleanup + EXEC sp_executesql @DropIndexSql; + +END TRY +BEGIN CATCH; + BEGIN; + DECLARE @ErrorNumber INT = ERROR_NUMBER(); + DECLARE @ErrorLine INT = ERROR_LINE(); + DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE(); + DECLARE @ErrorSeverity INT = ERROR_SEVERITY(); + DECLARE @ErrorState INT = ERROR_STATE(); + + EXEC sp_executesql @DropIndexSql; + + SET @ErrorMessage = CONCAT(QUOTENAME(OBJECT_NAME(@@PROCID)), ': ', @ErrorMessage); + RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState) WITH NOWAIT; + END; +END CATCH; + +END; +GO + +EXEC sys.sp_addextendedproperty @name=N'@DatabaseName', @value=N'Target database of the index''s table.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@FillFactor', @value=N'Optional fill factor for the index. Default is 100.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@Filter', @value=N'Optional filter for the index.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IncludeColumns', @value=N'Optional comma separated list of include columns.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IndexColumns', @value=N'Comma separated list of key columns.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@IsUnique', @value=N'Whether or not the index is UNIQUE. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SchemaName', @value=N'Target schema of the index''s table. Default is ''dbo''.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMajorVersion', @value=N'For unit testing only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@TableName', @value=N'Target table for the index. Default is current database.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'Description', @value=N'Estimate a new index''s size and statistics.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@Verbose', @value=N'Show intermediate variables used in size calculations. Default is 0.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_estindex'; +GO diff --git a/Stored_Procedure/sp_helpme.sql b/Stored_Procedure/sp_helpme.sql new file mode 100644 index 00000000..8493b30a --- /dev/null +++ b/Stored_Procedure/sp_helpme.sql @@ -0,0 +1,477 @@ +SET ANSI_NULLS ON; +GO + +SET QUOTED_IDENTIFIER ON; +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_helpme', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMinorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_helpme', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMinorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@SqlMajorVersion' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_helpme', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@SqlMajorVersion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@ExtendedPropertyName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_helpme', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@ExtendedPropertyName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; + END +GO + +IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'@ObjectName' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_helpme', NULL,NULL)) + BEGIN; + EXEC sys.sp_dropextendedproperty @name=N'@ObjectName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; + END +GO + +/***************************/ +/* Create stored procedure */ +/***************************/ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_helpme]') AND [type] IN (N'P', N'PC')) + BEGIN; + EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_helpme] AS'; + END +GO + +ALTER PROCEDURE [dbo].[sp_helpme] + @ObjectName SYSNAME = NULL + ,@ExtendedPropertyName SYSNAME = 'Description' + /* Parameters defined here for testing only */ + ,@SqlMajorVersion TINYINT = 0 + ,@SqlMinorVersion SMALLINT = 0 +AS + +/* +sp_helpme - A drop-in modern alternative to sp_help. + +Part of the DBA MultiTool http://dba-multitool.org + +Version: Version: 20201008 + +MIT License + +Copyright (c) 2020 John McCall + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +========= + +Example: + + EXEC sp_helpme 'dbo.Sales'; + +*/ + +BEGIN + SET NOCOUNT ON; + + DECLARE @DbName SYSNAME + ,@ObjShortName SYSNAME = N'' + ,@No VARCHAR(5) = 'no' + ,@Yes VARCHAR(5) = 'yes' + ,@None VARCHAR(5) = 'none' + ,@SysObj_Type CHAR(2) + ,@ObjID INT + ,@HasParam INT = 0 + ,@HasDepen BIT = 0 + ,@HasHidden BIT = 0 + ,@HasMasked BIT = 0 + ,@SQLString NVARCHAR(MAX) = N'' + ,@Msg NVARCHAR(MAX) = N'' + ,@ParmDefinition NVARCHAR(500); + + /* Find Version */ + IF (@SqlMajorVersion = 0) + BEGIN; + SET @SqlMajorVersion = CAST(SERVERPROPERTY('ProductMajorVersion') AS TINYINT); + END; + IF (@SqlMinorVersion = 0) + BEGIN; + SET @SqlMinorVersion = CAST(SERVERPROPERTY('ProductMinorVersion') AS TINYINT); + END; + + /* Validate Version */ + IF (@SqlMajorVersion < 11) + BEGIN; + SET @Msg = 'SQL Server versions below 2012 are not supported, sorry!'; + RAISERROR(@Msg, 16, 1); + END; + + /* Check for Hidden Columns feature */ + IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_hidden' AND OBJECT_NAME(ac.object_id) = 'all_columns') + BEGIN + SET @HasHidden = 1; + END; + + /* Check for Masked Columns feature */ + IF 1 = (SELECT COUNT(*) FROM sys.all_columns AS ac WHERE ac.name = 'is_masked' AND OBJECT_NAME(ac.object_id) = 'all_columns') + BEGIN + SET @HasMasked = 1; + END; + + -- If no @ObjectName given, give a little info about all objects. + IF (@ObjectName IS NULL) + BEGIN; + SET @SQLString = N'SELECT + [Name] = [o].[name], + [Owner] = USER_NAME(OBJECTPROPERTY([object_id], ''ownerid'')), + [Object_type] = LOWER(REPLACE([o].[type_desc], ''_'', '' '')), + [Create_datetime] = [o].[create_date], + [Modify_datetime] = [o].[modify_date], + [ExtendedProperty] = [ep].[value] + FROM [sys].[all_objects] [o] + LEFT JOIN [sys].[extended_properties] [ep] ON [ep].[major_id] = [o].[object_id] + and [ep].[name] = @ExtendedPropertyName + AND [ep].[minor_id] = 0 + AND [ep].[class] = 1 + ORDER BY [Owner] ASC, [Object_type] DESC, [name] ASC;'; + SET @ParmDefinition = N'@ExtendedPropertyName SYSNAME'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ExtendedPropertyName; + + -- Display all user types + SET @SQLString = N'SELECT + [User_type] = [name], + [Storage_type] = TYPE_NAME(system_type_id), + [Length] = max_length, + [Prec] = [precision], + [Scale] = [scale], + [Nullable] = CASE WHEN is_nullable = 1 THEN @Yes ELSE @No END, + [Default_name] = ISNULL(OBJECT_NAME(default_object_id), @None), + [Rule_name] = ISNULL(OBJECT_NAME(rule_object_id), @None), + [Collation] = collation_name + FROM sys.types + WHERE user_type_id > 256 + ORDER BY [name];'; + SET @ParmDefinition = N'@Yes VARCHAR(5), @No VARCHAR(5), @None VARCHAR(5)'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@Yes + ,@No + ,@None; + + RETURN(0); + END -- End all Sysobjects + + -- Make sure the @ObjectName is local to the current database. + SELECT @ObjShortName = PARSENAME(@ObjectName,1); + SELECT @DbName = PARSENAME(@ObjectName,3); + IF @DbName IS NULL + SELECT @DbName = DB_NAME(); + ELSE IF @DbName <> DB_NAME() + BEGIN + RAISERROR(15250,-1,-1); + END + + -- @ObjectName must be either sysobjects or systypes: first look in sysobjects + SET @SQLString = N'SELECT @ObjID = object_id + , @SysObj_Type = type + FROM sys.all_objects + WHERE object_id = OBJECT_ID(@ObjectName);'; + SET @ParmDefinition = N'@ObjectName SYSNAME + ,@ObjID INT OUTPUT + ,@SysObj_Type VARCHAR(5) OUTPUT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjectName + ,@ObjID OUTPUT + ,@SysObj_Type OUTPUT; + + -- If @ObjectName not in sysobjects, try systypes + IF @ObjID IS NULL + BEGIN + SET @SQLSTring = N'SELECT @ObjID = user_type_id + FROM sys.types + WHERE name = PARSENAME(@ObjectName,1);'; + SET @ParmDefinition = N'@ObjectName SYSNAME + ,@ObjID INT OUTPUT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjectName + ,@ObjID OUTPUT; + + -- If not in systypes, return + IF @ObjID IS NULL + BEGIN + RAISERROR(15009,-1,-1,@ObjectName,@DbName); + END + + -- Data Type help (prec/scale only valid for numerics) + SET @SQLString = N'SELECT + [Type_name] = t.name, + [Storage_type] = type_name(system_type_id), + [Length] = max_length, + [Prec] = [precision], + [Scale] = [scale], + [Nullable] = case when is_nullable=1 then @Yes else @No end, + [Default_name] = isnull(object_name(default_object_id), @None), + [Rule_name] = isnull(object_name(rule_object_id), @None), + [Collation] = collation_name, + [ExtendedProperty] = ep.[value] + FROM [sys].[types] AS [t] + LEFT JOIN [sys].[extended_properties] AS [ep] ON [ep].[major_id] = [t].[user_type_id] + AND [ep].[name] = @ExtendedPropertyName + AND [ep].[minor_id] = 0 + AND [ep].[class] = 6 + WHERE [user_type_id] = @ObjID'; + SET @ParmDefinition = N'@ObjID INT, @Yes VARCHAR(5), @No VARCHAR(5), @None VARCHAR(5), @ExtendedPropertyName SYSNAME'; + + EXECUTE sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID + ,@Yes + ,@No + ,@None + ,@ExtendedPropertyName; + + RETURN(0); + END --Systypes + + -- FOUND IT IN SYSOBJECT, SO GIVE OBJECT INFO + SET @SQLString = N'SELECT + [Name] = [o].[name], + [Owner] = USER_NAME(ObjectProperty([o].[object_id], ''ownerid'')), + [Type] = LOWER(REPLACE([o].[type_desc], ''_'', '' '')), + [Created_datetime] = [o].[create_date], + [Modify_datetime] = [o].[modify_date], + [ExtendedProperty] = [ep].[value] + FROM [sys].[all_objects] [o] + LEFT JOIN [sys].[extended_properties] [ep] ON [ep].[major_id] = [o].[object_id] + AND [ep].[name] = @ExtendedPropertyName + AND [ep].[minor_id] = 0 + AND [ep].[class] = 1 + WHERE [o].[object_id] = @ObjID;'; + + SET @ParmDefinition = N'@ObjID INT, @ExtendedPropertyName SYSNAME'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID + ,@ExtendedPropertyName; + + -- Display column metadata if table / view + SET @SQLString = N' + IF EXISTS (select * from sys.all_columns where object_id = @ObjID) + BEGIN; + + -- SET UP NUMERIC TYPES: THESE WILL HAVE NON-BLANK PREC/SCALE + -- There must be a '','' immediately after each type name (including last one), + -- because that''s what we''ll search for in charindex later. + DECLARE @precscaletypes NVARCHAR(150); + SELECT @precscaletypes = N''tinyint,smallint,decimal,int,bigint,real,money,float,numeric,smallmoney,date,time,datetime2,datetimeoffset,'' + + -- INFO FOR EACH COLUMN + select + [Column_name] = ac.name, + [Type] = type_name([ac].[user_type_id]), + [Computed] = case when ColumnProperty(object_id, [ac].[name], ''IsComputed'') = 0 then ''no'' else ''yes'' end, + [Length] = convert(int, [ac].[max_length]), + -- for prec/scale, only show for those types that have valid precision/scale + -- Search for type name + '','', because ''datetime'' is actually a substring of ''datetime2'' and ''datetimeoffset'' + [Prec] = case when charindex(type_name([ac].[system_type_id]) + '','', '''') > 0 + then convert(char(5),ColumnProperty(object_id, ac.name, ''precision'')) + else '' '' end, + [Scale] = case when charindex(type_name([ac].[system_type_id]) + '','', '''') > 0 + then convert(char(5),OdbcScale([ac].[system_type_id],[ac].[scale])) + else '' '' end, + [Nullable] = case when [ac].[is_nullable] = 0 then ''no'' else ''yes'' end, '; + + --Only include if they exist on the current version + IF @HasMasked = 1 + BEGIN + SET @SQLString = @SQLString + N'[Masked] = case when is_masked = 0 then ''no'' else ''yes'' end, '; + END + + SET @SQLString = @SQLString + N'[Sparse] = case when is_sparse = 0 then ''no'' else ''yes'' end, '; + + IF @HasHidden = 1 + BEGIN + SET @SQLString = @SQLString + N'[Hidden] = case when is_hidden = 0 then ''no'' else ''yes'' end, '; + END + + SET @SQLString = @SQLString + N' + [Identity] = case when is_identity = 0 then ''no'' else ''yes'' end, + [TrimTrailingBlanks] = case ColumnProperty(object_id, ac.name, ''UsesAnsiTrim'') + when 1 then ''no'' + when 0 then ''yes'' + else ''(n/a)'' end, + [FixedLenNullInSource] = case + when type_name([ac].[system_type_id]) not in (''varbinary'',''varchar'',''binary'',''char'') + then ''(n/a)'' + when [ac].[is_nullable] = 0 then ''no'' else ''yes'' end, + [Collation] = [ac].[collation_name], + [ExtendedProperty] = [ep].[value] + FROM [sys].[all_columns] AS [ac] + INNER JOIN [sys].[types] AS [typ] ON [typ].[system_type_id] = [ac].[system_type_id] + LEFT JOIN sys.extended_properties ep ON ep.minor_id = ac.column_id + AND ep.major_id = ac.[object_id] + AND ep.[name] = @ExtendedPropertyName + AND ep.class = 1 + WHERE [object_id] = @ObjID + END'; + SET @ParmDefinition = N'@ObjID INT, @ExtendedPropertyName SYSNAME'; + EXEC sp_executesql @SQLString, @ParmDefinition, @ObjID = @ObjID, @ExtendedPropertyName = @ExtendedPropertyName; + + -- Identity & rowguid columns + IF @SysObj_Type IN ('S ','U ','V ','TF') + BEGIN + DECLARE @colname SYSNAME = NULL; + SET @SQLString = N'SELECT @colname = COL_NAME(@ObjID, column_id) + FROM sys.identity_columns + WHERE object_id = @ObjID;'; + SET @ParmDefinition = N'@ObjID INT, @colname SYSNAME OUTPUT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID + ,@colname OUTPUT; + + --Identity + IF (@colname IS NOT NULL) + SELECT + 'Identity' = @colname, + 'Seed' = IDENT_SEED(@ObjectName), + 'Increment' = IDENT_INCR(@ObjectName), + 'Not For Replication' = COLUMNPROPERTY(@ObjID, @colname, 'IsIDNotForRepl'); + ELSE + BEGIN + SET @Msg = 'No identity is defined on object %ls.'; + RAISERROR(@Msg, 10, 1, @ObjectName) WITH NOWAIT; + END + + -- Rowguid + SET @colname = NULL; + SET @SQLString = N'SELECT @colname = [name] + FROM sys.all_columns + WHERE [object_id] = @ObjID AND is_rowguidcol = 1;'; + SET @ParmDefinition = N'@ObjID INT, @colname SYSNAME OUTPUT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID + ,@colname OUTPUT; + + IF (@colname IS NOT NULL) + SELECT 'RowGuidCol' = @colname; + ELSE + BEGIN + SET @Msg = 'No rowguid is defined on object %ls.'; + RAISERROR(@Msg, 10, 1, @ObjectName) WITH NOWAIT; + END + END + + -- Display any procedure parameters + SET @SQLString = N'SELECT TOP (1) @HasParam = 1 FROM sys.all_parameters WHERE object_id = @ObjID'; + SET @ParmDefinition = N'@ObjID INT, @HasParam BIT OUTPUT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID + ,@HasParam OUTPUT; + + --If parameters exist, show them + IF @HasParam = 1 + BEGIN + SET @SQLString = N'SELECT + [Parameter_name] = [name], + [Type] = TYPE_NAME(user_type_id), + [Length] = max_length, + [Prec] = CASE WHEN TYPE_NAME(system_type_id) = ''uniqueidentifier'' THEN [precision] + ELSE OdbcPrec(system_type_id, max_length, [precision]) END, + [Scale] = ODBCSCALE(system_type_id, scale), + [Param_order] = parameter_id, + [Collation] = CONVERT([sysname], CASE WHEN system_type_id in (35, 99, 167, 175, 231, 239) + THEN SERVERPROPERTY(''collation'') END) + FROM sys.all_parameters + WHERE [object_id] = @ObjID;'; + SET @ParmDefinition = N'@ObjID INT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID; + END + + -- DISPLAY TABLE INDEXES & CONSTRAINTS + IF @SysObj_Type IN ('S ','U ') + BEGIN + EXEC sys.sp_objectfilegroup @ObjID; + EXEC sys.sp_helpindex @ObjectName; + EXEC sys.sp_helpconstraint @ObjectName,'nomsg'; + + SET @SQLString = N'SELECT @HasDepen = COUNT(*) + FROM sys.objects obj, sysdepends deps + WHERE obj.[type] =''V'' + AND obj.[object_id] = deps.id + AND deps.depid = @ObjID + AND deps.deptype = 1;'; + SET @ParmDefinition = N'@ObjID INT, @HasDepen INT OUTPUT'; + + EXEC sp_executeSQL @SQLString + ,@ParmDefinition + ,@ObjID + ,@HasDepen OUTPUT; + + IF @HasDepen = 0 + BEGIN + RAISERROR(15647,-1,-1,@ObjectName); -- No views with schemabinding for reference table '%ls'. + END + ELSE + BEGIN + SET @SQLString = N'SELECT DISTINCT [Table is referenced by views] = OBJECT_SCHEMA_NAME(obj.object_id) + ''.'' + obj.[name] + FROM sys.objects obj + INNER JOIN sysdepends deps ON obj.object_id = deps.id + WHERE obj.[type] =''V'' + AND deps.depid = @ObjID + AND deps.deptype = 1 + GROUP BY obj.[name], obj.object_id;'; + SET @ParmDefinition = N'@ObjID INT'; + + EXEC sp_executesql @SQLString + ,@ParmDefinition + ,@ObjID; + END + END +END; +GO + +EXEC sys.sp_addextendedproperty @name=N'Description', @value=N'Drop-in alternative to sp_help. Documentation at https://expresssql.lowlydba.com' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@ObjectName', @value=N'Target object. Default is all objects.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@ExtendedPropertyName', @value=N'Key for extended properties on objects. Default is ''Description''.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMajorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; +GO + +EXEC sys.sp_addextendedproperty @name=N'@SqlMinorVersion', @value=N'Used for unit testing purposes only.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PROCEDURE',@level1name=N'sp_helpme'; +GO From 9008bcf9eade6093b8eb3c3775df6a73ca420e3e Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:56:42 -0500 Subject: [PATCH 216/553] Rename sp_doc.sql to dbo.sp_doc.sql --- Stored_Procedure/{sp_doc.sql => dbo.sp_doc.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Stored_Procedure/{sp_doc.sql => dbo.sp_doc.sql} (100%) diff --git a/Stored_Procedure/sp_doc.sql b/Stored_Procedure/dbo.sp_doc.sql similarity index 100% rename from Stored_Procedure/sp_doc.sql rename to Stored_Procedure/dbo.sp_doc.sql From 549ece056b96c37083b949ce39c933578608b8bc Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:57:07 -0500 Subject: [PATCH 217/553] Rename sp_estindex.sql to dbo.sp_estindex.sql --- Stored_Procedure/{sp_estindex.sql => dbo.sp_estindex.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Stored_Procedure/{sp_estindex.sql => dbo.sp_estindex.sql} (100%) diff --git a/Stored_Procedure/sp_estindex.sql b/Stored_Procedure/dbo.sp_estindex.sql similarity index 100% rename from Stored_Procedure/sp_estindex.sql rename to Stored_Procedure/dbo.sp_estindex.sql From 9f450416a420b99d8d5b385f9dcec3ee52e30619 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 14:57:23 -0500 Subject: [PATCH 218/553] Rename sp_helpme.sql to dbo.sp_helpme.sql --- Stored_Procedure/{sp_helpme.sql => dbo.sp_helpme.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Stored_Procedure/{sp_helpme.sql => dbo.sp_helpme.sql} (100%) diff --git a/Stored_Procedure/sp_helpme.sql b/Stored_Procedure/dbo.sp_helpme.sql similarity index 100% rename from Stored_Procedure/sp_helpme.sql rename to Stored_Procedure/dbo.sp_helpme.sql From 20156ebda5b39f4c3ec0d24d212fa00c9b0fd032 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 13 Jan 2021 15:00:27 -0500 Subject: [PATCH 219/553] update expresssql -> dba-multitool project ref --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6d39ea37..b9261561 100644 --- a/README.md +++ b/README.md @@ -366,7 +366,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [TSqlStrong - T-Sql type checker that detects improper joins, possibly null value operations, enumeration check constraint violations, incorrect use of temporary table at call site, and more](https://github.com/JSuder-xx/TSqlStrong) (by John Suder) - [SQL Power Doc - is a collection of Windows PowerShell scripts and modules that discover, document, and diagnose SQL Server instances and their underlying Windows OS & machine configuration](https://github.com/kendalvandyke/sqlpowerdoc) (by Kendal Van Dyke) - [rsqlserver - Sql Server driver database interface (DBI) driver for R](https://github.com/agstudy/rsqlserver) - - [DBA MultiTool - T-SQL scripts for the long haul: optimizing storage, on-the-fly documentation, and general administrative needs.](https://github.com/LowlyDBA/ExpressSQL) (by John McCall) + - [DBA MultiTool - T-SQL scripts for the long haul: optimizing storage, on-the-fly documentation, and general administrative needs.](https://github.com/LowlyDBA/dba-multitool) (by John McCall) - [language-extensions-sqlserver - SQL Server Language Extensions project](https://github.com/microsoft/sql-server-language-extensions) (by Microsoft) - [AzureRMR - R package for interacting with Azure Resource Manager](https://github.com/Azure/AzureRMR) (by Microsoft) - [EntityFramework.Utilities - Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts](https://github.com/MikaelEliasson/EntityFramework.Utilities) (by Mikael Eliasson) From 906c94a15ed23a8a3a6c02846d534d5f4eaf1e2c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 15 Jan 2021 11:57:31 +0300 Subject: [PATCH 220/553] New awesome article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fb67d236..655f5c4a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1326,6 +1326,7 @@ Articles types: | [Date and time conditions causing SQL performance problems] | Markus Winand | 2013-01-01 | [DBA][DEV] | | [Dates and Times in SQL Server: more functions you should never use] | Randolph West | 2018-05-16 | [DBA][DEV] | | [Dates and Times in SQL Server: T-SQL functions to get the current date and time] | Randolph West | 2018-04-25 | [DBA][DEV] | +| [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine] | Chris Adkin | 2016-01-18 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2626,3 +2627,4 @@ Articles types: [Date and time conditions causing SQL performance problems]:https://use-the-index-luke.com/sql/where-clause/obfuscation/dates [Dates and Times in SQL Server: more functions you should never use]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ [Dates and Times in SQL Server: T-SQL functions to get the current date and time]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ +[Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine]:https://chrisadkin.io/2016/01/18/super-scaling-queues-using-the-lmax-disruptor-pattern-and-the-in-memory-oltp-engine/ From 6e5f3bf52c48588a9fd677beb992400e4568cf86 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 16 Jan 2021 11:59:30 +0300 Subject: [PATCH 221/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 655f5c4a..16a59a2c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1327,6 +1327,7 @@ Articles types: | [Dates and Times in SQL Server: more functions you should never use] | Randolph West | 2018-05-16 | [DBA][DEV] | | [Dates and Times in SQL Server: T-SQL functions to get the current date and time] | Randolph West | 2018-04-25 | [DBA][DEV] | | [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine] | Chris Adkin | 2016-01-18 | [DBA][DEV] | +| [Early History of SQL] | Donald D. Chamberlin | 2012-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2628,3 +2629,4 @@ Articles types: [Dates and Times in SQL Server: more functions you should never use]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ [Dates and Times in SQL Server: T-SQL functions to get the current date and time]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine]:https://chrisadkin.io/2016/01/18/super-scaling-queues-using-the-lmax-disruptor-pattern-and-the-in-memory-oltp-engine/ +[Early History of SQL]:https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6359709 From 4455790ce5588e29cbe49f07961715d56b93b33a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 17 Jan 2021 12:04:46 +0300 Subject: [PATCH 222/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 16a59a2c..c66ab83f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1328,6 +1328,7 @@ Articles types: | [Dates and Times in SQL Server: T-SQL functions to get the current date and time] | Randolph West | 2018-04-25 | [DBA][DEV] | | [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine] | Chris Adkin | 2016-01-18 | [DBA][DEV] | | [Early History of SQL] | Donald D. Chamberlin | 2012-01-01 | [DBA][DEV] | +| [Is it a bad practice to always create a transaction?] | Kin Shah | 2013-09-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2630,3 +2631,4 @@ Articles types: [Dates and Times in SQL Server: T-SQL functions to get the current date and time]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine]:https://chrisadkin.io/2016/01/18/super-scaling-queues-using-the-lmax-disruptor-pattern-and-the-in-memory-oltp-engine/ [Early History of SQL]:https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6359709 +[Is it a bad practice to always create a transaction?]:https://dba.stackexchange.com/a/43256 From e435c0371dc4af5486ace229b6e1828363874b77 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 21 Jan 2021 12:09:56 +0300 Subject: [PATCH 223/553] Add article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c66ab83f..5d6281c0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1329,6 +1329,7 @@ Articles types: | [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine] | Chris Adkin | 2016-01-18 | [DBA][DEV] | | [Early History of SQL] | Donald D. Chamberlin | 2012-01-01 | [DBA][DEV] | | [Is it a bad practice to always create a transaction?] | Kin Shah | 2013-09-06 | [DBA][DEV] | +| [Incomplete checkpoints and recovery] | Paul Randal | 2015-03-18 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2632,3 +2633,4 @@ Articles types: [Super Scaling Queues Using the LMax Disruptor Pattern And The In-Memory OLTP Engine]:https://chrisadkin.io/2016/01/18/super-scaling-queues-using-the-lmax-disruptor-pattern-and-the-in-memory-oltp-engine/ [Early History of SQL]:https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6359709 [Is it a bad practice to always create a transaction?]:https://dba.stackexchange.com/a/43256 +[Incomplete checkpoints and recovery]:https://www.sqlskills.com/blogs/paul/incomplete-checkpoints-and-recovery/ From afde946e10de83a3c8d1a5ee44243b145d05f20c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 22 Jan 2021 12:14:36 +0300 Subject: [PATCH 224/553] Add article --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5d6281c0..9126f99c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1330,6 +1330,8 @@ Articles types: | [Early History of SQL] | Donald D. Chamberlin | 2012-01-01 | [DBA][DEV] | | [Is it a bad practice to always create a transaction?] | Kin Shah | 2013-09-06 | [DBA][DEV] | | [Incomplete checkpoints and recovery] | Paul Randal | 2015-03-18 | [DBA] | +| [4 SQL Injection Techniques For Stealing Data] | Bert Wagner | 2018-11-20 | [DBA][DEV] | +| [Towards Safer Dynamic SQL] | Eric Darling | 2020-10-11 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2634,3 +2636,5 @@ Articles types: [Early History of SQL]:https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6359709 [Is it a bad practice to always create a transaction?]:https://dba.stackexchange.com/a/43256 [Incomplete checkpoints and recovery]:https://www.sqlskills.com/blogs/paul/incomplete-checkpoints-and-recovery/ +[4 SQL Injection Techniques For Stealing Data]:https://bertwagner.com/posts/4-sql-injection-techniques-for-stealing-data/ +[Towards Safer Dynamic SQL]:https://www.erikdarlingdata.com/sql-server/towards-safer-dynamic-sql/ From 8139694230b76f3f26c82cd7ef22871d14ef1f03 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 23 Jan 2021 12:17:03 +0300 Subject: [PATCH 225/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9126f99c..d25cef2c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1332,6 +1332,7 @@ Articles types: | [Incomplete checkpoints and recovery] | Paul Randal | 2015-03-18 | [DBA] | | [4 SQL Injection Techniques For Stealing Data] | Bert Wagner | 2018-11-20 | [DBA][DEV] | | [Towards Safer Dynamic SQL] | Eric Darling | 2020-10-11 | [DBA][DEV] | +| [Setting the timezone to anything other than UTC] | Yeller | 2015-01-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2638,3 +2639,4 @@ Articles types: [Incomplete checkpoints and recovery]:https://www.sqlskills.com/blogs/paul/incomplete-checkpoints-and-recovery/ [4 SQL Injection Techniques For Stealing Data]:https://bertwagner.com/posts/4-sql-injection-techniques-for-stealing-data/ [Towards Safer Dynamic SQL]:https://www.erikdarlingdata.com/sql-server/towards-safer-dynamic-sql/ +[Setting the timezone to anything other than UTC]:http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html From d4fc2435a55d6654b9b75853a9b377b7a54fee4d Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Sat, 23 Jan 2021 12:45:22 +0000 Subject: [PATCH 226/553] Trace flags - adding 6559 --- SQL Server Trace Flag.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index dfdef906..1a62d7fd 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3440,6 +3440,14 @@ Link: https://support.microsoft.com/kb/3107399 Scope: global only + +#### Trace Flag: 6559 +Function: avoids blocking from orphaned CLR sessions. Enables new functionality in SQL Server 2016 SP1 CU10, SQL Server 2017 CU18, and SQL Server 2019 CU1. Based on the description, this behavior will never be the default, and even though it is available in all versions after 2019, you have to opt into it with the trace flag.
+Link: https://support.microsoft.com/kb/4517771
+Scope: global only
+SQL Server Version: >= 2019 CU1, >= 2017 CU18, >= 2016 SP1 CU10 + + #### Trace Flag: 7103 **Undocumented trace flag**
From 708600b353fc1b658b1b262a7bb192fb1f794668 Mon Sep 17 00:00:00 2001 From: weijh Date: Wed, 27 Jan 2021 14:14:51 +0800 Subject: [PATCH 227/553] Update SQL Server Version.md --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index b6c87ea8..4af25448 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -132,7 +132,7 @@ Profits: | 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | -| 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | +| 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-07 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4532098] | 11.0.2100.60
11.0.7001.0
11.0.7493.4 | 2012-02-14
2017-10-05
2020-02-11 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2008 R2 | [Install 2008 R2] then
[SP3 2008 R2] then
[SU KB3045311] | 10.50.1600
10.50.6000
10.50.6220.0 | 2010-11-21
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 R2 Updates](#microsoft-sql-server-2008-r2-builds) | | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | @@ -144,7 +144,7 @@ Profits: [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [CU14 KB4564903]:https://support.microsoft.com/help/4564903 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 -[KB4535288]:https://support.microsoft.com/help/4535288 +[KB4583462]:https://support.microsoft.com/help/4583462 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 [SP4 2012]:https://support.microsoft.com/help/4018073 [KB4532098]:https://support.microsoft.com/help/4532098 From 5f952ebcaaaad087ac766ecdf8a94dcba5daeeef Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 30 Jan 2021 12:28:20 +0300 Subject: [PATCH 228/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d25cef2c..d3fa946b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1333,6 +1333,7 @@ Articles types: | [4 SQL Injection Techniques For Stealing Data] | Bert Wagner | 2018-11-20 | [DBA][DEV] | | [Towards Safer Dynamic SQL] | Eric Darling | 2020-10-11 | [DBA][DEV] | | [Setting the timezone to anything other than UTC] | Yeller | 2015-01-12 | [DBA][DEV] | +| [Advanced Service Broker Sample: Multi-Threading] | Yeller | 2015-01-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2640,3 +2641,4 @@ Articles types: [4 SQL Injection Techniques For Stealing Data]:https://bertwagner.com/posts/4-sql-injection-techniques-for-stealing-data/ [Towards Safer Dynamic SQL]:https://www.erikdarlingdata.com/sql-server/towards-safer-dynamic-sql/ [Setting the timezone to anything other than UTC]:http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html +[Advanced Service Broker Sample: Multi-Threading]:https://eitanblumin.com/2018/10/31/advanced-service-broker-sample-multi-threading/ From 1ba894f04ea0f178d00d136eaab04e21508f10cd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 31 Jan 2021 12:30:20 +0300 Subject: [PATCH 229/553] Add awesome article --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index d3fa946b..90654395 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1333,7 +1333,8 @@ Articles types: | [4 SQL Injection Techniques For Stealing Data] | Bert Wagner | 2018-11-20 | [DBA][DEV] | | [Towards Safer Dynamic SQL] | Eric Darling | 2020-10-11 | [DBA][DEV] | | [Setting the timezone to anything other than UTC] | Yeller | 2015-01-12 | [DBA][DEV] | -| [Advanced Service Broker Sample: Multi-Threading] | Yeller | 2015-01-12 | [DBA][DEV] | +| [Advanced Service Broker Sample: Multi-Threading] | Eitan Blumin | 2018-10-31 | [DBA][DEV] | +| [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2642,3 +2643,4 @@ Articles types: [Towards Safer Dynamic SQL]:https://www.erikdarlingdata.com/sql-server/towards-safer-dynamic-sql/ [Setting the timezone to anything other than UTC]:http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html [Advanced Service Broker Sample: Multi-Threading]:https://eitanblumin.com/2018/10/31/advanced-service-broker-sample-multi-threading/ +[Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html From 74e785caae44bccef5e1f4418f381ccaad79a6c8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 1 Feb 2021 09:59:42 +0300 Subject: [PATCH 230/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 90654395..682f514d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1335,6 +1335,7 @@ Articles types: | [Setting the timezone to anything other than UTC] | Yeller | 2015-01-12 | [DBA][DEV] | | [Advanced Service Broker Sample: Multi-Threading] | Eitan Blumin | 2018-10-31 | [DBA][DEV] | | [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | +| [Copy a SQL Server database with just the objects and no data] | Jeffrey Yao | 2017-02-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2644,3 +2645,4 @@ Articles types: [Setting the timezone to anything other than UTC]:http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html [Advanced Service Broker Sample: Multi-Threading]:https://eitanblumin.com/2018/10/31/advanced-service-broker-sample-multi-threading/ [Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html +[Copy a SQL Server database with just the objects and no data]:https://www.mssqltips.com/sqlservertip/4664/copy-a-sql-server-database-with-just-the-objects-and-no-data/ From 29e23d2d8e93da76c94292b3085ae58645b29e0e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 2 Feb 2021 10:02:01 +0300 Subject: [PATCH 231/553] new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 682f514d..5b069c9e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1336,6 +1336,7 @@ Articles types: | [Advanced Service Broker Sample: Multi-Threading] | Eitan Blumin | 2018-10-31 | [DBA][DEV] | | [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | | [Copy a SQL Server database with just the objects and no data] | Jeffrey Yao | 2017-02-01 | [DBA][DEV] | +| [QOMPLX Knowledge: Kerberoasting Attacks Explained] | QOMPLX | 2020-01-01 | [SEC] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2646,3 +2647,4 @@ Articles types: [Advanced Service Broker Sample: Multi-Threading]:https://eitanblumin.com/2018/10/31/advanced-service-broker-sample-multi-threading/ [Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html [Copy a SQL Server database with just the objects and no data]:https://www.mssqltips.com/sqlservertip/4664/copy-a-sql-server-database-with-just-the-objects-and-no-data/ +[QOMPLX Knowledge: Kerberoasting Attacks Explained]:https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/ From 6918aa4db5cd6366f0d3091f3ad37ef123734fe4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 3 Feb 2021 10:03:53 +0300 Subject: [PATCH 232/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5b069c9e..e48b4429 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1337,6 +1337,7 @@ Articles types: | [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | | [Copy a SQL Server database with just the objects and no data] | Jeffrey Yao | 2017-02-01 | [DBA][DEV] | | [QOMPLX Knowledge: Kerberoasting Attacks Explained] | QOMPLX | 2020-01-01 | [SEC] | +| [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-24 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2648,3 +2649,4 @@ Articles types: [Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html [Copy a SQL Server database with just the objects and no data]:https://www.mssqltips.com/sqlservertip/4664/copy-a-sql-server-database-with-just-the-objects-and-no-data/ [QOMPLX Knowledge: Kerberoasting Attacks Explained]:https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/ +[How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ From f1b33575c6ada7e3d472ee22141ced8873a39a42 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 4 Feb 2021 10:05:35 +0300 Subject: [PATCH 233/553] add awesome article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e48b4429..2bf33fe9 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1338,6 +1338,7 @@ Articles types: | [Copy a SQL Server database with just the objects and no data] | Jeffrey Yao | 2017-02-01 | [DBA][DEV] | | [QOMPLX Knowledge: Kerberoasting Attacks Explained] | QOMPLX | 2020-01-01 | [SEC] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-24 | [DBA][DEV] | +| [Query Memory Grants and Resource Semaphores in SQL Server] | Klaus Aschenbrenner | 2018-10-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2650,3 +2651,4 @@ Articles types: [Copy a SQL Server database with just the objects and no data]:https://www.mssqltips.com/sqlservertip/4664/copy-a-sql-server-database-with-just-the-objects-and-no-data/ [QOMPLX Knowledge: Kerberoasting Attacks Explained]:https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/ [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ +[Query Memory Grants and Resource Semaphores in SQL Server]:https://www.sqlpassion.at/archive/2018/10/16/query-memory-grants-and-resource-semaphores-in-sql-server/ From 6626c9dd34fe814f60468117d05e9dac9fdc79d8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 5 Feb 2021 10:08:08 +0300 Subject: [PATCH 234/553] add mega awesome article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2bf33fe9..254fbcbd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1339,6 +1339,7 @@ Articles types: | [QOMPLX Knowledge: Kerberoasting Attacks Explained] | QOMPLX | 2020-01-01 | [SEC] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-24 | [DBA][DEV] | | [Query Memory Grants and Resource Semaphores in SQL Server] | Klaus Aschenbrenner | 2018-10-16 | [DBA][DEV] | +| [Using a Table of Numbers (or a Table of Dates, Months etc)] | Erland Sommarskog | 2020-09-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2652,3 +2653,4 @@ Articles types: [QOMPLX Knowledge: Kerberoasting Attacks Explained]:https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/ [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Query Memory Grants and Resource Semaphores in SQL Server]:https://www.sqlpassion.at/archive/2018/10/16/query-memory-grants-and-resource-semaphores-in-sql-server/ +[Using a Table of Numbers (or a Table of Dates, Months etc)]:https://www.sommarskog.se/Short%20Stories/table-of-numbers.html From e931a12a12d23a0853e3de3c1a27b2486aa228d1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 6 Feb 2021 10:38:07 +0300 Subject: [PATCH 235/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 254fbcbd..1f2429c0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1340,6 +1340,7 @@ Articles types: | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-24 | [DBA][DEV] | | [Query Memory Grants and Resource Semaphores in SQL Server] | Klaus Aschenbrenner | 2018-10-16 | [DBA][DEV] | | [Using a Table of Numbers (or a Table of Dates, Months etc)] | Erland Sommarskog | 2020-09-16 | [DBA][DEV] | +| [SQL Server MDF and NDF files] | SQL Recovery | 2020-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2654,3 +2655,4 @@ Articles types: [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Query Memory Grants and Resource Semaphores in SQL Server]:https://www.sqlpassion.at/archive/2018/10/16/query-memory-grants-and-resource-semaphores-in-sql-server/ [Using a Table of Numbers (or a Table of Dates, Months etc)]:https://www.sommarskog.se/Short%20Stories/table-of-numbers.html +[SQL Server MDF and NDF files]:https://www.sqlrecoverysoftware.net/sql-server-mdf-file/recover-mdf-ndf.html From 6c5ec003ceef8231ce557ed96260e8429a7b117d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 8 Feb 2021 10:41:58 +0300 Subject: [PATCH 236/553] article +1 --- Articles/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 1f2429c0..82ffc3d6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1341,6 +1341,7 @@ Articles types: | [Query Memory Grants and Resource Semaphores in SQL Server] | Klaus Aschenbrenner | 2018-10-16 | [DBA][DEV] | | [Using a Table of Numbers (or a Table of Dates, Months etc)] | Erland Sommarskog | 2020-09-16 | [DBA][DEV] | | [SQL Server MDF and NDF files] | SQL Recovery | 2020-01-01 | [DBA][DEV] | +| [The SQL Standard ANSI ISO is Public!] | Markus Winand | 2020-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2656,3 +2657,5 @@ Articles types: [Query Memory Grants and Resource Semaphores in SQL Server]:https://www.sqlpassion.at/archive/2018/10/16/query-memory-grants-and-resource-semaphores-in-sql-server/ [Using a Table of Numbers (or a Table of Dates, Months etc)]:https://www.sommarskog.se/Short%20Stories/table-of-numbers.html [SQL Server MDF and NDF files]:https://www.sqlrecoverysoftware.net/sql-server-mdf-file/recover-mdf-ndf.html +[The SQL Standard ANSI ISO is Public!]:https://modern-sql.com/standard + \ No newline at end of file From 27fd4c121c0f7d6b2606ee2292205b6dc7ddf6a5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 9 Feb 2021 11:02:40 +0300 Subject: [PATCH 237/553] artile +1 --- Articles/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 82ffc3d6..f2088265 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1342,6 +1342,7 @@ Articles types: | [Using a Table of Numbers (or a Table of Dates, Months etc)] | Erland Sommarskog | 2020-09-16 | [DBA][DEV] | | [SQL Server MDF and NDF files] | SQL Recovery | 2020-01-01 | [DBA][DEV] | | [The SQL Standard ANSI ISO is Public!] | Markus Winand | 2020-01-01 | [DBA][DEV] | +| [SQL Server Full Backup] | Alexandr Omelchenko | 2015-10-28 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2658,4 +2659,4 @@ Articles types: [Using a Table of Numbers (or a Table of Dates, Months etc)]:https://www.sommarskog.se/Short%20Stories/table-of-numbers.html [SQL Server MDF and NDF files]:https://www.sqlrecoverysoftware.net/sql-server-mdf-file/recover-mdf-ndf.html [The SQL Standard ANSI ISO is Public!]:https://modern-sql.com/standard - \ No newline at end of file +[SQL Server Full Backup]:https://sqlbak.com/academy/full-backup From ce20da6418851d7e02577eeca9b542cc92f23ee3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 11 Feb 2021 11:05:22 +0300 Subject: [PATCH 238/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f2088265..cf535ac7 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1343,6 +1343,7 @@ Articles types: | [SQL Server MDF and NDF files] | SQL Recovery | 2020-01-01 | [DBA][DEV] | | [The SQL Standard ANSI ISO is Public!] | Markus Winand | 2020-01-01 | [DBA][DEV] | | [SQL Server Full Backup] | Alexandr Omelchenko | 2015-10-28 | [DBA][DEV] | +| [Import data from PDF files using R Scripts SQL Server] | Rajendra Gupta | 2020-12-08 | [R] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2660,3 +2661,4 @@ Articles types: [SQL Server MDF and NDF files]:https://www.sqlrecoverysoftware.net/sql-server-mdf-file/recover-mdf-ndf.html [The SQL Standard ANSI ISO is Public!]:https://modern-sql.com/standard [SQL Server Full Backup]:https://sqlbak.com/academy/full-backup +[Import data from PDF files using R Scripts SQL Server]:https://www.sqlshack.com/import-data-from-pdf-files-using-r-scripts-sql-server/ From 611095796a53e77703c7b07fc3c4fe68e93d5a72 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Fri, 12 Feb 2021 06:47:19 +0000 Subject: [PATCH 239/553] Trace flags - add 2019 CU9 fix for flags 11064 & 11068 When these are turned on with 876, you can end up with single-row rowgroups. --- SQL Server Trace Flag.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 1a62d7fd..d4cdc970 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5416,6 +5416,7 @@ Function: Improves the scalability of data loading operations into columnstore i For more information on loading data into a columnstore index, see [Columnstore indexes - Data loading guidance](https://docs.microsoft.com/en-gb/sql/relational-databases/indexes/columnstore-indexes-data-loading-guidance). **Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
+Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. Scope: global only @@ -5429,6 +5430,7 @@ For example, using this trace flag when loading 1,048,577 rows into a columnstor Without this trace flag, the insert operation would result in one compressed rowgroup.**
**Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
+Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. Scope: global only From 7dfb19972d3c082527b4f2051a02fe6949996052 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Fri, 12 Feb 2021 09:30:47 +0000 Subject: [PATCH 240/553] Update SQL Server Trace Flag.md Adding trace flags 11631 and 11634 for SQL 2019 CU9. --- SQL Server Trace Flag.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index d4cdc970..6c794d6d 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5433,6 +5433,20 @@ Link: [Docs Trace Flags]
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. Scope: global only + +#### Trace Flag: 11631 +Function: When reorganizing a columnstore index, use a threshold of 10% of the actual number of rows in the rowgroup. By default, without this trace flag, SQL Server uses 10% of a theoretical max of ~1M rows in the rowgroup, 100K rows, which meant that small rowgroups would never get reorganized. +**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**
+Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 +Scope: global only + + +#### Trace Flag: 11634 +Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag 11631, then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both 11631 and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup. +**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**
+Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 +Scope: global only + [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql [Query Store Trace Flags]:https://www.sqlskills.com/blogs/erin/query-store-trace-flags/ From 15488829a43c0cf159ac8d3d3f44c688438032a7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 13 Feb 2021 11:08:59 +0300 Subject: [PATCH 241/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index cf535ac7..cb0301f7 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1344,6 +1344,7 @@ Articles types: | [The SQL Standard ANSI ISO is Public!] | Markus Winand | 2020-01-01 | [DBA][DEV] | | [SQL Server Full Backup] | Alexandr Omelchenko | 2015-10-28 | [DBA][DEV] | | [Import data from PDF files using R Scripts SQL Server] | Rajendra Gupta | 2020-12-08 | [R] | +| [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2662,3 +2663,4 @@ Articles types: [The SQL Standard ANSI ISO is Public!]:https://modern-sql.com/standard [SQL Server Full Backup]:https://sqlbak.com/academy/full-backup [Import data from PDF files using R Scripts SQL Server]:https://www.sqlshack.com/import-data-from-pdf-files-using-r-scripts-sql-server/ +[Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ From bd825d53562a6841ef248bbdcec92b4933fc3762 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 14 Feb 2021 11:10:41 +0300 Subject: [PATCH 242/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index cb0301f7..15c10f39 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1345,6 +1345,7 @@ Articles types: | [SQL Server Full Backup] | Alexandr Omelchenko | 2015-10-28 | [DBA][DEV] | | [Import data from PDF files using R Scripts SQL Server] | Rajendra Gupta | 2020-12-08 | [R] | | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | +| [SQL Server Isolation Levels: A Series] | Paul White | 2014-07-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2664,3 +2665,4 @@ Articles types: [SQL Server Full Backup]:https://sqlbak.com/academy/full-backup [Import data from PDF files using R Scripts SQL Server]:https://www.sqlshack.com/import-data-from-pdf-files-using-r-scripts-sql-server/ [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ +[SQL Server Isolation Levels: A Series]:https://sqlperformance.com/2014/07/t-sql-queries/isolation-levels From 0f6cf2b5b494bcb8ad20af30812d553d5cd8743d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 15 Feb 2021 11:12:11 +0300 Subject: [PATCH 243/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 15c10f39..4276a6f2 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1346,6 +1346,7 @@ Articles types: | [Import data from PDF files using R Scripts SQL Server] | Rajendra Gupta | 2020-12-08 | [R] | | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [SQL Server Isolation Levels: A Series] | Paul White | 2014-07-01 | [DBA][DEV] | +| [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions] | Paul White | 2014-02-27 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2666,3 +2667,4 @@ Articles types: [Import data from PDF files using R Scripts SQL Server]:https://www.sqlshack.com/import-data-from-pdf-files-using-r-scripts-sql-server/ [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ [SQL Server Isolation Levels: A Series]:https://sqlperformance.com/2014/07/t-sql-queries/isolation-levels +[SQL Server Isolation Levels: The ACID Properties of Statements & Transactions]:https://sqlperformance.com/2014/02/t-sql-queries/confusion-caused-by-trusting-acid From 6eae798bdb9d04c3af8fd1ee3aa5243c06b2a48a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 16 Feb 2021 11:15:00 +0300 Subject: [PATCH 244/553] add must read artilce --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 4276a6f2..376247dd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1347,6 +1347,7 @@ Articles types: | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [SQL Server Isolation Levels: A Series] | Paul White | 2014-07-01 | [DBA][DEV] | | [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions] | Paul White | 2014-02-27 | [DBA][DEV] | +| [SQL Server Isolation Levels: SQL Server Isolation Levels: The Serializable Isolation Level] | Paul White | 2014-04-10 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2668,3 +2669,4 @@ Articles types: [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ [SQL Server Isolation Levels: A Series]:https://sqlperformance.com/2014/07/t-sql-queries/isolation-levels [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions]:https://sqlperformance.com/2014/02/t-sql-queries/confusion-caused-by-trusting-acid +[SQL Server Isolation Levels: The Serializable Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-serializable-isolation-level From 9fb2941622d83f2908c4554250017e8b3045a9c2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 17 Feb 2021 11:16:47 +0300 Subject: [PATCH 245/553] add must read article --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 376247dd..4d7bf686 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1347,7 +1347,8 @@ Articles types: | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [SQL Server Isolation Levels: A Series] | Paul White | 2014-07-01 | [DBA][DEV] | | [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions] | Paul White | 2014-02-27 | [DBA][DEV] | -| [SQL Server Isolation Levels: SQL Server Isolation Levels: The Serializable Isolation Level] | Paul White | 2014-04-10 | [DBA][DEV] | +| [SQL Server Isolation Levels: The Serializable Isolation Level] | Paul White | 2014-04-10 | [DBA][DEV] | +| [SQL Server Isolation Levels: The Repeatable Read Isolation Level] | Paul White | 2014-04-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2670,3 +2671,4 @@ Articles types: [SQL Server Isolation Levels: A Series]:https://sqlperformance.com/2014/07/t-sql-queries/isolation-levels [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions]:https://sqlperformance.com/2014/02/t-sql-queries/confusion-caused-by-trusting-acid [SQL Server Isolation Levels: The Serializable Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-serializable-isolation-level +[SQL Server Isolation Levels: The Repeatable Read Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-repeatable-read-isolation-level From 79640cd378720beea04e9e988b73ad9ee6c37141 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 19 Feb 2021 11:34:19 +0300 Subject: [PATCH 246/553] add must read article --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 4d7bf686..e4c0727f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1349,6 +1349,8 @@ Articles types: | [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions] | Paul White | 2014-02-27 | [DBA][DEV] | | [SQL Server Isolation Levels: The Serializable Isolation Level] | Paul White | 2014-04-10 | [DBA][DEV] | | [SQL Server Isolation Levels: The Repeatable Read Isolation Level] | Paul White | 2014-04-15 | [DBA][DEV] | +| [SQL Server Isolation Levels: The Read Committed Isolation Level] | Paul White | 2014-04-22 | [DBA][DEV] | +| [SQL Server Isolation Levels: Read Committed Snapshot Isolation] | Paul White | 2014-05-07 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2672,3 +2674,5 @@ Articles types: [SQL Server Isolation Levels: The ACID Properties of Statements & Transactions]:https://sqlperformance.com/2014/02/t-sql-queries/confusion-caused-by-trusting-acid [SQL Server Isolation Levels: The Serializable Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-serializable-isolation-level [SQL Server Isolation Levels: The Repeatable Read Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-repeatable-read-isolation-level +[SQL Server Isolation Levels: The Read Committed Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-read-committed-isolation-level +[SQL Server Isolation Levels: Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/read-committed-snapshot-isolation From e9eab422adc0bb8c3467c24d19b65675eb4b4c99 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 20 Feb 2021 11:36:47 +0300 Subject: [PATCH 247/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e4c0727f..8ee010b6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1351,6 +1351,7 @@ Articles types: | [SQL Server Isolation Levels: The Repeatable Read Isolation Level] | Paul White | 2014-04-15 | [DBA][DEV] | | [SQL Server Isolation Levels: The Read Committed Isolation Level] | Paul White | 2014-04-22 | [DBA][DEV] | | [SQL Server Isolation Levels: Read Committed Snapshot Isolation] | Paul White | 2014-05-07 | [DBA][DEV] | +| [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation] | Paul White | 2014-05-14 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2676,3 +2677,4 @@ Articles types: [SQL Server Isolation Levels: The Repeatable Read Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-repeatable-read-isolation-level [SQL Server Isolation Levels: The Read Committed Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-read-committed-isolation-level [SQL Server Isolation Levels: Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/read-committed-snapshot-isolation +[SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/data-modifications-under-rcsi \ No newline at end of file From a4000d0c4721334fe7ab2a5e593da93b501fb188 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 21 Feb 2021 11:38:46 +0300 Subject: [PATCH 248/553] add must read article --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 8ee010b6..2b31cdf3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1352,6 +1352,7 @@ Articles types: | [SQL Server Isolation Levels: The Read Committed Isolation Level] | Paul White | 2014-04-22 | [DBA][DEV] | | [SQL Server Isolation Levels: Read Committed Snapshot Isolation] | Paul White | 2014-05-07 | [DBA][DEV] | | [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation] | Paul White | 2014-05-14 | [DBA][DEV] | +| [SQL Server Isolation Levels: The SNAPSHOT Isolation Level] | Paul White | 2014-06-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2677,4 +2678,5 @@ Articles types: [SQL Server Isolation Levels: The Repeatable Read Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-repeatable-read-isolation-level [SQL Server Isolation Levels: The Read Committed Isolation Level]:https://sqlperformance.com/2014/04/t-sql-queries/the-read-committed-isolation-level [SQL Server Isolation Levels: Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/read-committed-snapshot-isolation -[SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/data-modifications-under-rcsi \ No newline at end of file +[SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/data-modifications-under-rcsi +[SQL Server Isolation Levels: The SNAPSHOT Isolation Level]:https://sqlperformance.com/2014/06/sql-performance/the-snapshot-isolation-level From 3e0ab9f7418c8cef722d9a4591f52b3798d18048 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Feb 2021 11:40:24 +0300 Subject: [PATCH 249/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2b31cdf3..af19d28e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1353,6 +1353,7 @@ Articles types: | [SQL Server Isolation Levels: Read Committed Snapshot Isolation] | Paul White | 2014-05-07 | [DBA][DEV] | | [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation] | Paul White | 2014-05-14 | [DBA][DEV] | | [SQL Server Isolation Levels: The SNAPSHOT Isolation Level] | Paul White | 2014-06-30 | [DBA][DEV] | +| [SQL Server Isolation Levels: The Read Uncommitted Isolation Level] | Paul White | 2015-04-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2680,3 +2681,4 @@ Articles types: [SQL Server Isolation Levels: Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/read-committed-snapshot-isolation [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/data-modifications-under-rcsi [SQL Server Isolation Levels: The SNAPSHOT Isolation Level]:https://sqlperformance.com/2014/06/sql-performance/the-snapshot-isolation-level +[SQL Server Isolation Levels: The Read Uncommitted Isolation Level]:https://sqlperformance.com/2015/04/t-sql-queries/the-read-uncommitted-isolation-level From 8b0a089b0692b55460a6daf710ecf291d10fa6af Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 23 Feb 2021 11:42:16 +0300 Subject: [PATCH 250/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index af19d28e..f08a6a77 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1354,6 +1354,7 @@ Articles types: | [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation] | Paul White | 2014-05-14 | [DBA][DEV] | | [SQL Server Isolation Levels: The SNAPSHOT Isolation Level] | Paul White | 2014-06-30 | [DBA][DEV] | | [SQL Server Isolation Levels: The Read Uncommitted Isolation Level] | Paul White | 2015-04-23 | [DBA][DEV] | +| [The OUTPUT Clause for the MERGE Statements] | Amarendra Reddy Thummeti | 2019-03-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2682,3 +2683,4 @@ Articles types: [SQL Server Isolation Levels: Data Modifications under Read Committed Snapshot Isolation]:https://sqlperformance.com/2014/05/t-sql-queries/data-modifications-under-rcsi [SQL Server Isolation Levels: The SNAPSHOT Isolation Level]:https://sqlperformance.com/2014/06/sql-performance/the-snapshot-isolation-level [SQL Server Isolation Levels: The Read Uncommitted Isolation Level]:https://sqlperformance.com/2015/04/t-sql-queries/the-read-uncommitted-isolation-level +[The OUTPUT Clause for the MERGE Statements]:https://www.sqlservercentral.com/articles/the-output-clause-for-the-merge-statements From 398aa3f560680efd872ac0f1e3f7f4c78d14a6d0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 24 Feb 2021 11:44:14 +0300 Subject: [PATCH 251/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f08a6a77..f93d5a0a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1355,6 +1355,7 @@ Articles types: | [SQL Server Isolation Levels: The SNAPSHOT Isolation Level] | Paul White | 2014-06-30 | [DBA][DEV] | | [SQL Server Isolation Levels: The Read Uncommitted Isolation Level] | Paul White | 2015-04-23 | [DBA][DEV] | | [The OUTPUT Clause for the MERGE Statements] | Amarendra Reddy Thummeti | 2019-03-08 | [DBA][DEV] | +| [SQLskills SQL101: Query plans based on what’s in memory] | Paul Randal | 2017-03-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2684,3 +2685,4 @@ Articles types: [SQL Server Isolation Levels: The SNAPSHOT Isolation Level]:https://sqlperformance.com/2014/06/sql-performance/the-snapshot-isolation-level [SQL Server Isolation Levels: The Read Uncommitted Isolation Level]:https://sqlperformance.com/2015/04/t-sql-queries/the-read-uncommitted-isolation-level [The OUTPUT Clause for the MERGE Statements]:https://www.sqlservercentral.com/articles/the-output-clause-for-the-merge-statements +[SQLskills SQL101: Query plans based on what’s in memory]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-query-plans-based-on-whats-in-memory/ From 95cc93ab35f14514ef824ea24a43b170c1f44e12 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 25 Feb 2021 11:46:09 +0300 Subject: [PATCH 252/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f93d5a0a..ab90ab0c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1356,6 +1356,7 @@ Articles types: | [SQL Server Isolation Levels: The Read Uncommitted Isolation Level] | Paul White | 2015-04-23 | [DBA][DEV] | | [The OUTPUT Clause for the MERGE Statements] | Amarendra Reddy Thummeti | 2019-03-08 | [DBA][DEV] | | [SQLskills SQL101: Query plans based on what’s in memory] | Paul Randal | 2017-03-03 | [DBA][DEV] | +| [Performance: String Concatenation in SQL Server] | Steve Stedman | 2021-01-25 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2686,3 +2687,4 @@ Articles types: [SQL Server Isolation Levels: The Read Uncommitted Isolation Level]:https://sqlperformance.com/2015/04/t-sql-queries/the-read-uncommitted-isolation-level [The OUTPUT Clause for the MERGE Statements]:https://www.sqlservercentral.com/articles/the-output-clause-for-the-merge-statements [SQLskills SQL101: Query plans based on what’s in memory]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-query-plans-based-on-whats-in-memory/ +[Performance: String Concatenation in SQL Server]:https://stevestedman.com/2021/01/performance-string-concatenation-in-sql-server/ From d2491a1f84e1d7a70fddb8ee80619abc4cc475c4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 26 Feb 2021 11:50:10 +0300 Subject: [PATCH 253/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ab90ab0c..beb3cb9a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1357,6 +1357,7 @@ Articles types: | [The OUTPUT Clause for the MERGE Statements] | Amarendra Reddy Thummeti | 2019-03-08 | [DBA][DEV] | | [SQLskills SQL101: Query plans based on what’s in memory] | Paul Randal | 2017-03-03 | [DBA][DEV] | | [Performance: String Concatenation in SQL Server] | Steve Stedman | 2021-01-25 | [DBA][DEV] | +| [Performance: Faster way to concatenate longer string] | Steve Stedman | 2021-01-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2688,3 +2689,4 @@ Articles types: [The OUTPUT Clause for the MERGE Statements]:https://www.sqlservercentral.com/articles/the-output-clause-for-the-merge-statements [SQLskills SQL101: Query plans based on what’s in memory]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-query-plans-based-on-whats-in-memory/ [Performance: String Concatenation in SQL Server]:https://stevestedman.com/2021/01/performance-string-concatenation-in-sql-server/ +[Performance: Faster way to concatenate longer string]:https://stevestedman.com/2021/01/performance-faster-way-to-concatenate-longer-string/ From 2473634623d4f7d74633b654704837afa091d059 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 27 Feb 2021 11:59:08 +0300 Subject: [PATCH 254/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index beb3cb9a..07263101 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1358,6 +1358,7 @@ Articles types: | [SQLskills SQL101: Query plans based on what’s in memory] | Paul Randal | 2017-03-03 | [DBA][DEV] | | [Performance: String Concatenation in SQL Server] | Steve Stedman | 2021-01-25 | [DBA][DEV] | | [Performance: Faster way to concatenate longer string] | Steve Stedman | 2021-01-26 | [DBA][DEV] | +| [Identifying Cost-Saving Opportunities in Azure DevOps] | Eric Smith | 2020-04-28 | [Az] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2690,3 +2691,4 @@ Articles types: [SQLskills SQL101: Query plans based on what’s in memory]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-query-plans-based-on-whats-in-memory/ [Performance: String Concatenation in SQL Server]:https://stevestedman.com/2021/01/performance-string-concatenation-in-sql-server/ [Performance: Faster way to concatenate longer string]:https://stevestedman.com/2021/01/performance-faster-way-to-concatenate-longer-string/ +[Identifying Cost-Saving Opportunities in Azure DevOps]:https://www.sentryone.com/blog/cost-savings-in-azuredevops From 1f35407d7f303e9733d24ccbbd60a23f0412b016 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 28 Feb 2021 12:01:18 +0300 Subject: [PATCH 255/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 07263101..b6300aaf 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1359,6 +1359,7 @@ Articles types: | [Performance: String Concatenation in SQL Server] | Steve Stedman | 2021-01-25 | [DBA][DEV] | | [Performance: Faster way to concatenate longer string] | Steve Stedman | 2021-01-26 | [DBA][DEV] | | [Identifying Cost-Saving Opportunities in Azure DevOps] | Eric Smith | 2020-04-28 | [Az] | +| [One wide index or multiple narrow indexes?] | Gail Shaw | 2010-09-14 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2692,3 +2693,4 @@ Articles types: [Performance: String Concatenation in SQL Server]:https://stevestedman.com/2021/01/performance-string-concatenation-in-sql-server/ [Performance: Faster way to concatenate longer string]:https://stevestedman.com/2021/01/performance-faster-way-to-concatenate-longer-string/ [Identifying Cost-Saving Opportunities in Azure DevOps]:https://www.sentryone.com/blog/cost-savings-in-azuredevops +[One wide index or multiple narrow indexes?]:https://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/ From d3f5d8f06e8df2a99552d7fc6705eed0091798f7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 1 Mar 2021 01:13:18 +0300 Subject: [PATCH 256/553] Add sp_HumanEvents --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b9261561..16ba490c 100644 --- a/README.md +++ b/README.md @@ -376,6 +376,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [AwesomeSQLServer - collection of SQL Server Queries and documentations to fix your SQL Server's bottle neck](https://github.com/SQLadmin/AwesomeSQLServer) (by SqlAdmin) - [databases_scripts - SQL Server useful scripts](https://github.com/dgavrikov/databases_scripts/tree/master/SQL%20Server) (by Dmitriy Gavrikov) - [sp_pressure_detector - stored procedure for quickly detecting CPU and Memory pressure on a SQL Server](https://github.com/erikdarlingdata/DarlingData/blob/master/sp_pressure_detector/sp_pressure_detector.sql) (by Erik Darling) + - [sp_HumanEvents - make Extended Events easier and more approachable for the average admin to troubleshoot common scenarios](https://www.erikdarlingdata.com/sp_humanevents/) (by Erik Darling) - [Export Prometheus metrics from SQL queries](https://github.com/albertodonato/query-exporter) (by Alberto Donato) - [homebrew-mssql-release - brew formulae for Microsoft ODBC Driver for SQL Server and SQL Server Command Line Utilities](https://github.com/microsoft/homebrew-mssql-release) (by Microsoft) - [ASSP - Analysis Services Stored Procedure Project](https://asstoredprocedures.github.io/ASStoredProcedures/) (by Darren Gosbell) From 40d5f7ab625e340264ce7f8eb2064687d128019e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 2 Mar 2021 12:14:10 +0300 Subject: [PATCH 257/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b6300aaf..5eaa30d8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1360,6 +1360,7 @@ Articles types: | [Performance: Faster way to concatenate longer string] | Steve Stedman | 2021-01-26 | [DBA][DEV] | | [Identifying Cost-Saving Opportunities in Azure DevOps] | Eric Smith | 2020-04-28 | [Az] | | [One wide index or multiple narrow indexes?] | Gail Shaw | 2010-09-14 | [DBA][DEV] | +| [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2018-09-04 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2694,3 +2695,4 @@ Articles types: [Performance: Faster way to concatenate longer string]:https://stevestedman.com/2021/01/performance-faster-way-to-concatenate-longer-string/ [Identifying Cost-Saving Opportunities in Azure DevOps]:https://www.sentryone.com/blog/cost-savings-in-azuredevops [One wide index or multiple narrow indexes?]:https://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/ +[The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups]:https://www.apress.com/de/blog/all-blog-posts/readable-secondaries-in-sql-server/16064064 From 68253f767858f4add549ec0b5f94bb0c406cb1d0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 3 Mar 2021 14:32:24 +0300 Subject: [PATCH 258/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5eaa30d8..444e5e5a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1361,6 +1361,7 @@ Articles types: | [Identifying Cost-Saving Opportunities in Azure DevOps] | Eric Smith | 2020-04-28 | [Az] | | [One wide index or multiple narrow indexes?] | Gail Shaw | 2010-09-14 | [DBA][DEV] | | [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2018-09-04 | [DBA] | +| [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-08 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2696,3 +2697,4 @@ Articles types: [Identifying Cost-Saving Opportunities in Azure DevOps]:https://www.sentryone.com/blog/cost-savings-in-azuredevops [One wide index or multiple narrow indexes?]:https://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/ [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups]:https://www.apress.com/de/blog/all-blog-posts/readable-secondaries-in-sql-server/16064064 +[When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ From b08b84869873761159d5a5c4b184174d7f6a3b8a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 4 Mar 2021 14:34:41 +0300 Subject: [PATCH 259/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 444e5e5a..06c661ea 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1362,6 +1362,7 @@ Articles types: | [One wide index or multiple narrow indexes?] | Gail Shaw | 2010-09-14 | [DBA][DEV] | | [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2018-09-04 | [DBA] | | [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-08 | [DBA] | +| [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2698,3 +2699,4 @@ Articles types: [One wide index or multiple narrow indexes?]:https://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/ [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups]:https://www.apress.com/de/blog/all-blog-posts/readable-secondaries-in-sql-server/16064064 [When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ +[Poor Man’s Resource Governor: Database-Scoped Configurations]:https://www.brentozar.com/archive/2020/10/poor-mans-resource-governor-database-scoped-configurations/ From 973835fb272e0d0658090e748f7fa134a4fabc7d Mon Sep 17 00:00:00 2001 From: Konstantin Semenenkov Date: Thu, 4 Mar 2021 16:20:48 -0500 Subject: [PATCH 260/553] Updated type, price, release date for MssqlMerge corresponds to the latest v 1.19.3 from 2021-02-26 --- Utilities/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/README.md b/Utilities/README.md index f1f91620..745f2026 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -390,7 +390,7 @@ Utility types (main purpose), in braces `{}` current counts: | [CloudMonix SQL Azure Database Management](#cloudmonix-azure-man)| No | No | [?] | [CloudMonix SQL Azure Database Management] | ? | CloudMonix | | No | $15 | | [DB Ghost Change Manager Professional](#db-ghost-change-manager) | No | No | [?] | [DB Ghost Change Manager Professional] | ? | Innovartis Ltd | | No | £430 | | [MSSQL-Maestro](#mssql-maestro) | No | No | [MS] | [MSSQL-Maestro] | 2017-06-29 | SQL Maestro Group | | No | $229 | -| [MSSQLMerge](#mssqlmerge) | No | No | [?] | [MSSQLMerge] | ? | Konstantin Semenenkov | | Yes | $50 | +| [MSSQLMerge](#mssqlmerge) | No | No | [DC],[SC]| [MSSQLMerge] | 2021-02-26 | Konstantin Semenenkov | | Yes | $75 | | [SQL Backup and FTP](#sql-backup-and-ftp) | MySQL,PostgreSQL | Linux | [B] | [SQL Backup and FTP] | ? | Pranas.NET | | Yes | $129 | | [SQL Bak](#sql-bak) | MySQL,PostgreSQL | Linux | [B] | [SQL Bak] | ? | Pranas.NET | | Yes | $9 | | [SQL Bulk Tools](#sql-bulk-tools) | No | No | [?] | [SQL Bulk Tools] | ? | Greg Taylor | [MIT] | Open Source | No | From 1084be1cd3e58f4a62e2a0be1f693cea9c2e83f8 Mon Sep 17 00:00:00 2001 From: Konstantin Semenenkov Date: Thu, 4 Mar 2021 16:27:57 -0500 Subject: [PATCH 261/553] Updated type, price, release date for MssqlMerge item description --- Utilities/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/README.md b/Utilities/README.md index 745f2026..442672de 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -5708,11 +5708,11 @@ Complete and powerful database management, admin and development tool for Micros ## MSSQLMerge Download page: [MSSQLMerge]
-Release date: ?
+Release date: 2021-02-26
Support Version: 2008-2019, Azure
Author: Konstantin Semenenkov
Free version: Yes
-Price: $50 +Price: $75 MssqlMerge is an easy to use diff & merge tool for Microsoft SQL Server databases. This tool allows users to compare and import/export the most common database programming objects and the data between any two databases. From 31756d6783ced7a4c2642890ba5b25ba8d5027cf Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 6 Mar 2021 14:36:40 +0300 Subject: [PATCH 262/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 06c661ea..cf55616a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1363,6 +1363,7 @@ Articles types: | [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2018-09-04 | [DBA] | | [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-08 | [DBA] | | [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | +| [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2700,3 +2701,4 @@ Articles types: [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups]:https://www.apress.com/de/blog/all-blog-posts/readable-secondaries-in-sql-server/16064064 [When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ [Poor Man’s Resource Governor: Database-Scoped Configurations]:https://www.brentozar.com/archive/2020/10/poor-mans-resource-governor-database-scoped-configurations/ +[SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.]:https://www.brentozar.com/archive/2020/09/sql-server-suddenly-frozen-you-might-be-snapshotting-too-many-databases/ From 05659d4138184d85b946d62017ad126783ab29de Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 7 Mar 2021 14:38:25 +0300 Subject: [PATCH 263/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index cf55616a..8d03964a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1364,6 +1364,7 @@ Articles types: | [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-08 | [DBA] | | [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | | [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | +| [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2702,3 +2703,4 @@ Articles types: [When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ [Poor Man’s Resource Governor: Database-Scoped Configurations]:https://www.brentozar.com/archive/2020/10/poor-mans-resource-governor-database-scoped-configurations/ [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.]:https://www.brentozar.com/archive/2020/09/sql-server-suddenly-frozen-you-might-be-snapshotting-too-many-databases/ +[How to Batch Updates A Few Thousand Rows at a Time]:https://www.brentozar.com/archive/2020/12/how-to-batch-updates-a-few-thousand-rows-at-a-time/ From 4f37140a6e0bf36db0f5a084698d27ce755166a1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 8 Mar 2021 14:40:14 +0300 Subject: [PATCH 264/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 8d03964a..73994828 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1365,6 +1365,7 @@ Articles types: | [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | | [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | | [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | +| [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2704,3 +2705,4 @@ Articles types: [Poor Man’s Resource Governor: Database-Scoped Configurations]:https://www.brentozar.com/archive/2020/10/poor-mans-resource-governor-database-scoped-configurations/ [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.]:https://www.brentozar.com/archive/2020/09/sql-server-suddenly-frozen-you-might-be-snapshotting-too-many-databases/ [How to Batch Updates A Few Thousand Rows at a Time]:https://www.brentozar.com/archive/2020/12/how-to-batch-updates-a-few-thousand-rows-at-a-time/ +[The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ From 52a23cd6178139c1a16e8cdfc9f8e7d84ecc6f60 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 9 Mar 2021 14:56:21 +0300 Subject: [PATCH 265/553] Update XE_Truncate --- Extended_Events/XE_Truncate.sql | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Extended_Events/XE_Truncate.sql diff --git a/Extended_Events/XE_Truncate.sql b/Extended_Events/XE_Truncate.sql new file mode 100644 index 00000000..5289f428 --- /dev/null +++ b/Extended_Events/XE_Truncate.sql @@ -0,0 +1,23 @@ +/* +https://www.sqlservercentral.com/forums/topic/extended-events-capture-truncate-using-object_altered-event +by Evgeny Garaev 2018-06-28 +*/ + +/* Stop trace if started */ +IF EXISTS (SELECT * FROM sys.dm_xe_sessions WHERE name = N'XE_Truncate') + ALTER EVENT SESSION XE_Truncate ON SERVER STATE = STOP; + +/* Delete trace if exists */ +IF EXISTS (SELECT * FROM sys.server_event_sessions WHERE name = N'XE_Truncate') + DROP EVENT SESSION XE_Truncate ON SERVER; + + +CREATE EVENT SESSION XE_Truncate ON SERVER +ADD EVENT sqlserver.sp_statement_starting(SET collect_statement=(1) +WHERE ([sqlserver].[like_i_sql_unicode_string]([statement], N'truncate table%'))), +ADD EVENT sqlserver.sql_statement_starting(SET collect_statement=(1) +WHERE ([sqlserver].[like_i_sql_unicode_string]([statement],N'truncate table%'))); +GO + +ALTER EVENT SESSION XE_Truncate ON SERVER STATE = START; +GO From 79d8845e64daea465c9180ec0d72b686d3308281 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 10 Mar 2021 14:57:07 +0300 Subject: [PATCH 266/553] Update XE SchemaQueryByUser --- Extended_Events/SchemaQueryByUser.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extended_Events/SchemaQueryByUser.sql b/Extended_Events/SchemaQueryByUser.sql index 18de9a75..648f3283 100644 --- a/Extended_Events/SchemaQueryByUser.sql +++ b/Extended_Events/SchemaQueryByUser.sql @@ -9,12 +9,12 @@ IF EXISTS (SELECT * FROM sys.dm_xe_sessions WHERE name = 'SchemaQueryByUser') /* Delete trace if exists */ IF EXISTS (SELECT * FROM sys.server_event_sessions WHERE name = 'SchemaQueryByUser') - DROP EVENT SESSION AppExecutionTimeout ON SERVER; + DROP EVENT SESSION SchemaQueryByUser ON SERVER; /* Create trace */ CREATE EVENT SESSION SchemaQueryByUser ON SERVER ADD EVENT sqlserver.sql_batch_completed(SET collect_batch_text=(1) - ACTION(sqlserver.database_name,sqlserver.session_server_principal_name) + ACTION(sqlserver.database_name, sqlserver.session_server_principal_name) WHERE ((((((((NOT ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[session_server_principal_name],N'EZCORP\Y%'))) AND (([sqlserver].[like_i_sql_unicode_string]([batch_text],N'%%')) OR ([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[database_name],N'')))) From 51ccb46464fbc551f87fa0ae0e84f0888d41c956 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 11 Mar 2021 18:14:08 +0300 Subject: [PATCH 267/553] Update 8048 info Great thanks to Eric Darling --- SQL Server Trace Flag.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 6c794d6d..18f8b202 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3900,7 +3900,9 @@ Link: http://www.sqlservergeeks.com/blogs/AmitBansal/sql-server-bi/64/sql-server #### Trace Flag: 8048 -**Note: Beginning with SQL Server 2014 SP2 and SQL Server 2016 this behavior is controlled by the engine and trace flag 8048 has no effect.**
+According [Docs Trace Flags]: Beginning with SQL Server 2014 SP2 and SQL Server 2016 this behavior is controlled by the engine and trace flag 8048 has no effect.
+**BUT [according SQL Server ultra expert Erik Darling](https://github.com/ktaranov/sqlserver-kit/issues/195): The trace flag does still has effect. The engine behavior will partition memory if `CMEMTHREAD` contention is detected. Turning on TF 8048 forces the partitioning without having to hit the internal thresholds. +I trust Eric's opinion (and bold it).**
Function: Converts NUMA partitioned memory objects into CPU partitioned
Link: http://sql-sasquatch.blogspot.se/2013/04/startup-trace-flags-i-love.html
Link: https://support.microsoft.com/kb/2809338
From b2715e198e954ba12511840c500ff481cf370965 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 12 Mar 2021 15:49:41 +0300 Subject: [PATCH 268/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 73994828..6f2c5fb8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1366,6 +1366,7 @@ Articles types: | [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | | [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | | [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | +| [Using Amazon Fsx For Sql Server Failover Cluster Instances – What You Need To Know!] | Dave Berm | 2020-01-24 | [AMZ] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2706,3 +2707,4 @@ Articles types: [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.]:https://www.brentozar.com/archive/2020/09/sql-server-suddenly-frozen-you-might-be-snapshotting-too-many-databases/ [How to Batch Updates A Few Thousand Rows at a Time]:https://www.brentozar.com/archive/2020/12/how-to-batch-updates-a-few-thousand-rows-at-a-time/ [The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ +[USING AMAZON FSX FOR SQL SERVER FAILOVER CLUSTER INSTANCES – WHAT YOU NEED TO KNOW!]:https://clusteringformeremortals.com/2021/01/08/using-amazon-fsx-for-sql-server-failover-cluster-instances-what-you-need-to-know/ From fec0282584d8143b6460a4d068b312b127893c55 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 13 Mar 2021 15:51:54 +0300 Subject: [PATCH 269/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 6f2c5fb8..5171f82c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1367,6 +1367,7 @@ Articles types: | [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | | [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | | [Using Amazon Fsx For Sql Server Failover Cluster Instances – What You Need To Know!] | Dave Berm | 2020-01-24 | [AMZ] | +| [Sometimes you CAN upsize a column in-place] | Aaron Bertrand | 2020-08-19 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2708,3 +2709,4 @@ Articles types: [How to Batch Updates A Few Thousand Rows at a Time]:https://www.brentozar.com/archive/2020/12/how-to-batch-updates-a-few-thousand-rows-at-a-time/ [The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ [USING AMAZON FSX FOR SQL SERVER FAILOVER CLUSTER INSTANCES – WHAT YOU NEED TO KNOW!]:https://clusteringformeremortals.com/2021/01/08/using-amazon-fsx-for-sql-server-failover-cluster-instances-what-you-need-to-know/ +[Sometimes you CAN upsize a column in-place]:https://sqlperformance.com/2020/08/sql-indexes/upsize-column-in-place From 97ecd97abca877488818321792758297f99a4f80 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 14 Mar 2021 15:53:23 +0300 Subject: [PATCH 270/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5171f82c..51d76a50 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1368,6 +1368,7 @@ Articles types: | [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | | [Using Amazon Fsx For Sql Server Failover Cluster Instances – What You Need To Know!] | Dave Berm | 2020-01-24 | [AMZ] | | [Sometimes you CAN upsize a column in-place] | Aaron Bertrand | 2020-08-19 | [DBA] | +| [Which Microsoft Certification Should You Get?] | Brent Ozar | 2021-01-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2710,3 +2711,4 @@ Articles types: [The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ [USING AMAZON FSX FOR SQL SERVER FAILOVER CLUSTER INSTANCES – WHAT YOU NEED TO KNOW!]:https://clusteringformeremortals.com/2021/01/08/using-amazon-fsx-for-sql-server-failover-cluster-instances-what-you-need-to-know/ [Sometimes you CAN upsize a column in-place]:https://sqlperformance.com/2020/08/sql-indexes/upsize-column-in-place +[Which Microsoft Certification Should You Get?]:https://www.brentozar.com/archive/2021/01/which-microsoft-certification-should-you-get/ From 058ee3ada74dc8ba31e1a133e5c18a985cff6546 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 15 Mar 2021 16:32:59 +0300 Subject: [PATCH 271/553] Add Community 1nn0va Youtube channel --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 16ba490c..25aa01df 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [TechEd SQL Server Videos](https://channel9.msdn.com/Search?term=sql%20server&lang-en=true) - [Build 2018 conference](http://sqlservercode.blogspot.ru/2018/05/azure-sql-data-warehouse-azure-sql.html) - [New Stars of Data SQL Server Video](https://www.youtube.com/playlist?list=PLLq_tkpMFDU5ibrnqn6I8CZxZ2-zYWG9m) + - [Youtube Community 1nn0va](https://www.youtube.com/c/Community1nn0va/videos) (by Community 1nn0va) - Free Database Podcasts - [SQL Server Radio](http://www.sqlserverradio.com/) (by Guy Glantser and Matan Yungman) - [SQL Data Partners](http://sqldatapartners.com/podcast/) (by Carlos L Chacon, César Oviedo and Adrian Miranda) From 121ec16e524e4a60004ae6ea704465c9b121289e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 17 Mar 2021 15:55:43 +0300 Subject: [PATCH 272/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 51d76a50..0153fc09 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1369,6 +1369,7 @@ Articles types: | [Using Amazon Fsx For Sql Server Failover Cluster Instances – What You Need To Know!] | Dave Berm | 2020-01-24 | [AMZ] | | [Sometimes you CAN upsize a column in-place] | Aaron Bertrand | 2020-08-19 | [DBA] | | [Which Microsoft Certification Should You Get?] | Brent Ozar | 2021-01-04 | [DBA][DEV] | +| [SQL Server RAISERROR Cheatsheet] | Chad Baldwin | 2021-01-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2712,3 +2713,4 @@ Articles types: [USING AMAZON FSX FOR SQL SERVER FAILOVER CLUSTER INSTANCES – WHAT YOU NEED TO KNOW!]:https://clusteringformeremortals.com/2021/01/08/using-amazon-fsx-for-sql-server-failover-cluster-instances-what-you-need-to-know/ [Sometimes you CAN upsize a column in-place]:https://sqlperformance.com/2020/08/sql-indexes/upsize-column-in-place [Which Microsoft Certification Should You Get?]:https://www.brentozar.com/archive/2021/01/which-microsoft-certification-should-you-get/ +[SQL Server RAISERROR Cheatsheet]:https://chadbaldwin.net/2021/01/15/raiserror-cheatsheet.html From 463e0ad4330f31be8a014e5c50a732a40cf90129 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 18 Mar 2021 15:58:38 +0300 Subject: [PATCH 273/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0153fc09..7a53401c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1370,6 +1370,7 @@ Articles types: | [Sometimes you CAN upsize a column in-place] | Aaron Bertrand | 2020-08-19 | [DBA] | | [Which Microsoft Certification Should You Get?] | Brent Ozar | 2021-01-04 | [DBA][DEV] | | [SQL Server RAISERROR Cheatsheet] | Chad Baldwin | 2021-01-15 | [DBA][DEV] | +| [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.] | Brent Ozar | 2021-01-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2714,3 +2715,4 @@ Articles types: [Sometimes you CAN upsize a column in-place]:https://sqlperformance.com/2020/08/sql-indexes/upsize-column-in-place [Which Microsoft Certification Should You Get?]:https://www.brentozar.com/archive/2021/01/which-microsoft-certification-should-you-get/ [SQL Server RAISERROR Cheatsheet]:https://chadbaldwin.net/2021/01/15/raiserror-cheatsheet.html +[Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.]:https://www.brentozar.com/archive/2021/01/want-to-avoid-deployment-downtime-replication-probably-isnt-the-answer/ From 305dd22721fb4996bf3e054c7c2e5b0ba883ad3f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 20 Mar 2021 16:00:30 +0300 Subject: [PATCH 274/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 7a53401c..a9110a9d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1371,6 +1371,7 @@ Articles types: | [Which Microsoft Certification Should You Get?] | Brent Ozar | 2021-01-04 | [DBA][DEV] | | [SQL Server RAISERROR Cheatsheet] | Chad Baldwin | 2021-01-15 | [DBA][DEV] | | [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.] | Brent Ozar | 2021-01-06 | [DBA][DEV] | +| [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”] | Brent Ozar | 2021-01-25 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2716,3 +2717,4 @@ Articles types: [Which Microsoft Certification Should You Get?]:https://www.brentozar.com/archive/2021/01/which-microsoft-certification-should-you-get/ [SQL Server RAISERROR Cheatsheet]:https://chadbaldwin.net/2021/01/15/raiserror-cheatsheet.html [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.]:https://www.brentozar.com/archive/2021/01/want-to-avoid-deployment-downtime-replication-probably-isnt-the-answer/ +[“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”]:https://www.brentozar.com/archive/2021/01/but-surely-nolock-is-okay-if-no-ones-changing-data-right/ From ec892d742cfdda83ed48d7cd7d99b2d4adb84efa Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 21 Mar 2021 16:02:30 +0300 Subject: [PATCH 275/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a9110a9d..93b52d20 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1372,6 +1372,7 @@ Articles types: | [SQL Server RAISERROR Cheatsheet] | Chad Baldwin | 2021-01-15 | [DBA][DEV] | | [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.] | Brent Ozar | 2021-01-06 | [DBA][DEV] | | [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”] | Brent Ozar | 2021-01-25 | [DBA][DEV] | +| [Why Multiple Plans for One Query Are Bad] | Brent Ozar | 2018-01-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2718,3 +2719,4 @@ Articles types: [SQL Server RAISERROR Cheatsheet]:https://chadbaldwin.net/2021/01/15/raiserror-cheatsheet.html [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.]:https://www.brentozar.com/archive/2021/01/want-to-avoid-deployment-downtime-replication-probably-isnt-the-answer/ [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”]:https://www.brentozar.com/archive/2021/01/but-surely-nolock-is-okay-if-no-ones-changing-data-right/ +[Why Multiple Plans for One Query Are Bad]:https://www.brentozar.com/archive/2018/03/why-multiple-plans-for-one-query-are-bad/ From b9fe34342ec955e0d61f8a19706909e2bd91824d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Mar 2021 16:14:39 +0300 Subject: [PATCH 276/553] Update semicolon recommendation --- ...er Name Convention and T-SQL Programming Style.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index ff9baf15..a16e08b9 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -290,10 +290,16 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. This is [`ANSI`] standard and Microsoft announced with the SQL Server 2008 release that semicolon statement terminators will become mandatory in a future version so statement terminators other than semicolons (whitespace) are currently deprecated. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): - > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. - + > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/), [here](https://www.brentozar.com/archive/2015/12/give-your-t-sql-a-semicolonoscopy/), and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). - Also if you use common table expression `WITH CTE ` semicolon is mandority. + Semicolon is mandority for: + 1. [Common table expression `WITH CTE `](https://docs.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql): + > When a CTE is used in a statement that is part of a batch, the statement before it must be followed by a semicolon. + 3. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql] statements: + > The MERGE statement requires a semicolon (;) as a statement terminator. Error 10713 is raised when a MERGE statement is run without the terminator. + 5. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions: + > The statement before the THROW statement must be followed by the semicolon (;) statement terminator. + - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. From 2e8119f80a18848f108f9cffbc101478255a5773 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Mar 2021 16:18:34 +0300 Subject: [PATCH 277/553] Fix some typos --- SQL Server Name Convention and T-SQL Programming Style.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index a16e08b9..a8438389 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -291,6 +291,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. This deprecation announcement means that you should always use semicolon terminators in new development. From [Transact-SQL Syntax Conventions (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql): > Although the semicolon isn't required for most statements in this version of SQL Server, it will be required in a future version. + More details [here](http://www.dbdelta.com/always-use-semicolon-statement-terminators/), [here](https://www.brentozar.com/archive/2015/12/give-your-t-sql-a-semicolonoscopy/), and [here](https://sqlblog.org/2009/09/03/ladies-and-gentlemen-start-your-semi-colons). Semicolon is mandority for: 1. [Common table expression `WITH CTE `](https://docs.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql): @@ -398,9 +399,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Avoid wrapping functions around columns specified in the `WHERE` and `JOIN` clauses. Doing so makes the columns non-deterministic and prevents the query processor from using indexes. - - Use `NULL` or `NOT NULL` for each column in a temporary table. The [`ANSI_NULL_DFLT_ON`] option control the way the Database Engine assigns the `NULL` or `NOT NULL` attributes to columns when these attributes are not specified in a `CREATE TABLE` or `ALTER TABLE` statement. + - Use `NULL` or `NOT NULL` for each column in a temporary table. The [`ANSI_NULL_DFLT_ON`](https://docs.microsoft.com/en-us/sql/t-sql/statements/set-ansi-null-dflt-on-transact-sql) option control the way the Database Engine assigns the `NULL` or `NOT NULL` attributes to columns when these attributes are not specified in a `CREATE TABLE` or `ALTER TABLE` statement. If a connection executes a procedure with different settings for these options than the connection that created the procedure, the columns of the table created for the second connection can have different nullability and exhibit different behavior. If `NULL` or `NOT NULL` is explicitly stated for each column, the temporary tables are created by using the same nullability for all connections that execute the procedure. - [`ANSI_NULL_DFLT_ON`]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-ansi-null-dflt-on-transact-sql - Use modification statements that convert nulls and include logic that eliminates rows with null values from queries. Be aware that in Transact-SQL, `NULL` is not an empty or "nothing" value. It is a placeholder for an unknown value and can cause unexpected behavior, especially when querying for result sets or using AGGREGATE functions. - Use the `UNION ALL` operator instead of the `UNION` or `OR` operators, unless there is a specific need for distinct values. The `UNION ALL` operator requires less processing overhead because duplicates are not filtered out of the result set. @@ -769,4 +769,4 @@ More details [here](http://www.sqlservertutorial.net/sql-server-stored-procedure [explicit transactions]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/transactions-transact-sql [autocommit]:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql [`ANSI`]:http://standards.iso.org/ittf/PubliclyAvailableStandards/c053681_ISO_IEC_9075-1_2011.zip -[hints]https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql +[hints]:https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql From 4fc00923794c238969b771fd1e79a5cf098a3f6a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Mar 2021 16:20:15 +0300 Subject: [PATCH 278/553] Fix typos --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index a8438389..256df0da 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -296,7 +296,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. Semicolon is mandority for: 1. [Common table expression `WITH CTE `](https://docs.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql): > When a CTE is used in a statement that is part of a batch, the statement before it must be followed by a semicolon. - 3. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql] statements: + 3. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql) statements: > The MERGE statement requires a semicolon (;) as a statement terminator. Error 10713 is raised when a MERGE statement is run without the terminator. 5. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions: > The statement before the THROW statement must be followed by the semicolon (;) statement terminator. From 2ea0cf6b0cf1f3ecc061d8b4b935d5daa8e8425a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Mar 2021 18:29:37 +0300 Subject: [PATCH 279/553] Add Service Broker statements to semicolon recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 256df0da..11c0ac86 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -296,10 +296,12 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. Semicolon is mandority for: 1. [Common table expression `WITH CTE `](https://docs.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql): > When a CTE is used in a statement that is part of a batch, the statement before it must be followed by a semicolon. - 3. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql) statements: + 2. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql) statements: > The MERGE statement requires a semicolon (;) as a statement terminator. Error 10713 is raised when a MERGE statement is run without the terminator. - 5. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions: + 3. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions: > The statement before the THROW statement must be followed by the semicolon (;) statement terminator. + 4. All [Service Broker statements](https://docs.microsoft.com/sql/t-sql/statements/send-transact-sql): + > If the SEND statement isn't the first statement in a batch or stored procedure, the preceding statement must be terminated with a semicolon (;). - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. From 3e61d9f56f4595d53bc52f5c5ba32f728ae069e4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 23 Mar 2021 18:23:00 +0300 Subject: [PATCH 280/553] Add 12306 trace flag Great thanks to Tracy Boggiano https://github.com/ktaranov/sqlserver-kit/issues/191 --- SQL Server Trace Flag.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 18f8b202..852d809b 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Trace Flags -Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**613** trace flags). +Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**614** trace flags). ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.** @@ -81,6 +81,7 @@ Source links: - Andrzej Kukula - Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) - Wilfred van Dijk +- Tracy Boggiano ([b](databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) @@ -288,7 +289,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht ## Trace Flags List -Summary: **613 trace flags** +Summary: **614 trace flags** @@ -5449,6 +5450,16 @@ Function: When reorganizing a columnstore index, use a threshold of 1% of the ro Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 Scope: global only + +#### Trace Flag: 12306 +Function: Enable setting maximum [group commit time](https://www.sqlshack.com/sql-server-wait-type-hadr-group-commit/), use new trace flag 12306. This TF can be enabled during SQL Server startup or dynamically (through `DBCC TRACEON(12306, -1)`). +After TF 12306 is enabled, you can further enable 12311, 12312, 12314, 12318. These represent maximum group commit times of 1ms, 2ms, 4ms, and 8ms, respectively. They settings are additive. The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time. +If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF 12306. +The effect of TFs 12311, 12312, 12314, and 12318 occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +In the SQL Server error log, you can see entries about this actions.
+Link: [KB4565944]
+Scope: global or session + [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql [Query Store Trace Flags]:https://www.sqlskills.com/blogs/erin/query-store-trace-flags/ @@ -5534,3 +5545,5 @@ Scope: global only [SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html [Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb [KB2634571]:https://web.archive.org/web/20150303213855/http://support.microsoft.com/kb/2634571 +[KB4565944]:https://support.microsoft.com/kb/4565944 + From 2499eb36a7fae7544720ae8f326bb20befa65825 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 24 Mar 2021 08:49:06 +0300 Subject: [PATCH 281/553] Add TF 12311, 12312, 12314, 12318 Great thanks to Tracy Boggiano --- SQL Server Trace Flag.md | 58 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 852d809b..c72d8b96 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Trace Flags -Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**614** trace flags). +Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**618** trace flags). ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.** @@ -81,7 +81,7 @@ Source links: - Andrzej Kukula - Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) - Wilfred van Dijk -- Tracy Boggiano ([b](databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) +- Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) @@ -289,7 +289,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht ## Trace Flags List -Summary: **614 trace flags** +Summary: **618 trace flags** @@ -5436,6 +5436,7 @@ Link: [Docs Trace Flags]
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. Scope: global only + #### Trace Flag: 11631 Function: When reorganizing a columnstore index, use a threshold of 10% of the actual number of rows in the rowgroup. By default, without this trace flag, SQL Server uses 10% of a theoretical max of ~1M rows in the rowgroup, 100K rows, which meant that small rowgroups would never get reorganized. @@ -5443,6 +5444,7 @@ Function: When reorganizing a columnstore index, use a threshold of 10% of the a Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 Scope: global only + #### Trace Flag: 11634 Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag 11631, then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both 11631 and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup. @@ -5450,14 +5452,60 @@ Function: When reorganizing a columnstore index, use a threshold of 1% of the ro Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 Scope: global only + #### Trace Flag: 12306 -Function: Enable setting maximum [group commit time](https://www.sqlshack.com/sql-server-wait-type-hadr-group-commit/), use new trace flag 12306. This TF can be enabled during SQL Server startup or dynamically (through `DBCC TRACEON(12306, -1)`). -After TF 12306 is enabled, you can further enable 12311, 12312, 12314, 12318. These represent maximum group commit times of 1ms, 2ms, 4ms, and 8ms, respectively. They settings are additive. The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time. +Function: Enable setting maximum [group commit time](https://www.sqlshack.com/sql-server-wait-type-hadr-group-commit/). This TF can be enabled during SQL Server startup or dynamically (through `DBCC TRACEON(12306, -1)`).
+After TF 12306 is enabled, you can further enable 12311, 12312, 12314, 12318. These represent maximum group commit times of 1ms, 2ms, 4ms, and 8ms, respectively. They settings are additive. The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF 12306. The effect of TFs 12311, 12312, 12314, and 12318 occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
+Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
+Scope: global or session + + + +#### Trace Flag: 12311 +Function: After TF [12306](#12306) is enabled, you can further enable 12311 trace flag that represent maximum group commit times of **1ms**. This TF is additive whith [12312](#12312), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
+If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). +The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +In the SQL Server error log, you can see entries about this actions.
+Link: [KB4565944]
+Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
+Scope: global or session + + + +#### Trace Flag: 12312 +Function: After TF [12306](#12306) is enabled, you can further enable 12312 trace flag that represent maximum group commit times of **2ms**. This TF is additive whith [12311](#12311), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
+If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). +The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +In the SQL Server error log, you can see entries about this actions.
+Link: [KB4565944]
+Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
+Scope: global or session + + + +#### Trace Flag: 12314 +Function: After TF [12306](#12306) is enabled, you can further enable 12314 trace flag that represent maximum group commit times of **4ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
+If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). +The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +In the SQL Server error log, you can see entries about this actions.
+Link: [KB4565944]
+Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
+Scope: global or session + + + +#### Trace Flag: 12318 +Function: After TF [12306](#12306) is enabled, you can further enable 12318 trace flag that represent maximum group commit times of **8ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12314](#12314). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
+If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). +The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +In the SQL Server error log, you can see entries about this actions.
+Link: [KB4565944]
+Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
Scope: global or session From c97e53c8d7d18e8847c7da91f314b06231d462fb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 24 Mar 2021 09:01:35 +0300 Subject: [PATCH 282/553] Add some useful trace flags info --- SQL Server Trace Flag.md | 45 +++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index c72d8b96..9a4fb858 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5410,7 +5410,8 @@ Function: Applies the default timeout set by `query wait (s)` or the Resource Go **Note: This trace flag applies to SQL Server 2016 (13.x) SP2 CU5, SQL Server 2017 (14.x) CU14, and higher builds.**
Link: [Docs Trace Flags]
Link: https://support.microsoft.com/kb/4480641
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 RTM, >= 2017 CU14, >= 2016 SP2 CU5 @@ -5420,7 +5421,8 @@ For more information on loading data into a columnstore index, see [Columnstore **Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. -Scope: global only +Scope: global only
+SQL Server Version: >= 2019 RTM @@ -5433,8 +5435,9 @@ For example, using this trace flag when loading 1,048,577 rows into a columnstor Without this trace flag, the insert operation would result in one compressed rowgroup.**
**Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
-Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. -Scope: global only +Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags [876](#876), [11064](#11064), and [11068](#11068), SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. +Scope: global only
+SQL Server Version: >= 2019 RTM @@ -5442,15 +5445,19 @@ Scope: global only Function: When reorganizing a columnstore index, use a threshold of 10% of the actual number of rows in the rowgroup. By default, without this trace flag, SQL Server uses 10% of a theoretical max of ~1M rows in the rowgroup, 100K rows, which meant that small rowgroups would never get reorganized. **Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 -Scope: global only +Link: [Docs Trace Flags]
+Scope: global only
+SQL Server Version: >= 2019 CU9 #### Trace Flag: 11634 -Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag 11631, then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both 11631 and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup. +Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag [11631](#11631), then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both [11631](#11631) and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup. **Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 -Scope: global only +Link: [Docs Trace Flags]
+Scope: global only
+SQL Server Version: >= 2019 CU9 @@ -5462,51 +5469,56 @@ The effect of TFs 12311, 12312, 12314, and 12318 occurs when there is a checkpoi In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 CU9, >= 2017 CU21 #### Trace Flag: 12311 Function: After TF [12306](#12306) is enabled, you can further enable 12311 trace flag that represent maximum group commit times of **1ms**. This TF is additive whith [12312](#12312), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). -The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +The effect of TFs 12311, [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 CU9, >= 2017 CU21 #### Trace Flag: 12312 Function: After TF [12306](#12306) is enabled, you can further enable 12312 trace flag that represent maximum group commit times of **2ms**. This TF is additive whith [12311](#12311), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). -The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +The effect of TFs [12311](#12311), 12312, [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 CU9, >= 2017 CU21 #### Trace Flag: 12314 Function: After TF [12306](#12306) is enabled, you can further enable 12314 trace flag that represent maximum group commit times of **4ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). -The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +The effect of TFs [12311](#12311), [12312](#12312), 12314, and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 CU9, >= 2017 CU21 #### Trace Flag: 12318 Function: After TF [12306](#12306) is enabled, you can further enable 12318 trace flag that represent maximum group commit times of **8ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12314](#12314). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306). -The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. +The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and 12318 occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint. In the SQL Server error log, you can see entries about this actions.
Link: [KB4565944]
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 CU9, >= 2017 CU21 [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql @@ -5594,4 +5606,3 @@ Scope: global or session [Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb [KB2634571]:https://web.archive.org/web/20150303213855/http://support.microsoft.com/kb/2634571 [KB4565944]:https://support.microsoft.com/kb/4565944 - From 42e903d0939ee6cfbc4a9b99b3e46328a9457302 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 24 Mar 2021 09:04:03 +0300 Subject: [PATCH 283/553] Fix some typos --- SQL Server Trace Flag.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 9a4fb858..e4de09d3 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5393,7 +5393,8 @@ When trace flag 11024 is enabled, the modification count of the root node is kep **Note: This trace flag applies to SQL Server 2016 (13.x) SP2, SQL Server 2017 (14.x) CU3, and higher builds.**
Link: https://support.microsoft.com/kb/4041811
Link: [Docs Trace Flags]
-Scope: global or session +Scope: global or session
+SQL Server Version: >= 2019 RTM, >= 2017 CU3, >= 2016 SP2 @@ -5420,7 +5421,7 @@ Function: Improves the scalability of data loading operations into columnstore i For more information on loading data into a columnstore index, see [Columnstore indexes - Data loading guidance](https://docs.microsoft.com/en-gb/sql/relational-databases/indexes/columnstore-indexes-data-loading-guidance). **Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
-Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. +Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9.
Scope: global only
SQL Server Version: >= 2019 RTM @@ -5435,7 +5436,7 @@ For example, using this trace flag when loading 1,048,577 rows into a columnstor Without this trace flag, the insert operation would result in one compressed rowgroup.**
**Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**
Link: [Docs Trace Flags]
-Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags [876](#876), [11064](#11064), and [11068](#11068), SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9. +Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags [876](#876), [11064](#11064), and [11068](#11068), SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9.
Scope: global only
SQL Server Version: >= 2019 RTM From 1cd0d075dcee29756b26caf094dc6230539bc401 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 26 Mar 2021 16:04:31 +0300 Subject: [PATCH 284/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 93b52d20..c88e3866 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1373,6 +1373,7 @@ Articles types: | [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.] | Brent Ozar | 2021-01-06 | [DBA][DEV] | | [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”] | Brent Ozar | 2021-01-25 | [DBA][DEV] | | [Why Multiple Plans for One Query Are Bad] | Brent Ozar | 2018-01-17 | [DBA][DEV] | +| [Partitioned Tables Cause Longer Plan Compilation Times.] | Brent Ozar | 2021-02-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2720,3 +2721,4 @@ Articles types: [Want to Avoid Deployment Downtime? Replication Probably Isn’t the Answer.]:https://www.brentozar.com/archive/2021/01/want-to-avoid-deployment-downtime-replication-probably-isnt-the-answer/ [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”]:https://www.brentozar.com/archive/2021/01/but-surely-nolock-is-okay-if-no-ones-changing-data-right/ [Why Multiple Plans for One Query Are Bad]:https://www.brentozar.com/archive/2018/03/why-multiple-plans-for-one-query-are-bad/ +[Partitioned Tables Cause Longer Plan Compilation Times.]:https://www.brentozar.com/archive/2021/02/partitioned-tables-cause-longer-plan-compilation-times/ From 0fa608f23ef5892570f707eead2008a5c10387ac Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 27 Mar 2021 16:06:01 +0300 Subject: [PATCH 285/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c88e3866..afce1bfe 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1374,6 +1374,7 @@ Articles types: | [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”] | Brent Ozar | 2021-01-25 | [DBA][DEV] | | [Why Multiple Plans for One Query Are Bad] | Brent Ozar | 2018-01-17 | [DBA][DEV] | | [Partitioned Tables Cause Longer Plan Compilation Times.] | Brent Ozar | 2021-02-26 | [DBA][DEV] | +| [Query Hints You Can Use to Avoid Blocking] | Brent Ozar | 2021-01-21 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2722,3 +2723,4 @@ Articles types: [“But Surely NOLOCK Is Okay If No One’s Changing Data, Right?”]:https://www.brentozar.com/archive/2021/01/but-surely-nolock-is-okay-if-no-ones-changing-data-right/ [Why Multiple Plans for One Query Are Bad]:https://www.brentozar.com/archive/2018/03/why-multiple-plans-for-one-query-are-bad/ [Partitioned Tables Cause Longer Plan Compilation Times.]:https://www.brentozar.com/archive/2021/02/partitioned-tables-cause-longer-plan-compilation-times/ +[Query Hints You Can Use to Avoid Blocking]:https://www.brentozar.com/archive/2021/01/query-hints-you-can-use-to-avoid-blocking/ From a4e01b1247b677ba95fc00893eaccee8126fe8e5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 28 Mar 2021 16:07:21 +0300 Subject: [PATCH 286/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index afce1bfe..f0f6ada2 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1375,6 +1375,7 @@ Articles types: | [Why Multiple Plans for One Query Are Bad] | Brent Ozar | 2018-01-17 | [DBA][DEV] | | [Partitioned Tables Cause Longer Plan Compilation Times.] | Brent Ozar | 2021-02-26 | [DBA][DEV] | | [Query Hints You Can Use to Avoid Blocking] | Brent Ozar | 2021-01-21 | [DBA][DEV] | +| [Changing Statistics Cause Longer Compilation Times] | Brent Ozar | 2021-02-13 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2724,3 +2725,4 @@ Articles types: [Why Multiple Plans for One Query Are Bad]:https://www.brentozar.com/archive/2018/03/why-multiple-plans-for-one-query-are-bad/ [Partitioned Tables Cause Longer Plan Compilation Times.]:https://www.brentozar.com/archive/2021/02/partitioned-tables-cause-longer-plan-compilation-times/ [Query Hints You Can Use to Avoid Blocking]:https://www.brentozar.com/archive/2021/01/query-hints-you-can-use-to-avoid-blocking/ +[Changing Statistics Cause Longer Compilation Times]:https://www.brentozar.com/archive/2021/02/changing-statistics-cause-longer-compilation-times/ From 905e16225ccc777ebcb81ac0aacfe0b00a5afea7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 29 Mar 2021 16:11:01 +0300 Subject: [PATCH 287/553] Add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f0f6ada2..814746be 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1376,6 +1376,7 @@ Articles types: | [Partitioned Tables Cause Longer Plan Compilation Times.] | Brent Ozar | 2021-02-26 | [DBA][DEV] | | [Query Hints You Can Use to Avoid Blocking] | Brent Ozar | 2021-01-21 | [DBA][DEV] | | [Changing Statistics Cause Longer Compilation Times] | Brent Ozar | 2021-02-13 | [DBA][DEV] | +| [Understanding Execution Plan Operator Timings] | Paul White | 2021-03-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2726,3 +2727,4 @@ Articles types: [Partitioned Tables Cause Longer Plan Compilation Times.]:https://www.brentozar.com/archive/2021/02/partitioned-tables-cause-longer-plan-compilation-times/ [Query Hints You Can Use to Avoid Blocking]:https://www.brentozar.com/archive/2021/01/query-hints-you-can-use-to-avoid-blocking/ [Changing Statistics Cause Longer Compilation Times]:https://www.brentozar.com/archive/2021/02/changing-statistics-cause-longer-compilation-times/ +[Understanding Execution Plan Operator Timings]:https://sqlperformance.com/2021/03/sql-performance/execution-plan-timings From d35dc5e768fc3679bf45db5dd9a5200628f4583e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 30 Mar 2021 16:13:33 +0300 Subject: [PATCH 288/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 814746be..b953b657 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1377,6 +1377,7 @@ Articles types: | [Query Hints You Can Use to Avoid Blocking] | Brent Ozar | 2021-01-21 | [DBA][DEV] | | [Changing Statistics Cause Longer Compilation Times] | Brent Ozar | 2021-02-13 | [DBA][DEV] | | [Understanding Execution Plan Operator Timings] | Paul White | 2021-03-08 | [DBA][DEV] | +| [What Does a Database Administrator Actually Do?] | Brent Ozar | 2021-03-20 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2728,3 +2729,4 @@ Articles types: [Query Hints You Can Use to Avoid Blocking]:https://www.brentozar.com/archive/2021/01/query-hints-you-can-use-to-avoid-blocking/ [Changing Statistics Cause Longer Compilation Times]:https://www.brentozar.com/archive/2021/02/changing-statistics-cause-longer-compilation-times/ [Understanding Execution Plan Operator Timings]:https://sqlperformance.com/2021/03/sql-performance/execution-plan-timings +[What Does a Database Administrator Actually Do?]:https://www.brentozar.com/archive/2021/03/what-does-a-database-administrator-actually-do/ From 1d4564391e2fdc8a94001f336308074ba2a27194 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 31 Mar 2021 16:15:21 +0300 Subject: [PATCH 289/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b953b657..c19578de 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1378,6 +1378,7 @@ Articles types: | [Changing Statistics Cause Longer Compilation Times] | Brent Ozar | 2021-02-13 | [DBA][DEV] | | [Understanding Execution Plan Operator Timings] | Paul White | 2021-03-08 | [DBA][DEV] | | [What Does a Database Administrator Actually Do?] | Brent Ozar | 2021-03-20 | [DBA] | +| [How Useful Is Column Store In Standard Edition?] | Erik Darling | 2021-03-17 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2730,3 +2731,4 @@ Articles types: [Changing Statistics Cause Longer Compilation Times]:https://www.brentozar.com/archive/2021/02/changing-statistics-cause-longer-compilation-times/ [Understanding Execution Plan Operator Timings]:https://sqlperformance.com/2021/03/sql-performance/execution-plan-timings [What Does a Database Administrator Actually Do?]:https://www.brentozar.com/archive/2021/03/what-does-a-database-administrator-actually-do/ +[How Useful Is Column Store In Standard Edition?]:https://www.erikdarlingdata.com/sql-server/how-useful-is-column-store-in-standard-edition/ From cb2f41ad3756e94a97ceb298202d0407a24bbc1a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 3 Apr 2021 16:20:09 +0300 Subject: [PATCH 290/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c19578de..ab539c6c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1379,6 +1379,7 @@ Articles types: | [Understanding Execution Plan Operator Timings] | Paul White | 2021-03-08 | [DBA][DEV] | | [What Does a Database Administrator Actually Do?] | Brent Ozar | 2021-03-20 | [DBA] | | [How Useful Is Column Store In Standard Edition?] | Erik Darling | 2021-03-17 | [DBA] | +| [Task Manager’s CPU numbers are all but meaningless] | Aaron Margosis | 2021-03-25 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2732,3 +2733,4 @@ Articles types: [Understanding Execution Plan Operator Timings]:https://sqlperformance.com/2021/03/sql-performance/execution-plan-timings [What Does a Database Administrator Actually Do?]:https://www.brentozar.com/archive/2021/03/what-does-a-database-administrator-actually-do/ [How Useful Is Column Store In Standard Edition?]:https://www.erikdarlingdata.com/sql-server/how-useful-is-column-store-in-standard-edition/ +[Task Manager’s CPU numbers are all but meaningless]:https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43 From 523338e94ed304927fc20dbdc1d01e9c8851046a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 4 Apr 2021 16:22:30 +0300 Subject: [PATCH 291/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ab539c6c..84b0510d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1380,6 +1380,7 @@ Articles types: | [What Does a Database Administrator Actually Do?] | Brent Ozar | 2021-03-20 | [DBA] | | [How Useful Is Column Store In Standard Edition?] | Erik Darling | 2021-03-17 | [DBA] | | [Task Manager’s CPU numbers are all but meaningless] | Aaron Margosis | 2021-03-25 | [DBA] | +| [Global temporary tables are almost never the answer in SQL Server] | Greg Low | 2021-02-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2734,3 +2735,4 @@ Articles types: [What Does a Database Administrator Actually Do?]:https://www.brentozar.com/archive/2021/03/what-does-a-database-administrator-actually-do/ [How Useful Is Column Store In Standard Edition?]:https://www.erikdarlingdata.com/sql-server/how-useful-is-column-store-in-standard-edition/ [Task Manager’s CPU numbers are all but meaningless]:https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43 +[Global temporary tables are almost never the answer in SQL Server]:https://blog.greglow.com/2021/02/04/sql-global-temporary-tables-are-almost-never-the-answer-in-sql-server/ From 9b5a3659fba5c998dc9548a34b301fc1c8e67319 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 5 Apr 2021 16:23:50 +0300 Subject: [PATCH 292/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 84b0510d..144cf7f2 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1381,6 +1381,7 @@ Articles types: | [How Useful Is Column Store In Standard Edition?] | Erik Darling | 2021-03-17 | [DBA] | | [Task Manager’s CPU numbers are all but meaningless] | Aaron Margosis | 2021-03-25 | [DBA] | | [Global temporary tables are almost never the answer in SQL Server] | Greg Low | 2021-02-04 | [DBA][DEV] | +| [Never, Ever, Ever Start T-SQL Comments with Two Dashes] | Brent Ozar | 2021-04-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2736,3 +2737,4 @@ Articles types: [How Useful Is Column Store In Standard Edition?]:https://www.erikdarlingdata.com/sql-server/how-useful-is-column-store-in-standard-edition/ [Task Manager’s CPU numbers are all but meaningless]:https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43 [Global temporary tables are almost never the answer in SQL Server]:https://blog.greglow.com/2021/02/04/sql-global-temporary-tables-are-almost-never-the-answer-in-sql-server/ +[Never, Ever, Ever Start T-SQL Comments with Two Dashes]:https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/ From b746f1af134be192635af8b6ec44b745df5564ed Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 7 Apr 2021 15:29:43 +0300 Subject: [PATCH 293/553] Update comment recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 11c0ac86..78cc39a2 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -538,7 +538,7 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] - The procedure or function should begin with parameters checks (see example below) - Create `sp_` procedures only in `master` database - SQL Server will always scan through the system catalog first - Always use `BEGIN TRY` and `BEGIN CATCH` for error handling - - Always use multi-line comment `/* */` instead in-line comment `--` + - Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems. More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/). - Use `SET NOCOUNT ON;` for stops the message that shows the count of the number of rows affected by a Transact-SQL statement and decreasing network traffic. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-set-nocount-problem-pe008-pe009) and [here][11]. - Do not use `SET NOCOUNT OFF;` because it is default behavior From 10a0a7ccabac08a8c34f4b67abb812f2c01021b6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 8 Apr 2021 16:26:03 +0300 Subject: [PATCH 294/553] Add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 144cf7f2..dd000874 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1382,6 +1382,7 @@ Articles types: | [Task Manager’s CPU numbers are all but meaningless] | Aaron Margosis | 2021-03-25 | [DBA] | | [Global temporary tables are almost never the answer in SQL Server] | Greg Low | 2021-02-04 | [DBA][DEV] | | [Never, Ever, Ever Start T-SQL Comments with Two Dashes] | Brent Ozar | 2021-04-05 | [DBA][DEV] | +| [Why All My Servers Have an 8GB Empty File] | Brian Schrader | 2021-03-25 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2738,3 +2739,4 @@ Articles types: [Task Manager’s CPU numbers are all but meaningless]:https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43 [Global temporary tables are almost never the answer in SQL Server]:https://blog.greglow.com/2021/02/04/sql-global-temporary-tables-are-almost-never-the-answer-in-sql-server/ [Never, Ever, Ever Start T-SQL Comments with Two Dashes]:https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/ +[Why All My Servers Have an 8GB Empty File]:https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/ From e3f77a105ea3f7d1982bcef426cdc5d2ca18cb56 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 9 Apr 2021 16:28:39 +0300 Subject: [PATCH 295/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index dd000874..fd45c685 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1383,6 +1383,7 @@ Articles types: | [Global temporary tables are almost never the answer in SQL Server] | Greg Low | 2021-02-04 | [DBA][DEV] | | [Never, Ever, Ever Start T-SQL Comments with Two Dashes] | Brent Ozar | 2021-04-05 | [DBA][DEV] | | [Why All My Servers Have an 8GB Empty File] | Brian Schrader | 2021-03-25 | [DBA] | +| [Incorrect Results with Parallel Eager Spools and Batch Mode] | Paul White | 2021-03-24 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2740,3 +2741,4 @@ Articles types: [Global temporary tables are almost never the answer in SQL Server]:https://blog.greglow.com/2021/02/04/sql-global-temporary-tables-are-almost-never-the-answer-in-sql-server/ [Never, Ever, Ever Start T-SQL Comments with Two Dashes]:https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/ [Why All My Servers Have an 8GB Empty File]:https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/ +[Incorrect Results with Parallel Eager Spools and Batch Mode]:https://www.sql.kiwi/2021/03/spools-batch-mode-hp.html From f0eebfa4e146975dec766dc6256d2ff01fae2745 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 10 Apr 2021 16:31:11 +0300 Subject: [PATCH 296/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fd45c685..ec1a13c8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1384,6 +1384,7 @@ Articles types: | [Never, Ever, Ever Start T-SQL Comments with Two Dashes] | Brent Ozar | 2021-04-05 | [DBA][DEV] | | [Why All My Servers Have an 8GB Empty File] | Brian Schrader | 2021-03-25 | [DBA] | | [Incorrect Results with Parallel Eager Spools and Batch Mode] | Paul White | 2021-03-24 | [DBA][DEV] | +| [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2742,3 +2743,4 @@ Articles types: [Never, Ever, Ever Start T-SQL Comments with Two Dashes]:https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/ [Why All My Servers Have an 8GB Empty File]:https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/ [Incorrect Results with Parallel Eager Spools and Batch Mode]:https://www.sql.kiwi/2021/03/spools-batch-mode-hp.html +[Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 From 78e9a0edfe3cf158ba1d618c14355a4623514e5c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 11 Apr 2021 16:33:08 +0300 Subject: [PATCH 297/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index ec1a13c8..25aa11c8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1385,6 +1385,7 @@ Articles types: | [Why All My Servers Have an 8GB Empty File] | Brian Schrader | 2021-03-25 | [DBA] | | [Incorrect Results with Parallel Eager Spools and Batch Mode] | Paul White | 2021-03-24 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | +| [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2744,3 +2745,4 @@ Articles types: [Why All My Servers Have an 8GB Empty File]:https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/ [Incorrect Results with Parallel Eager Spools and Batch Mode]:https://www.sql.kiwi/2021/03/spools-batch-mode-hp.html [Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 +[Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 From bf63cdffe1db31bcb8bc842eac202e8b744ebe65 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 12 Apr 2021 08:23:05 +0300 Subject: [PATCH 298/553] Update SQL Server Drivers info --- SQL Server Drivers.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/SQL Server Drivers.md b/SQL Server Drivers.md index 60b43e28..72b2f906 100644 --- a/SQL Server Drivers.md +++ b/SQL Server Drivers.md @@ -5,6 +5,17 @@ Please see below for a summary of the different drivers, both current and legacy [SQL Server Drivers](https://docs.microsoft.com/en-us/sql/connect/sql-server-drivers) +# Driver feature support matrix for Microsoft SQL Server +[Driver feature support matrix for Microsoft SQL Server](https://docs.microsoft.com/en-us/sql/connect/driver-feature-matrix) +If you're planning to use a feature in Microsoft SQL Server, it might not be available in all drivers. Some reasons a feature might not be in a particular driver include: + +- The feature doesn't apply to the driver technology. +- The feature is new and hasn't been implemented across all drivers yet. +- The feature isn't in demand in a particular driver. +- Other features are being implemented first. +We wish all drivers supported every feature and spend effort to ensure feature parity across drivers. However that isn't always possible. To help you choose the appropriate driver for your needs, here's a list of popular features and the drivers that implement them. + + ## Current SQL Drivers The following SQL Drivers are actively developed. Each driver has a support statement that can be found by following the links. @@ -30,7 +41,7 @@ The ODBC SQL driver is a C++ implementation of the TDS protocol, which is suppor ### PHP The PHP SQL driver relies on the Microsoft SQL Server ODBC Driver to handle the low-level communication with SQL Server. This driver is developed, tested, and supported by Microsoft. -[Microsoft PHP Driver for SQL Driver](https://docs.microsoft.com/en-us/sql/connect/php/microsoft-php-driver-for-sql-server) | [Download PHP Driver](https://www.microsoft.com/en-us/download/details.aspx?id=20098) | [Github](https://github.com/Microsoft/msphpsql) +[Microsoft PHP Driver for SQL Driver](https://docs.microsoft.com/en-us/sql/connect/php/microsoft-php-driver-for-sql-server) | [Download PHP Driver](https://github.com/microsoft/msphpsql/releases/latest) | [Github](https://github.com/Microsoft/msphpsql) ### Node.js From fe5bfa427c31a1e094f0aa2b1c7efcbf100bfd0d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 12 Apr 2021 16:34:55 +0300 Subject: [PATCH 299/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 25aa11c8..b07a0e02 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1386,6 +1386,7 @@ Articles types: | [Incorrect Results with Parallel Eager Spools and Batch Mode] | Paul White | 2021-03-24 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | +| [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2746,3 +2747,4 @@ Articles types: [Incorrect Results with Parallel Eager Spools and Batch Mode]:https://www.sql.kiwi/2021/03/spools-batch-mode-hp.html [Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 [Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 +[How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ From ef608d89026604782ef2771e044d16c6e502f4b6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 13 Apr 2021 17:03:03 +0300 Subject: [PATCH 300/553] Add DunderMifflin test database --- Sample_Databases/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sample_Databases/README.md b/Sample_Databases/README.md index 62de6dbf..f3e9a3ea 100644 --- a/Sample_Databases/README.md +++ b/Sample_Databases/README.md @@ -27,6 +27,7 @@ Some databases you can download from this repository: https://rebrand.ly/sample- | [Northwind Database][1] | 2000 | OLTP | - | ? | ? | | [Pub Database][1] | 2000 | OLTP | - | ? | ? | | [Oracle Employee Database] | 2000 | OLTP | 3 | 4 | 2 | +| [DunderMifflin] | ? | OLTP | - | - | ? | [StackOverflow 2010 Database]:https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ [StackOverflow Database]:https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ @@ -48,6 +49,7 @@ Some databases you can download from this repository: https://rebrand.ly/sample- [AdventureWorks Tabular Model]:https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks-analysis-services/adventure-works-tabular-model-1200-full-database-backup.zip [1]:https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs [Oracle Employee Database]:https://github.com/ktaranov/sqlserver-kit/blob/master/Sample_Databases/Oracle_Employee_Database.sql +[DunderMifflin]:https://github.com/tdmitch/DunderMifflin ## Datasets - [Data.gov](https://www.data.gov/) From cb2d9f6b95d8914f5f66473e0e62038e75c16859 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 14 Apr 2021 08:51:50 +0300 Subject: [PATCH 301/553] Update comment recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 78cc39a2..dd96aa0c 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -262,6 +262,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlperformance.com/2014/11/t-sql-queries/multiple-plans-identical-query), [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - Delimiters: **spaces** (not tabs). + - Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems in different tools and programs. + More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/) and [here](https://sqlkover.com/ssis-and-the-ora-00907-missing-right-parenthesis-error/). - Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names. Main problems are: traffic issues, Memory Grants issues, Index usage issues. **Only one exception, see it below.** @@ -538,7 +540,6 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] - The procedure or function should begin with parameters checks (see example below) - Create `sp_` procedures only in `master` database - SQL Server will always scan through the system catalog first - Always use `BEGIN TRY` and `BEGIN CATCH` for error handling - - Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems. More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/). - Use `SET NOCOUNT ON;` for stops the message that shows the count of the number of rows affected by a Transact-SQL statement and decreasing network traffic. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-set-nocount-problem-pe008-pe009) and [here][11]. - Do not use `SET NOCOUNT OFF;` because it is default behavior From 6a15d30a3f13216a6b3a7cb2b0f14cea7b4e1020 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 14 Apr 2021 17:04:09 +0300 Subject: [PATCH 302/553] Add SQL Server CVE-2021-1636 for 2012 version --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index f2875db9..e9d05d37 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -943,6 +943,7 @@ All SQL Server 2012 CU downloads: [Catalog Update Microsoft SQL Server 2012](htt | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Fixes | Public | |---------------|------------------|--------|------|-----------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------|--------------|-------|--------| +| 11.0.7507.2 | 2011.110.7507.2 | SP4 | GDR | CVE-2021-1636 | 4583465 | [Description of the security update for SQL Server 2012 SP4 GDR: January 12, 2021] | 2021-01-12 | 1 | 1 | | 11.0.7493.4 | 2011.110.7462.6 | SP4 | GDR | CVE-2020-0618 | 4532098 | [Security update for SQL Server 2012 SP4 GDR: February 11, 2020] | 2020-02-11 | 1 | 1 | | 11.0.7469.6 | 2011.110.7469.6 | SP4 | CU | **Latest CU SP4** | 4091266 | [On-demand hotfix update package for SQL Server 2012 SP4] | 2018-03-28 | 2 | 2 | | 11.0.7462.6 | 2011.110.7462.6 | SP4 | GDR | CVE-2017-5715,2017-5753,2017-5754 | 4057116 | [Security Advisory ADV180002 (GDR)] | 2018-01-12 | 1 | 1 | @@ -1037,6 +1038,7 @@ All SQL Server 2012 CU downloads: [Catalog Update Microsoft SQL Server 2012](htt | 11.0.1440 | 2010.110.1440.19 | CTP | CTP | | | Microsoft SQL Server 2012 (codename Denali) Community Technology Preview 3 (CTP3) | 2011-07-11 | | | | 11.0.1103 | 2010.110.1103.9 | CTP | CTP | | | Microsoft SQL Server 2012 (codename Denali) Community Technology Preview 1 (CTP1) | 2010-11-08 | | | +[Description of the security update for SQL Server 2012 SP4 GDR: January 12, 2021]:https://support.microsoft.com/help/4583465 [Security update for SQL Server 2012 SP4 GDR: February 11, 2020]:https://support.microsoft.com/help/4532098 [On-demand hotfix update package for SQL Server 2012 SP4]:https://support.microsoft.com/help/4091266 [Security Advisory ADV180002 (GDR)]:https://support.microsoft.com/help/4057116/security-update-for-vulnerabilities-in-sql-server From a1633232811fe11aeaabd7aabc25fa99e5248b9e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 15 Apr 2021 17:06:06 +0300 Subject: [PATCH 303/553] Update SQL Server 2012 install recommendation --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index e9d05d37..09b386c2 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -133,7 +133,7 @@ Profits: | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | -| 2012 | [Install 2012] then
[SP4 2012] then
[KB4532098] | 11.0.2100.60
11.0.7001.0
11.0.7493.4 | 2012-02-14
2017-10-05
2020-02-11 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | +| 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2008 R2 | [Install 2008 R2] then
[SP3 2008 R2] then
[SU KB3045311] | 10.50.1600
10.50.6000
10.50.6220.0 | 2010-11-21
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 R2 Updates](#microsoft-sql-server-2008-r2-builds) | | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | @@ -147,7 +147,7 @@ Profits: [KB4535288]:https://support.microsoft.com/help/4535288 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 [SP4 2012]:https://support.microsoft.com/help/4018073 -[KB4532098]:https://support.microsoft.com/help/4532098 +[KB4583465]:https://support.microsoft.com/help/4583465 [CU9 KB3098512]:https://support.microsoft.com/kb/3098512 [Install 2008 R2]:https://msdn.microsoft.com/subscriptions/securedownloads/#searchTerm=sql%20server%202008%20r2&ProductFamilyId=0&Languages=en&FileExtensions=.iso&PageSize=10&PageIndex=0&FileId=0 [SP3 2008 R2]:http://www.microsoft.com/download/details.aspx?id=44271 From 943a60f4f90670c1d07046170eb517b8fbdaa4e3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 16 Apr 2021 17:14:39 +0300 Subject: [PATCH 304/553] Update download links --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 09b386c2..cf03c473 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -186,7 +186,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2014 SP3 KB4535288] | SQLServer2014-KB4535288-x64.exe | 2020-02-11 | 12.0.6372.1 | 604 | f5a76d473fee50a2aabe7c08daeb0910f3590491 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | | [SQL Server 2012 SP4] | SQLServer2012SP4-KB4018073-x64-ENU.exe | 2017-10-05 | 11.0.7001.0 | 1024 | 95127ee2e8dfef180752e531a83cd948c24a3a87 | -| [SQL Server 2012 SP4 KB4532098] | SQLServer2012-KB4532098-x64.exe | 2020-02-11 | 11.0.7493.4 | 867 | e20fa98775d4983a042e987caa6d59eba46ec760 | +| [SQL Server 2012 SP4 KB4583465] | SQLServer2012-KB4583465-x64.exe | 2021-01-12 | 11.0.7507.2 | 856 | c6e5ea14425fed26b885ab6b70aba8622817fd8c | | SQL Server 2008 R2 RTM | SW_DVD9_SQL_Svr_Enterprise_Edtn_2008_R2_English_MLF_X16-29540.ISO | 2010-04-21 | 10.50.1600.1 | 4177 | 18105db70f0f0b23418f5005a6ce4b25317c6d03 | | [SQL Server 2008 R2 SP3] | SQLServer2008R2SP3-KB2979597-x64-ENU.exe | 2014-09-30 | 10.50.6220.0 | 358 | 194cd740d5812b12639b47886ebde0d04774b4ec | | [SQL Server 2008 R2 SU] | SQLServer2008R2-KB3045316-x64.exe | 2015-07-14 | 10.50.6000 | 58 | 3aa4d820553b1e5d96735541cbb55d97322c286e | @@ -207,7 +207,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2014 SP3 KB4535288]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=100913&6B49FDFB-8E5B-4B07-BC31-15695C5A2143=1 [SQL Server 2012 RTM]:https://download.microsoft.com/download/4/C/7/4C7D40B9-BCF8-4F8A-9E76-06E9B92FE5AE/ENU/SQLFULL_ENU.iso [SQL Server 2012 SP4]:https://download.microsoft.com/download/E/A/B/EABF1E75-54F0-42BB-B0EE-58E837B7A17F/SQLServer2012SP4-KB4018073-x64-ENU.exe -[SQL Server 2012 SP4 KB4532098]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=100915&6B49FDFB-8E5B-4B07-BC31-15695C5A2143=1]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=100915&6B49FDFB-8E5B-4B07-BC31-15695C5A2143=1 +[SQL Server 2012 SP4 KB4583465]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=102625 [SQL Server 2008 R2]:https://msdn.microsoft.com/subscriptions/securedownloads/#searchTerm=sql%20server%202008%20r2&ProductFamilyId=0&Languages=en&FileExtensions=.iso&PageSize=10&PageIndex=0&FileId=0 [SQL Server 2008 R2 SP3]:https://download.microsoft.com/download/D/7/A/D7A28B6C-FCFE-4F70-A902-B109388E01E9/ENU/SQLServer2008R2SP3-KB2979597-x64-ENU.exe [SQL Server 2008 R2 SU]:https://download.microsoft.com/download/4/D/A/4DAE6F9E-960E-4A59-BDE7-1D92DA508315/SQLServer2008R2-KB3045316-x64.exe From 6df70bc3708c24bf2139157f5efc7b30d1e17d9e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 17 Apr 2021 17:19:12 +0300 Subject: [PATCH 305/553] Add SQL Server 12.0.6433.1 info --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index cf03c473..aac864fc 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -746,6 +746,7 @@ Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Fixes | Public | Size, Mb | |--------------|------------------|--------|------|-----------------------------------|---------|----------------------------------------------------------------------------------------------------------------------------|--------------|------:|-------:|---------:| +| 12.0.6433.1 | 2014.120.6433.1 | SP3 | GDR | CVE-2021-1636 | 4583462 | [Description of the security update for SQL Server 2014 SP3 CU4: January 12, 2021] | 2021-01-12 | 1 | 1 | 596 | | 12.0.6372.1 | 2014.120.6372.1 | SP3 | GDR | CVE-2020-0618 | 4535288 | [Security update for SQL Server 2014 SP3 CU4: February 11, 2020] | 2020-02-11 | 1 | 1 | 604 | | 12.0.6329.1 | 2014.120.6329.1 | SP3 | CU | **Latest CU SP3** | 4500181 | [Cumulative Update 4 for SQL Server 2014 SP3] | 2019-07-29 | 25 | 19 | 658 | | 12.0.6293.0 | 2014.120.6293.0 | SP3 | GDR | CVE-2019-1068 | 4505422 | [Security update for SQL Server 2014 SP3 CU3 GDR: July 9, 2019] | 2019-07-09 | 1 | 1 | 656 | @@ -842,6 +843,7 @@ Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64) | 12.0.1524.0 | 2014.120.1524.0 | CTP | CTP | | | Microsoft SQL Server 2014 Community Technology Preview 2 (CTP2) | 2013-10-15 | | | | | 11.0.9120.0 | 2013.110.9120.0 | CTP | CTP | | | Microsoft SQL Server 2014 Community Technology Preview 1 (CTP1) | 2013-06-25 | | | | +[Description of the security update for SQL Server 2014 SP3 CU4: January 12, 2021]:https://support.microsoft.com/help/4583462 [Security update for SQL Server 2014 SP3 CU4: February 11, 2020]:https://support.microsoft.com/help/4535288 [Cumulative Update 4 for SQL Server 2014 SP3]:https://support.microsoft.com/help/4500181 [Security update for SQL Server 2014 SP3 CU3 GDR: July 9, 2019]:https://support.microsoft.com/help/4505422 From c93b2b5614709bd102eb70a0d3d37327d8bf84bf Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 18 Apr 2021 17:20:25 +0300 Subject: [PATCH 306/553] Update SQL Server 2014 install recommendation --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index aac864fc..f20a17e7 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -132,7 +132,7 @@ Profits: | 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | -| 2014 | [Install 2014 SP3] then
[KB4535288] | 12.0.6024.0
12.0.6372.1 | 2018-10-30
2020-02-11 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | +| 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2008 R2 | [Install 2008 R2] then
[SP3 2008 R2] then
[SU KB3045311] | 10.50.1600
10.50.6000
10.50.6220.0 | 2010-11-21
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 R2 Updates](#microsoft-sql-server-2008-r2-builds) | | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | @@ -144,7 +144,7 @@ Profits: [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [CU14 KB4564903]:https://support.microsoft.com/help/4564903 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 -[KB4535288]:https://support.microsoft.com/help/4535288 +[KB4583462]:https://support.microsoft.com/help/4583462 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 [SP4 2012]:https://support.microsoft.com/help/4018073 [KB4583465]:https://support.microsoft.com/help/4583465 From 815d60942d9fc4f4391fce6a608a8bc3404384ac Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 19 Apr 2021 17:23:15 +0300 Subject: [PATCH 307/553] Add SQL Server 2014 download link --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index f20a17e7..614507e2 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -183,7 +183,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | | [SQL Server 2016 SP2 CU14] | SQLServer2016-KB4564903-x64.exe | 2020-05-28 | 13.0.5820.21 | 752 | a1de57f8d273b9ae97868e0fd8394c237d7a593d | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | -| [SQL Server 2014 SP3 KB4535288] | SQLServer2014-KB4535288-x64.exe | 2020-02-11 | 12.0.6372.1 | 604 | f5a76d473fee50a2aabe7c08daeb0910f3590491 | +| [SQL Server 2014 SP3 KB4583462] | SQLServer2014-KB4583462-x64.exe | 2021-01-12 | 12.0.6433.1 | 596 | 0dc4f56583828865365340dcb95436f1a41754b9 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | | [SQL Server 2012 SP4] | SQLServer2012SP4-KB4018073-x64-ENU.exe | 2017-10-05 | 11.0.7001.0 | 1024 | 95127ee2e8dfef180752e531a83cd948c24a3a87 | | [SQL Server 2012 SP4 KB4583465] | SQLServer2012-KB4583465-x64.exe | 2021-01-12 | 11.0.7507.2 | 856 | c6e5ea14425fed26b885ab6b70aba8622817fd8c | @@ -204,7 +204,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [SQL Server 2016 SP2 CU14]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB4564903-x64.exe [SQL Server 2014 SP3]:https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2014-sp3 -[SQL Server 2014 SP3 KB4535288]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=100913&6B49FDFB-8E5B-4B07-BC31-15695C5A2143=1 +[SQL Server 2014 SP3 KB4583462]:https://www.microsoft.com/en-us/download/details.aspx?id=102623 [SQL Server 2012 RTM]:https://download.microsoft.com/download/4/C/7/4C7D40B9-BCF8-4F8A-9E76-06E9B92FE5AE/ENU/SQLFULL_ENU.iso [SQL Server 2012 SP4]:https://download.microsoft.com/download/E/A/B/EABF1E75-54F0-42BB-B0EE-58E837B7A17F/SQLServer2012SP4-KB4018073-x64-ENU.exe [SQL Server 2012 SP4 KB4583465]:https://www.microsoft.com/en-us/download/confirmation.aspx?id=102625 From 9ad656cc24ed5585ac62579273eef8028528de47 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 20 Apr 2021 18:17:40 +0300 Subject: [PATCH 308/553] Add explicit range condition recommendation --- ...me Convention and T-SQL Programming Style.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index dd96aa0c..3377a01d 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -271,7 +271,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlblog.org/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list), [here](https://dba.stackexchange.com/q/253873/107045), [here](https://www.erikdarlingdata.com/sql-server/all-the-problems-with-select/). - - Use asterisk (`*`) only in an archiving situation, where rows are being moved to another table that must have the same structure. + - Use asterisk (`*`) **ONLY** in an archiving situation, where rows are being moved to another table that must have the same structure. ```sql INSERT INTO SalesOrderArchive /* Note no column list */ SELECT * @@ -364,6 +364,21 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. SELECT SCHEMA_NAME(schema_id) + '.' + [name] AS 'Tables' FROM sys.tables; SELECT SCHEMA_NAME(schema_id) + '.' + [name] AS Tables FROM sys.tables; ``` + - Always consider using an explicit range condition when comparing dates for properly make use of an index. More details [here](https://use-the-index-luke.com/sql/where-clause/obfuscation/dates). + ```tsql + /* bad */ + SELECT sale_date + FROM sales + WHERE YEAR(sale_date) >= 1970 + AND YEAR(sale_date) < 1971; + + /* good */ + SELECT sale_date + FROM sales + WHERE sale_date >= CAST('1970-01-01' AS date) + AND sale_date < CAST('1971-01-01', AS date); + ``` + - The first argument in `SELECT` expression should be on the next line: ```sql SELECT From a93ca8ec622da6ac1ab2745c58f6aa4018c0cba5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 21 Apr 2021 17:24:41 +0300 Subject: [PATCH 309/553] Update SQL Server 2014 latest version info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 614507e2..629f19d5 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -738,8 +738,8 @@ All SQL Server 2014 CU downloads: [Catalog Update Microsoft SQL Server 2014](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2014 Developer Edition on Windows: ``` -Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64) - Jul 20 2019 21:42:29 +Microsoft SQL Server 2014 (SP3-CU4) (KB4583462) - 12.0.6433.1 (X64) + Dec 20 2020 21:42:29 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on … ``` From 15f0b652fb01d307bf7006136dbdf7341db2261f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 22 Apr 2021 23:41:10 +0300 Subject: [PATCH 310/553] Add SQL Server 2016 CU15 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 629f19d5..72cb24bc 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -563,7 +563,8 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | **Latest CU SP2** | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-05-28 | 2020-08-06 | 18 | 16 | 752 | +| 13.0.5850.14 | 2015.131.585014 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | +| 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | ? | 18 | 16 | 753 | | 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | | 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 12 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | | 13.0.5622.0 | 2015.131.5622.0 | SP2 | GDR | CVE-2020-0618 | 4535706 | [Description of the security update for SQL Server 2016 SP2 CU11: February 11, 2020] | 2020-02-11 | 2019-11-28 | 1 | 1 | 752 | @@ -653,6 +654,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | +[Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/4577775 [Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/4564903 [Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/4549825 [Cumulative Update 12 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4536648 From 2bfc2d80ac0b57da396a598839ef2a11302b3af3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 23 Apr 2021 20:43:17 +0300 Subject: [PATCH 311/553] Update SQL Server 2016 CU14 info --- SQL Server Version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 72cb24bc..5d6beb41 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -564,7 +564,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| | 13.0.5850.14 | 2015.131.585014 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | -| 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | ? | 18 | 16 | 753 | +| 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | 2020-08-01 | 18 | 16 | 753 | | 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | | 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 12 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | | 13.0.5622.0 | 2015.131.5622.0 | SP2 | GDR | CVE-2020-0618 | 4535706 | [Description of the security update for SQL Server 2016 SP2 CU11: February 11, 2020] | 2020-02-11 | 2019-11-28 | 1 | 1 | 752 | From 1497035446d26abdd68b2ec436813b2d8d1894d9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 24 Apr 2021 20:48:06 +0300 Subject: [PATCH 312/553] Add SQL Server 2016 SP2 CVE-2021-1636 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 5d6beb41..a43a37aa 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -563,7 +563,8 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5850.14 | 2015.131.585014 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | +| 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-09-18 | 1 | 1 | 753 | +| 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | | 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | 2020-08-01 | 18 | 16 | 753 | | 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | | 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 12 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | @@ -654,6 +655,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | +[Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021]:https://support.microsoft.com/4583461 [Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/4577775 [Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/4564903 [Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/4549825 From 14ef7e04131db8217862189f224912878ad723d1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 25 Apr 2021 20:49:44 +0300 Subject: [PATCH 313/553] Update SQL Server 2016 info --- SQL Server Version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index a43a37aa..c6f69592 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -563,7 +563,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-09-18 | 1 | 1 | 753 | +| 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-10-31 | 1 | 1 | 753 | | 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | | 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | 2020-08-01 | 18 | 16 | 753 | | 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | From e6f07f553e6b6e650358274a1041091c00b272ff Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 26 Apr 2021 15:31:53 +0300 Subject: [PATCH 314/553] Add Marc Wilson SQL cheat sheet --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25aa01df..1bca93e0 100644 --- a/README.md +++ b/README.md @@ -443,7 +443,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Azure updates](https://azure.microsoft.com/en-us/updates/?status=all) - [Guides for Microsoft SQL Server Express](https://expressdb.io/) (by John McCall) - [SQL Server Diagrams](http://www.e-squillace.com/tech/techdiagrams/#SQL_Server) - - [SQL Cheat Sheet](https://websitesetup.org/sql-cheat-sheet/) (by Luke Harrison) + - [SQL Cheat Sheet for MySQL](https://websitesetup.org/sql-cheat-sheet/) (by Luke Harrison) - [Azure Database Migration Guide](https://datamigration.microsoft.com/) (by Microsoft) - [Hermitage: Testing transaction isolation levels in relation databases](https://github.com/ept/hermitage) (by Martin Kleppmann) - [csv to INSERT online converter - translates your tab-delimited data into a T-SQL INSERT statement](https://table.strd.co/) (by Structured Concepts AB) @@ -451,6 +451,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [New Stars of Data 2020 Presentations](https://github.com/SQLGrillen/NSOD-1) (by SQLGrillen) - [Get Your ColumnScore](https://columnscore.com) (by ColumnScore) - [SQL Assessment API rules in .csv format](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/DefaultRuleset.csv) (by Microsoft) + - [SQL cheat sheet for PostgreSQL and Oracle](https://www.pcwdld.com/sql-cheat-sheet) (by Marc Wilson) **[⬆ back to top](#table-of-contents)** From d03d5362f8cb8b040d6c447abce46d5a7bca5bc5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 27 Apr 2021 20:53:13 +0300 Subject: [PATCH 315/553] Add SQL Server SP2 CU16 info --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index c6f69592..88d3fc43 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -563,8 +563,9 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 13.0.5882.1 | 2015.131.5882.1 | SP2 | CU | **Latest CU SP2** | 5000645 | [Cumulative Update 16 for SQL Server 2016 SP2] | 2021-02-11 | ? | 22 | 21 | 753 | | 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-10-31 | 1 | 1 | 753 | -| 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | **Latest CU SP2** | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | +| 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | | 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | 2020-08-01 | 18 | 16 | 753 | | 13.0.5820.21 | 2015.131.5820.21 | SP2 | CU | | 4549825 | [Cumulative Update 13 for SQL Server 2016 SP2] | 2020-05-28 | 2020-05-23 | 29 | 26 | 748 | | 13.0.5698.0 | 2015.131.5698.0 | SP2 | CU | | 4536648 | [Cumulative Update 12 for SQL Server 2016 SP2] | 2020-02-25 | 2020-02-16 | 39 | 33 | 746 | @@ -655,6 +656,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | +[Cumulative Update 16 for SQL Server 2016 SP2]:https://support.microsoft.com/5000645 [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021]:https://support.microsoft.com/4583461 [Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/4577775 [Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/4564903 From fa69d2f4d25fb67dedc130e323a790b73f9c591f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 28 Apr 2021 20:57:38 +0300 Subject: [PATCH 316/553] Add SQL Server 2016 SP2 CU17 --- SQL Server Version.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 88d3fc43..7d9b1815 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -563,7 +563,8 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5882.1 | 2015.131.5882.1 | SP2 | CU | **Latest CU SP2** | 5000645 | [Cumulative Update 16 for SQL Server 2016 SP2] | 2021-02-11 | ? | 22 | 21 | 753 | +| 13.0.5888.11 | 2015.131.5888.11 | SP2 | CU | **Latest CU SP2** | 5001092 | [Cumulative Update 17 for SQL Server 2016 SP2] | 2021-03-29 | ? | 20 | 17 | 753 | +| 13.0.5882.1 | 2015.131.5882.1 | SP2 | CU | | 5000645 | [Cumulative Update 16 for SQL Server 2016 SP2] | 2021-02-11 | ? | 22 | 21 | 753 | | 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-10-31 | 1 | 1 | 753 | | 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | | 13.0.5830.85 | 2015.131.5830.85 | SP2 | CU | | 4564903 | [Cumulative Update 14 for SQL Server 2016 SP2] | 2020-08-06 | 2020-08-01 | 18 | 16 | 753 | From 7f1d67d1bfc8f96ac86595d259cea234b3180b9d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 29 Apr 2021 20:59:22 +0300 Subject: [PATCH 317/553] Update SQL Server SP2 CU17 info --- SQL Server Version.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 7d9b1815..9af2b529 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -555,7 +555,7 @@ All SQL Server 2016 CU downloads: [Catalog Update Microsoft SQL Server 2016](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2016 SP2 Developer Edition on Windows: ``` -Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) +Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) Jul 31 2020 18:47:07 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on … @@ -657,6 +657,7 @@ Microsoft SQL Server 2016 (SP2-CU14) (KB4564903) - 13.0.5830.85 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | +[Cumulative Update 17 for SQL Server 2016 SP2]:https://support.microsoft.com/help/5001092 [Cumulative Update 16 for SQL Server 2016 SP2]:https://support.microsoft.com/5000645 [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021]:https://support.microsoft.com/4583461 [Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/4577775 From 8d2b588944ec0bbebe7ec312cbd4b9a3ab8ca86d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 1 May 2021 21:01:35 +0300 Subject: [PATCH 318/553] Update SQL Server 2016 SP2 CU17 info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 9af2b529..6f534ee7 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -556,14 +556,14 @@ All SQL Server 2016 CU downloads: [Catalog Update Microsoft SQL Server 2016](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2016 SP2 Developer Edition on Windows: ``` Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) - Jul 31 2020 18:47:07 + Mar 20 2021 08:57:07 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 13.0.5888.11 | 2015.131.5888.11 | SP2 | CU | **Latest CU SP2** | 5001092 | [Cumulative Update 17 for SQL Server 2016 SP2] | 2021-03-29 | ? | 20 | 17 | 753 | +| 13.0.5888.11 | 2015.131.5888.11 | SP2 | CU | **Latest CU SP2** | 5001092 | [Cumulative Update 17 for SQL Server 2016 SP2] | 2021-03-29 | 2021-03-20 | 20 | 17 | 753 | | 13.0.5882.1 | 2015.131.5882.1 | SP2 | CU | | 5000645 | [Cumulative Update 16 for SQL Server 2016 SP2] | 2021-02-11 | ? | 22 | 21 | 753 | | 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-10-31 | 1 | 1 | 753 | | 13.0.5850.14 | 2015.131.5850.14 | SP2 | CU | | 4577775 | [Cumulative Update 15 for SQL Server 2016 SP2] | 2020-09-28 | 2020-09-18 | 21 | 20 | 753 | From eb786a3900c856cf39f19a3c1f6d4b809a876b8a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 2 May 2021 21:02:55 +0300 Subject: [PATCH 319/553] Update recommended 2016 version --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 6f534ee7..7d6afeb6 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -131,7 +131,7 @@ Profits: |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | -| 2016 | [Install 2016 SP2] then [CU14 KB4564903] | 13.0.5026.0
13.0.5830.85 | 2018-04-24
2020-08-06 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | +| 2016 | [Install 2016 SP2] then [CU17 KB5001092] | 13.0.5026.0
13.0.5888.11 | 2018-04-24
2021-03-29 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2008 R2 | [Install 2008 R2] then
[SP3 2008 R2] then
[SU KB3045311] | 10.50.1600
10.50.6000
10.50.6220.0 | 2010-11-21
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 R2 Updates](#microsoft-sql-server-2008-r2-builds) | @@ -142,7 +142,7 @@ Profits: [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU21 KB4557397]:https://support.microsoft.com/help/4557397 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 -[CU14 KB4564903]:https://support.microsoft.com/help/4564903 +[CU17 KB5001092]:https://support.microsoft.com/help/5001092 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 [KB4583462]:https://support.microsoft.com/help/4583462 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 From 87c574be3d4bcc1f773609af421299a7e3296c4f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 3 May 2021 21:04:37 +0300 Subject: [PATCH 320/553] Fix broken links --- SQL Server Version.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 7d6afeb6..a21d155d 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -658,11 +658,11 @@ Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | [Cumulative Update 17 for SQL Server 2016 SP2]:https://support.microsoft.com/help/5001092 -[Cumulative Update 16 for SQL Server 2016 SP2]:https://support.microsoft.com/5000645 +[Cumulative Update 16 for SQL Server 2016 SP2]:https://support.microsoft.com/help/5000645 [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021]:https://support.microsoft.com/4583461 -[Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/4577775 -[Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/4564903 -[Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/4549825 +[Cumulative Update 15 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4577775 +[Cumulative Update 14 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4564903 +[Cumulative Update 13 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4549825 [Cumulative Update 12 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4536648 [Description of the security update for SQL Server 2016 SP2 CU11: February 11, 2020]:https://support.microsoft.com/help/4535706 [Cumulative Update 11 for SQL Server 2016 SP2]:https://support.microsoft.com/help/4527378 From 15541c82333d8da3aa32601aa06adf62f8798108 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 4 May 2021 21:10:26 +0300 Subject: [PATCH 321/553] Update SQL Server 2016 SP2 CU17 distrib info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index a21d155d..2148e24c 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -181,7 +181,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | -| [SQL Server 2016 SP2 CU14] | SQLServer2016-KB4564903-x64.exe | 2020-05-28 | 13.0.5820.21 | 752 | a1de57f8d273b9ae97868e0fd8394c237d7a593d | +| [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | | [SQL Server 2014 SP3 KB4583462] | SQLServer2014-KB4583462-x64.exe | 2021-01-12 | 12.0.6433.1 | 596 | 0dc4f56583828865365340dcb95436f1a41754b9 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | @@ -202,7 +202,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 -[SQL Server 2016 SP2 CU14]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB4564903-x64.exe +[SQL Server 2016 SP2 CU17]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB5001092-x64.exe [SQL Server 2014 SP3]:https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2014-sp3 [SQL Server 2014 SP3 KB4583462]:https://www.microsoft.com/en-us/download/details.aspx?id=102623 [SQL Server 2012 RTM]:https://download.microsoft.com/download/4/C/7/4C7D40B9-BCF8-4F8A-9E76-06E9B92FE5AE/ENU/SQLFULL_ENU.iso From 29fb986b2fcd1f4867a201b870270eebdefae3c4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 5 May 2021 21:12:17 +0300 Subject: [PATCH 322/553] Update SQL Server 2016 SP2 CU17 info --- SQL Server Version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 2148e24c..4b228396 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -181,7 +181,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | -| [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | | +| [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | f9a30a72026251ddb3ba4bc840135066b528a494 | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | | [SQL Server 2014 SP3 KB4583462] | SQLServer2014-KB4583462-x64.exe | 2021-01-12 | 12.0.6433.1 | 596 | 0dc4f56583828865365340dcb95436f1a41754b9 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | From e2a0931b7027710d5c2f7a92a91047e897618687 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 6 May 2021 21:22:46 +0300 Subject: [PATCH 323/553] Add SQL Server 2017 CU22 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 4b228396..0923a214 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -472,7 +472,8 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 14.0.3335.7 | 2017.140.3335.7 | RTM | CU | **Latest CU** | 4535007 | [Microsoft SQL Server 2017 CU21] | 2020-07-01 | 2020-06-13 | 35 | 33 | 533 | +| 14.0.3356.20 | 2017.140.3356.20 | RTM | CU | | 4577467 | [Microsoft SQL Server 2017 CU22] | 2020-09-10 | ? | 42 | 38 | 533 | +| 14.0.3335.7 | 2017.140.3335.7 | RTM | CU | | 4535007 | [Microsoft SQL Server 2017 CU21] | 2020-07-01 | 2020-06-13 | 35 | 33 | 533 | | 14.0.3294.2 | 2017.140.3294.2 | RTM | CU | | 4541283 | [Microsoft SQL Server 2017 CU20] | 2020-04-07 | 2020-03-14 | 40 | 36 | 530 | | 14.0.3281.6 | 2017.140.3281.6 | RTM | CU | | 4535007 | [Microsoft SQL Server 2017 CU19] | 2020-02-05 | 2020-01-23 | 38 | 31 | 530 | | 14.0.3257.3 | 2017.140.3257.3 | RTM | CU | | 4527377 | [Microsoft SQL Server 2017 CU18] | 2019-12-09 | 2019-11-16 | 35 | 28 | 529 | @@ -514,6 +515,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Microsoft SQL Server 2017 CU22]:https://support.microsoft.com/help/4577467 [Microsoft SQL Server 2017 CU21]:https://support.microsoft.com/help/4557397 [Microsoft SQL Server 2017 CU20]:https://support.microsoft.com/help/4541283 [Microsoft SQL Server 2017 CU19]:https://support.microsoft.com/help/4535007 From a3240dc7d07bce07858539c8b8f09f9a5702430f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 7 May 2021 21:25:53 +0300 Subject: [PATCH 324/553] Add SQL Server 2017 CVE-2021-1636 --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index 0923a214..8c3ba013 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -472,6 +472,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | | 14.0.3356.20 | 2017.140.3356.20 | RTM | CU | | 4577467 | [Microsoft SQL Server 2017 CU22] | 2020-09-10 | ? | 42 | 38 | 533 | | 14.0.3335.7 | 2017.140.3335.7 | RTM | CU | | 4535007 | [Microsoft SQL Server 2017 CU21] | 2020-07-01 | 2020-06-13 | 35 | 33 | 533 | | 14.0.3294.2 | 2017.140.3294.2 | RTM | CU | | 4541283 | [Microsoft SQL Server 2017 CU20] | 2020-04-07 | 2020-03-14 | 40 | 36 | 530 | @@ -515,6 +516,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Description of the security update for SQL Server 2017 CU22: January 12, 2021]:https://support.microsoft.com/help/4583457 [Microsoft SQL Server 2017 CU22]:https://support.microsoft.com/help/4577467 [Microsoft SQL Server 2017 CU21]:https://support.microsoft.com/help/4557397 [Microsoft SQL Server 2017 CU20]:https://support.microsoft.com/help/4541283 From e6e3f072c95b77c988ee2e14ed70b7423f643f36 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 8 May 2021 21:28:52 +0300 Subject: [PATCH 325/553] Add SQL Server 2017 CU23 --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index 8c3ba013..e2098f96 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -472,6 +472,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | | 14.0.3356.20 | 2017.140.3356.20 | RTM | CU | | 4577467 | [Microsoft SQL Server 2017 CU22] | 2020-09-10 | ? | 42 | 38 | 533 | | 14.0.3335.7 | 2017.140.3335.7 | RTM | CU | | 4535007 | [Microsoft SQL Server 2017 CU21] | 2020-07-01 | 2020-06-13 | 35 | 33 | 533 | @@ -516,6 +517,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Microsoft SQL Server 2017 CU23]:https://support.microsoft.com/help/5000685 [Description of the security update for SQL Server 2017 CU22: January 12, 2021]:https://support.microsoft.com/help/4583457 [Microsoft SQL Server 2017 CU22]:https://support.microsoft.com/help/4577467 [Microsoft SQL Server 2017 CU21]:https://support.microsoft.com/help/4557397 From fb1eda2149f04ade6076a72dd6c59f780d3eb292 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 9 May 2021 21:31:08 +0300 Subject: [PATCH 326/553] Add SQL Server 2017 CU23 --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index e2098f96..c1b64f3f 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -472,6 +472,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 14.0.3391.2 | 2017.140.3391.2 | RTM | CU | | 5001228 | [Microsoft SQL Server 2017 CU24] | 2021-05-10 | ? | 30 | 24 | 533 | | 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | | 14.0.3356.20 | 2017.140.3356.20 | RTM | CU | | 4577467 | [Microsoft SQL Server 2017 CU22] | 2020-09-10 | ? | 42 | 38 | 533 | @@ -517,6 +518,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Microsoft SQL Server 2017 CU24]:https://support.microsoft.com/help/5001228 [Microsoft SQL Server 2017 CU23]:https://support.microsoft.com/help/5000685 [Description of the security update for SQL Server 2017 CU22: January 12, 2021]:https://support.microsoft.com/help/4583457 [Microsoft SQL Server 2017 CU22]:https://support.microsoft.com/help/4577467 From 06dfa492c560adf2234fddb9ec7c53fdb2eb2f60 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 10 May 2021 21:33:27 +0300 Subject: [PATCH 327/553] Add SQL Server 2017 CU25 --- SQL Server Version.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index c1b64f3f..0e996338 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -472,6 +472,7 @@ Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | ? | 19 | 18 | 533 | | 14.0.3391.2 | 2017.140.3391.2 | RTM | CU | | 5001228 | [Microsoft SQL Server 2017 CU24] | 2021-05-10 | ? | 30 | 24 | 533 | | 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | From 7d891bdc583b18d9319f46ff2b5dec478f0ff98d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 11 May 2021 21:36:41 +0300 Subject: [PATCH 328/553] Update Add SQL Server 2017 CU25 info --- SQL Server Version.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 0e996338..f501b165 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -464,15 +464,15 @@ All SQL Server 2017 CU downloads: [Catalog Update Microsoft SQL Server 2017](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2017 Developer Edition: ``` -Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) - Jun 13 2020 14:53:45 +Microsoft SQL Server 2017 (RTM-CU25) (KB5003830) - 14.0.3401.7 (X64) + Jun 26 2021 00:48:45 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | ? | 19 | 18 | 533 | +| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | 2021-06-26 | 19 | 18 | 533 | | 14.0.3391.2 | 2017.140.3391.2 | RTM | CU | | 5001228 | [Microsoft SQL Server 2017 CU24] | 2021-05-10 | ? | 30 | 24 | 533 | | 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | From 88be496c354c6b5ea2aeb19fe54615500b9e6bb5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 12 May 2021 09:37:38 +0300 Subject: [PATCH 329/553] Update some conference information --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bca93e0..b41444e2 100644 --- a/README.md +++ b/README.md @@ -290,15 +290,16 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Microsoft SQL Server on Q&A](https://docs.microsoft.com/en-us/answers/products/sql-server) - SQL Server Conferences - [SQL Saturdays](https://sqlsaturday.com/) - - [Pass Sumit](https://www.pass.org/AttendanEvent/Conferences/PASSSummit.aspx) + - [Pass Sumit - Red Gate](https://www.red-gate.com/hub/entrypage/redgate-pass) - [SQLBits](https://sqlbits.com/) - - [Microsoft Ignite](https://www.microsoft.com/en-us/ignite) - - [Microsoft Build](https://www.microsoft.com/en-us/build) + - [Microsoft Ignite](https://myignite.microsoft.com/home) + - [Microsoft Build](https://mybuild.microsoft.com/home) - [Devintersection](https://devintersection.com/) - [SentryOne SQL Server Virtual Conference](https://info.sentryone.com/accelerate-2020) - [Red Gate SQL Server Online Events](https://www.red-gate.com/hub/events/online-events/) - [EigthKB Sql Server Internals Conference](https://eightkb.online/) - [DataWeekender](https://www.dataweekender.com/schedule) + - [Dativerse](https://sessionize.com/dativerse) - Open Source Projects - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) From 17c1a55e9e36882097d9498cd5ffb46e29021406 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 12 May 2021 17:22:58 +0300 Subject: [PATCH 330/553] Update Apex SSMS Addins It is now not free((( https://blog.apexsql.com/what-happened-to-the-apexsql-free-tools/ --- SSMS/SSMS_Addins.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index c936441e..5dcd010e 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -14,11 +14,11 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [SQL Sentry Plan Explorer](#sql-sentry-plan-explorer) | [SQL Sentry Plan Explorer] | 2017-05-25 | 2008-2017 | SQL Sentry | Yes | No | | [TSQL Code Smells Finder](#tsql-code-smells-finder) | [TSQL Code Smells Finder] | 2013-02-15 | 2008-2014 | Dave ballantyne | Yes | No | | [SQLTreeo](#sqltreeo) | [SQLTreeo] | 2017-06-06 | 2012-2017 | SQLTreeo | No | €50 | -| [ApexSQL Complete](#apexsql-complete) | [ApexSQL Complete] | 2017-10-26 | 2012-2017 | ApexSQL tools | Yes | No | -| [ApexSQL Refactor](#apexsql-refactor) | [ApexSQL Refactor] | 2017-07-13 | 2008-2017 | ApexSQL tools | Yes | No | -| [ApexSQL Search](#apexsql-search) | [ApexSQL Search] | 2017-06-19 | 2008-2017 | ApexSQL tools | Yes | No | -| [ApexSQL Source Control](#apexsql-source-control) | [ApexSQL Source Control] | 2017-10-12 | 2008-2017 | ApexSQL tools | No | $299 | -| [ApexSQL Unit Test](#apexsql-unit-test) | [ApexSQL Unit Test] | 2017-08-16 | 2008-2017 | ApexSQL tools | Yes | $499 | +| [ApexSQL Complete](#apexsql-complete) | [ApexSQL Complete] | 2021-01-20 | 2012-2019 | ApexSQL tools | No | $514 | +| [ApexSQL Refactor](#apexsql-refactor) | [ApexSQL Refactor] | 2021-01-20 | 2008-2019 | ApexSQL tools | No | $514 | +| [ApexSQL Search](#apexsql-search) | [ApexSQL Search] | 2021-01-20 | 2008-2019 | ApexSQL tools | No | $514 | +| [ApexSQL Source Control](#apexsql-source-control) | [ApexSQL Source Control] | 2021-01-20 | 2008-2019 | ApexSQL tools | No | $257 | +| [ApexSQL Unit Test](#apexsql-unit-test) | [ApexSQL Unit Test] | 2021-01-20 | 2008-2019 | ApexSQL tools | No | $514 | | [Spotlight Developer](#spotlight-developer) | [Spotlight Developer] | 2016-02-04 | 2008-2014 | Spotlight Essentials | Yes | No | | [dbForge Source Control](#dbforge-source-control) | [dbForge Source Control] | 2019-10-10 | 2005-2018 | Devart | No | $249 | | [dbForge Unit Test](#dbforge-unit-test) | [dbForge Unit Test] | 2019-10-10 | 2005-2018 | Devart | No | $199 | @@ -242,11 +242,11 @@ Price: €50 ## ApexSQL Complete Download page: [ApexSQL Complete]
-Release date: 2017-10-26
-Support Version: 2008-2017
+Release date: 2021-01-20
+Support Version: 2008-2019
Developer: ApexSQL tools
-Free version: Yes
-Price: No +Free version: No
+Price: $514 - Automatically complete SQL statements - Review an objects script and description @@ -261,11 +261,11 @@ Price: No ## ApexSQL Refactor Download page: [ApexSQL Refactor]
-Release date: 2017-05-08
-Support Version: 2008-2017
+Release date: 2021-01-20
+Support Version: 2008-2019
Developer: ApexSQL tools
-Free version: Yes
-Price: No +Free version: No
+Price: $514 With ApexSQL Refactor you can: - Format SQL with over 160 options @@ -281,11 +281,11 @@ With ApexSQL Refactor you can: ## ApexSQL Search Download page: [ApexSQL Search]
-Release date: 2017-06-19
-Support Version: 2008-2017
+Release date: 2021-01-20
+Support Version: 2008-2019
Developer: ApexSQL tools
-Free version: Yes
-Price: No +Free version: No
+Price: $514 With ApexSQL Search you can: - Search for SQL objects @@ -299,11 +299,11 @@ With ApexSQL Search you can: ## ApexSQL Source Control Download page: [ApexSQL Source Control]
-Release date: 2017-10-12
-Support Version: 2008-2017
+Release date: 2021-01-20
+Support Version: 2008-2019
Developer: ApexSQL tools
Free version: No
-Price: $299 +Price: $257 - Integrate SQL source control directly into SSMS - Use dedicated or shared development models @@ -318,8 +318,8 @@ Price: $299 ## ApexSQL Unit Test Download page: [ApexSQL Unit Test]
-Release date: 2017-08-22
-Support Version: 2008-2017
+Release date: 2021-01-20
+Support Version: 2008-2019
Developer: ApexSQL tools
Free version: No
Price: $499 From 0a8d4edf8ee8e7c1dc92f67c26271a5a8e1056ea Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 12 May 2021 21:38:08 +0300 Subject: [PATCH 331/553] Update SQL Server 2017 install recommendation --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index f501b165..0763d683 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -130,7 +130,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | -| 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | +| 2017 | [Install 2017 RTM] then [CU25 KB5003830] | 14.0.1000.169
14.0.3401.7 | 2017-10-02
2021-07-12 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU17 KB5001092] | 13.0.5026.0
13.0.5888.11 | 2018-04-24
2021-03-29 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | @@ -140,7 +140,7 @@ Profits: [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install [CU7 KB4570012]:https://support.microsoft.com/help/4570012 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 -[CU21 KB4557397]:https://support.microsoft.com/help/4557397 +[CU25 KB5003830]:https://support.microsoft.com/help/50038307 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [CU17 KB5001092]:https://support.microsoft.com/help/5001092 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 From 97c9de16639ea28c8c1be9691539a1aeb1ed2b1d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 13 May 2021 21:40:20 +0300 Subject: [PATCH 332/553] Update SQL Server 2017 CU25 distrib info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 0763d683..434026a1 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -179,7 +179,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | | [SQL Server 2019 CU7] | SQLServer2019-KB4570012-x64.exe | 2020-09-02 | 15.0.4053.23 | 604 | f77dcdcf86f73088437466ae9c5a99da55b093dc | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | -| [SQL Server 2017 CU21] | SQLServer2017-KB4557397-x64.exe | 2020-07-01 | 14.0.3335.7 | 533 | e91bfa33a34accf82a0c374c9e8b7d0ce3b7ce05 | +| [SQL Server 2017 CU25] | SQLServer2017-KB5003830-x64.exe | 2021-07-12 | 14.0.3401.7 | 533 | bcd8cf2bfa6d57fca1a6a916a3f54d11687aa97f | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | | [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | f9a30a72026251ddb3ba4bc840135066b528a494 | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | @@ -199,7 +199,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 [SQL Server 2019 CU7]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4570012-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 -[SQL Server 2017 CU21]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4557397-x64.exe +[SQL Server 2017 CU25]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB5003830-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [SQL Server 2016 SP2 CU17]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB5001092-x64.exe From e3e9b4ce6f502d7f4a08b2c5ffec25bd72311012 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 14 May 2021 21:45:22 +0300 Subject: [PATCH 333/553] Add SQL Server 2019 CVE-2021-1636 --- SQL Server Version.md | 52 ++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 434026a1..3112f78f 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -420,30 +420,32 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) Developer Edition (64-bit) on … ``` -| Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | -|---------------|-------------------|--------|------|---------------|---------|-----------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | **Latest** | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | -| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Withdrawn** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | -| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | -| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | -| 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | -| 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | -| 15.0.4013.40 | 2019.150.4013.40 | RTM | CU | | 4536075 | [Cumulative Update 2 for SQL Server 2019] | 2020-02-07 | 2020-02-03 | 134 | 88 | 537 | 904 | -| 15.0.4003.23 | 2019.150.4003.23 | RTM | CU | | 4527376 | [Cumulative Update 1 for SQL Server 2019] | 2020-01-07 | 2019-12-06 | 83 | 62 | 452 | 904 | -| 15.0.2070.41 | 2019.150.2070.41 | RTM | GDR | | 4517790 | [Servicing Update for SQL Server 2019 RTM] | 2019-11-04 | 2019-10-28 | 1 | 1 | 452 | 904 | -| 15.0.2000.5 | 2019.150.2000.5 | RTM | RTM | | | [Microsoft SQL Server 2019 RTM] | 2019-11-04 | 2019-09-24 | | | 1360 | 904 | -| 15.0.1900.47 | 2019.150.1900.47 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1.1 (RC1.1) | 2019-08-28 | 2019-08-17 | | | 1360 | 904 | -| 15.0.1900.25 | 2019.150.1900.25 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1 (RC1) | 2019-08-21 | 2019-08-17 | | | 1360 | 904 | -| 15.0.1800.32 | 2019.150.1800.32 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.2 | 2019-07-24 | 2019-07-18 | | | 1358 | 904 | -| 15.0.1700.0 | 2019.150.1700.0 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.1 | 2019-06-26 | 2019-06-20 | | | 1341 | 902 | -| 15.0.1600.8 | 2019.150.1600.8 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.0 | 2019-05-22 | 2019-05-17 | | | 1339 | 902 | -| 15.0.1500.28 | 2019.150.1500.28 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.5 | 2019-04-23 | 2019-04-16 | | | 1340 | 897 | -| 15.0.1400.75 | 2019.150.1400.75 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.4 | 2019-03-27 | 2019-03-17 | | | 1331 | 897 | -| 15.0.1300.359 | 2019.150.1200.359 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.3 | 2019-03-01 | 2019-02-16 | | | 1331 | 897 | -| 15.0.1200.24 | 2018.150.1200.24 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.2 | 2018-12-11 | 2018-11-02 | | | 1302 | 896 | -| 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | -| 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | - +| Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | +|---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| +| 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | 2020-07-25 | 1 | 1 | 607 | 904 | +| 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | +| 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Withdrawn** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | +| 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | +| 15.0.4043.16 | 2019.150.4043.16 | RTM | CU | | 4552255 | [Cumulative Update 5 for SQL Server 2019] | 2020-06-22 | 2020-06-10 | 86 | 58 | 603 | 904 | +| 15.0.4033.1 | 2019.150.4033.1 | RTM | CU | | 4548597 | [Cumulative Update 4 for SQL Server 2019] | 2020-03-31 | 2020-03-04 | 50 | 38 | 571 | 904 | +| 15.0.4023.6 | 2019.150.4023.6 | RTM | CU | | 4538853 | [Cumulative Update 3 for SQL Server 2019] | 2020-03-12 | 2020-02-20 | 56 | 11 | 572 | 904 | +| 15.0.4013.40 | 2019.150.4013.40 | RTM | CU | | 4536075 | [Cumulative Update 2 for SQL Server 2019] | 2020-02-07 | 2020-02-03 | 134 | 88 | 537 | 904 | +| 15.0.4003.23 | 2019.150.4003.23 | RTM | CU | | 4527376 | [Cumulative Update 1 for SQL Server 2019] | 2020-01-07 | 2019-12-06 | 83 | 62 | 452 | 904 | +| 15.0.2070.41 | 2019.150.2070.41 | RTM | GDR | | 4517790 | [Servicing Update for SQL Server 2019 RTM] | 2019-11-04 | 2019-10-28 | 1 | 1 | 452 | 904 | +| 15.0.2000.5 | 2019.150.2000.5 | RTM | RTM | | | [Microsoft SQL Server 2019 RTM] | 2019-11-04 | 2019-09-24 | | | 1360 | 904 | +| 15.0.1900.47 | 2019.150.1900.47 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1.1 (RC1.1) | 2019-08-28 | 2019-08-17 | | | 1360 | 904 | +| 15.0.1900.25 | 2019.150.1900.25 | CTP | RC | | | Microsoft SQL Server 2019 Release Candidate 1 (RC1) | 2019-08-21 | 2019-08-17 | | | 1360 | 904 | +| 15.0.1800.32 | 2019.150.1800.32 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.2 | 2019-07-24 | 2019-07-18 | | | 1358 | 904 | +| 15.0.1700.0 | 2019.150.1700.0 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.1 | 2019-06-26 | 2019-06-20 | | | 1341 | 902 | +| 15.0.1600.8 | 2019.150.1600.8 | CTP | CTP | | | Microsoft SQL Server 2019 CTP3.0 | 2019-05-22 | 2019-05-17 | | | 1339 | 902 | +| 15.0.1500.28 | 2019.150.1500.28 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.5 | 2019-04-23 | 2019-04-16 | | | 1340 | 897 | +| 15.0.1400.75 | 2019.150.1400.75 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.4 | 2019-03-27 | 2019-03-17 | | | 1331 | 897 | +| 15.0.1300.359 | 2019.150.1200.359 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.3 | 2019-03-01 | 2019-02-16 | | | 1331 | 897 | +| 15.0.1200.24 | 2018.150.1200.24 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.2 | 2018-12-11 | 2018-11-02 | | | 1302 | 896 | +| 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | +| 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | + +[Security update for SQL Server 2019 CU8: January 12, 2021]:https://support.microsoft.com/help/4583459 [Cumulative Update 8 for SQL Server 2019]:https://support.microsoft.com/help/4577194 [Cumulative Update 7 for SQL Server 2019]:https://support.microsoft.com/help/4570012 [Cumulative Update 6 for SQL Server 2019]:https://support.microsoft.com/help/4563110 @@ -472,7 +474,7 @@ Microsoft SQL Server 2017 (RTM-CU25) (KB5003830) - 14.0.3401.7 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | 2021-06-26 | 19 | 18 | 533 | +| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | **Latest CU** | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | 2021-06-26 | 19 | 18 | 533 | | 14.0.3391.2 | 2017.140.3391.2 | RTM | CU | | 5001228 | [Microsoft SQL Server 2017 CU24] | 2021-05-10 | ? | 30 | 24 | 533 | | 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | From 971ee9fdbeb3e816da267b6c8b3de44259ea882f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 15 May 2021 21:47:27 +0300 Subject: [PATCH 334/553] Add SQL Server 2019 CU9 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 3112f78f..22cf3041 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,7 +422,8 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | 2020-07-25 | 1 | 1 | 607 | 904 | +| 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | +| 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 607 | 904 | | 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | | 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Withdrawn** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | | 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | @@ -445,6 +446,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +[Cumulative Update 9 for SQL Server 2019]:https://support.microsoft.com/help/5000642 [Security update for SQL Server 2019 CU8: January 12, 2021]:https://support.microsoft.com/help/4583459 [Cumulative Update 8 for SQL Server 2019]:https://support.microsoft.com/help/4577194 [Cumulative Update 7 for SQL Server 2019]:https://support.microsoft.com/help/4570012 From fe86a0f97c08f9462ca7211d4bee86b6696e8e63 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 16 May 2021 21:48:55 +0300 Subject: [PATCH 335/553] Add SQL Server 2019 CU10 --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index 22cf3041..98b3fca2 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,6 +422,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| +| 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | 607 | 904 | | 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | | 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 607 | 904 | | 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | @@ -446,6 +447,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +[Cumulative Update 10 for SQL Server 2019]:https://support.microsoft.com/help/5001090 [Cumulative Update 9 for SQL Server 2019]:https://support.microsoft.com/help/5000642 [Security update for SQL Server 2019 CU8: January 12, 2021]:https://support.microsoft.com/help/4583459 [Cumulative Update 8 for SQL Server 2019]:https://support.microsoft.com/help/4577194 From 22f5f3cab68b658b90f8f446fd7671371cfc54fd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 17 May 2021 21:50:09 +0300 Subject: [PATCH 336/553] Add SQL Server 2019 CU11 --- SQL Server Version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQL Server Version.md b/SQL Server Version.md index 98b3fca2..3bce5af9 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,6 +422,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| +| 15.0.4138.2 | 2019.150.4138.2 | RTM | CU | | 5003249 | [Cumulative Update 11 for SQL Server 2019] | 2021-06-10 | ? | 62 | 35 | 607 | 904 | | 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | 607 | 904 | | 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | | 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 607 | 904 | @@ -447,6 +448,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | +[Cumulative Update 10 for SQL Server 2019]:https://support.microsoft.com/help/5003249 [Cumulative Update 10 for SQL Server 2019]:https://support.microsoft.com/help/5001090 [Cumulative Update 9 for SQL Server 2019]:https://support.microsoft.com/help/5000642 [Security update for SQL Server 2019 CU8: January 12, 2021]:https://support.microsoft.com/help/4583459 From 83f1cf85a35ddfb358bbb9623d3bb4ed9894af46 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 18 May 2021 21:51:21 +0300 Subject: [PATCH 337/553] Add SQL Server 2019 CU12 --- SQL Server Version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 3bce5af9..f4a4e329 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,6 +422,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| +| 15.0.4153.1 | 2019.150.4153.1 | RTM | CU | | 5004524 | [Cumulative Update 12 for SQL Server 2019] | 2021-08-04 | ? | 40 | 29 | 607 | 904 | | 15.0.4138.2 | 2019.150.4138.2 | RTM | CU | | 5003249 | [Cumulative Update 11 for SQL Server 2019] | 2021-06-10 | ? | 62 | 35 | 607 | 904 | | 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | 607 | 904 | | 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | @@ -448,7 +449,8 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | 15.0.1100.94 | 2018.150.1100.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.1 | 2018-11-06 | 2018-11-02 | | | 1299 | 896 | | 15.0.1000.34 | 2018.150.1000.34 | CTP | CTP | | | Microsoft SQL Server 2019 CTP2.0 | 2018-09-24 | 2018-09-18 | | | 1532 | 895 | -[Cumulative Update 10 for SQL Server 2019]:https://support.microsoft.com/help/5003249 +[Cumulative Update 12 for SQL Server 2019]:https://support.microsoft.com/help/5003249 +[Cumulative Update 11 for SQL Server 2019]:https://support.microsoft.com/help/5003249 [Cumulative Update 10 for SQL Server 2019]:https://support.microsoft.com/help/5001090 [Cumulative Update 9 for SQL Server 2019]:https://support.microsoft.com/help/5000642 [Security update for SQL Server 2019 CU8: January 12, 2021]:https://support.microsoft.com/help/4583459 From 612ce58e3e3efaf6288e438902764c2d5b7f24fa Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 19 May 2021 21:53:27 +0300 Subject: [PATCH 338/553] Update SQL Server 2019 CU12 info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index f4a4e329..b4185f38 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -414,7 +414,7 @@ More additional information about latest vNext SQL Server release you can find i Here is the latest output from `SELECT @@VERSION` for SQL Server 2019 CTP Developer Edition: ``` -Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) +Microsoft SQL Server 2019 (RTM-CU12) (KB4570012) - 15.0.4153.1 (X64) Aug 15 2020 10:48:11 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on … @@ -422,7 +422,7 @@ Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4153.1 | 2019.150.4153.1 | RTM | CU | | 5004524 | [Cumulative Update 12 for SQL Server 2019] | 2021-08-04 | ? | 40 | 29 | 607 | 904 | +| 15.0.4153.1 | 2019.150.4153.1 | RTM | CU | **Latest CU** | 5004524 | [Cumulative Update 12 for SQL Server 2019] | 2021-08-04 | ? | 40 | 29 | 607 | 904 | | 15.0.4138.2 | 2019.150.4138.2 | RTM | CU | | 5003249 | [Cumulative Update 11 for SQL Server 2019] | 2021-06-10 | ? | 62 | 35 | 607 | 904 | | 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | 607 | 904 | | 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | From 62e52c6dacbabb54a57761791bb37ec8272be967 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 20 May 2021 10:10:03 +0300 Subject: [PATCH 339/553] Add SQLFluff --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b41444e2..fe68e20d 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [DataWeekender](https://www.dataweekender.com/schedule) - [Dativerse](https://sessionize.com/dativerse) - Open Source Projects + - [SQLFluff - A SQL linter and auto-formatter for Humans](https://github.com/sqlfluff/sqlfluff) - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) - [Brent Ozar SQL Server First Responder Kit](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit) (Github) - [SQL Server Ola Hallengren's Maintenance Solution](https://github.com/olahallengren/sql-server-maintenance-solution) (by Ola Hallengren) (Github) From f0cc4effed3413b8bf7eeb1ef29d1900fafdca7a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 21 May 2021 21:55:36 +0300 Subject: [PATCH 340/553] Update SQL Server 2019 install recommendation --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index b4185f38..47ea3b68 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -129,7 +129,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| -| 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | +| 2019 | [Install 2019 RTM] then [CU12 KB5004524] | 15.0.2070.41
15.0.4153.1 | 2019-11-04
2021-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU25 KB5003830] | 14.0.1000.169
14.0.3401.7 | 2017-10-02
2021-07-12 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU17 KB5001092] | 13.0.5026.0
13.0.5888.11 | 2018-04-24
2021-03-29 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | @@ -138,7 +138,7 @@ Profits: | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install -[CU7 KB4570012]:https://support.microsoft.com/help/4570012 +[CU12 KB5004524]:https://support.microsoft.com/help/5004524 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU25 KB5003830]:https://support.microsoft.com/help/50038307 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 From e9245bd7094c59264733c7b8b0c49b7bc267cf43 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 22 May 2021 23:00:10 +0300 Subject: [PATCH 341/553] Update SQL Server 2019 distrib info --- SQL Server Version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 47ea3b68..38fbc984 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -177,7 +177,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | Direct x64 Download Link | File Name | Release Date | Build Number | Size, MB | SHA1 | |:--------------------------------|:------------------------------------------------------------------|:-------------|--------------:|---------:|------------------------------------------| | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | -| [SQL Server 2019 CU7] | SQLServer2019-KB4570012-x64.exe | 2020-09-02 | 15.0.4053.23 | 604 | f77dcdcf86f73088437466ae9c5a99da55b093dc | +| [SQL Server 2019 CU12] | SQLServer2019-KB5004524-x64.exe | 2021-08-04 | 15.0.4153.1 | 669 | f145a82e48219e5bf80c7dcf57ea3c902c4d395f | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU25] | SQLServer2017-KB5003830-x64.exe | 2021-07-12 | 14.0.3401.7 | 533 | bcd8cf2bfa6d57fca1a6a916a3f54d11687aa97f | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | @@ -197,7 +197,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ **For downloading distributive for SQL Server 2008 R2 and SQL Server 2008 you must have MSDN subscription, see [SQL Server 2008 R2] and [SQL Server 2008] links.** [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 -[SQL Server 2019 CU7]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4570012-x64.exe +[SQL Server 2019 CU12]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB5004524-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 [SQL Server 2017 CU25]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB5003830-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso From f5bf080cb100a3433f950640722b9d955314b7b7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 23 May 2021 23:01:39 +0300 Subject: [PATCH 342/553] Update SQL Server 2019 distrib size info --- SQL Server Version.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 38fbc984..f0037be6 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -422,11 +422,11 @@ Microsoft SQL Server 2019 (RTM-CU12) (KB4570012) - 15.0.4153.1 (X64) | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | DB Version | |---------------|-------------------|--------|------|---------------|---------|-------------------------------------------------------------|--------------|------------|------:|-------:|---------:|-----------:| -| 15.0.4153.1 | 2019.150.4153.1 | RTM | CU | **Latest CU** | 5004524 | [Cumulative Update 12 for SQL Server 2019] | 2021-08-04 | ? | 40 | 29 | 607 | 904 | -| 15.0.4138.2 | 2019.150.4138.2 | RTM | CU | | 5003249 | [Cumulative Update 11 for SQL Server 2019] | 2021-06-10 | ? | 62 | 35 | 607 | 904 | -| 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | 607 | 904 | -| 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | 607 | 904 | -| 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 607 | 904 | +| 15.0.4153.1 | 2019.150.4153.1 | RTM | CU | **Latest CU** | 5004524 | [Cumulative Update 12 for SQL Server 2019] | 2021-08-04 | ? | 40 | 29 | 669 | 904 | +| 15.0.4138.2 | 2019.150.4138.2 | RTM | CU | | 5003249 | [Cumulative Update 11 for SQL Server 2019] | 2021-06-10 | ? | 62 | 35 | ? | 904 | +| 15.0.4123.1 | 2019.150.4123.1 | RTM | CU | | 5001090 | [Cumulative Update 10 for SQL Server 2019] | 2021-04-06 | ? | 63 | 39 | ? | 904 | +| 15.0.4102.2 | 2019.150.4102.2 | RTM | CU | | 5000642 | [Cumulative Update 9 for SQL Server 2019] | 2021-02-11 | ? | 140 | 89 | ? | 904 | +| 15.0.4083.2 | 2019.150.4083.2 | RTM | GDR | CVE-2021-1636 | 4583459 | [Security update for SQL Server 2019 CU8: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | ? | 904 | | 15.0.4073.23 | 2019.150.4073.23 | RTM | CU | | 4577194 | [Cumulative Update 8 for SQL Server 2019] | 2020-10-01 | 2020-07-25 | 104 | 81 | 607 | 904 | | 15.0.4063.15 | 2019.150.4063.15 | RTM | CU | **Withdrawn** | 4570012 | [Cumulative Update 7 for SQL Server 2019] | 2020-09-02 | 2020-07-25 | 56 | 49 | 604 | 904 | | 15.0.4053.23 | 2019.150.4053.23 | RTM | CU | | 4563110 | [Cumulative Update 6 for SQL Server 2019] | 2020-08-04 | 2020-07-25 | 51 | 42 | 604 | 904 | From 70e69a57138c9b720af60eee26563c7b1244e091 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 24 May 2021 23:06:17 +0300 Subject: [PATCH 343/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b07a0e02..dc005236 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1387,6 +1387,7 @@ Articles types: | [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | +| [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2748,3 +2749,4 @@ Articles types: [Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 [Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ +[Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ From 4013fad5e5f9c88ce823beb219aff58c0f1496c2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 25 May 2021 23:07:50 +0300 Subject: [PATCH 344/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index dc005236..1b7f7ad8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1388,6 +1388,7 @@ Articles types: | [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | | [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | +| [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2750,3 +2751,4 @@ Articles types: [Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ +[Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ From 09a57cf1bb14bea5ea0cf3420c2c6bc776c3a4d2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 26 May 2021 23:09:58 +0300 Subject: [PATCH 345/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 1b7f7ad8..c5e79d55 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1389,6 +1389,7 @@ Articles types: | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | | [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | | [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | +| [The Curious Case of… the un-killable thread] | Paul Randal | 2021-04-20 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2752,3 +2753,4 @@ Articles types: [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ [Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ +[The Curious Case of… the un-killable thread]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-un-killable-thread/ From 0707c95b7b5492912d14255f2917db5c8088f680 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 27 May 2021 23:11:51 +0300 Subject: [PATCH 346/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c5e79d55..426e22a0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1390,6 +1390,7 @@ Articles types: | [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | | [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | | [The Curious Case of… the un-killable thread] | Paul Randal | 2021-04-20 | [DBA] | +| [olved steries #1 – SQL FCI Failovers] | Sean Gallardy | 2021-04-29 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2754,3 +2755,4 @@ Articles types: [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ [Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ [The Curious Case of… the un-killable thread]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-un-killable-thread/ +[olved steries #1 – SQL FCI Failovers]:https://www.seangallardy.com/olved-steries-1-sql-fci-failovers/ From 2cd81ffebb9e313c996999491e84e7d1b9e08d66 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 28 May 2021 23:13:31 +0300 Subject: [PATCH 347/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 426e22a0..215d6884 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1391,6 +1391,7 @@ Articles types: | [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | | [The Curious Case of… the un-killable thread] | Paul Randal | 2021-04-20 | [DBA] | | [olved steries #1 – SQL FCI Failovers] | Sean Gallardy | 2021-04-29 | [DBA] | +| [Possible configuration error: 1000000 IO requests allocated] | Sean Gallardy | 2021-05-23 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2756,3 +2757,4 @@ Articles types: [Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ [The Curious Case of… the un-killable thread]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-un-killable-thread/ [olved steries #1 – SQL FCI Failovers]:https://www.seangallardy.com/olved-steries-1-sql-fci-failovers/ +[Possible configuration error: 1000000 IO requests allocated]:https://www.seangallardy.com/possible-configuration-error-1000000-io-requests-allocated/ From bef2f2b3866b150341158a23ef58a1a59dc2ee2f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 29 May 2021 23:18:03 +0300 Subject: [PATCH 348/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 215d6884..72e4d6d2 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1392,6 +1392,7 @@ Articles types: | [The Curious Case of… the un-killable thread] | Paul Randal | 2021-04-20 | [DBA] | | [olved steries #1 – SQL FCI Failovers] | Sean Gallardy | 2021-04-29 | [DBA] | | [Possible configuration error: 1000000 IO requests allocated] | Sean Gallardy | 2021-05-23 | [DBA] | +| [Availability Group Long Failover Times] | Sean Gallardy | 2021-04-18 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2758,3 +2759,4 @@ Articles types: [The Curious Case of… the un-killable thread]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-un-killable-thread/ [olved steries #1 – SQL FCI Failovers]:https://www.seangallardy.com/olved-steries-1-sql-fci-failovers/ [Possible configuration error: 1000000 IO requests allocated]:https://www.seangallardy.com/possible-configuration-error-1000000-io-requests-allocated/ +[Availability Group Long Failover Times]:https://www.seangallardy.com/availability-group-long-failover-times/ From 5f008efab1f7a041357577c23c187f0dc0d567ee Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 30 May 2021 23:19:52 +0300 Subject: [PATCH 349/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 72e4d6d2..0935f7c0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1393,6 +1393,7 @@ Articles types: | [olved steries #1 – SQL FCI Failovers] | Sean Gallardy | 2021-04-29 | [DBA] | | [Possible configuration error: 1000000 IO requests allocated] | Sean Gallardy | 2021-05-23 | [DBA] | | [Availability Group Long Failover Times] | Sean Gallardy | 2021-04-18 | [DBA] | +| [Testing Backups and Offloading CheckDB] |Taryn Pratt | 2021-04-19 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2760,3 +2761,4 @@ Articles types: [olved steries #1 – SQL FCI Failovers]:https://www.seangallardy.com/olved-steries-1-sql-fci-failovers/ [Possible configuration error: 1000000 IO requests allocated]:https://www.seangallardy.com/possible-configuration-error-1000000-io-requests-allocated/ [Availability Group Long Failover Times]:https://www.seangallardy.com/availability-group-long-failover-times/ +[Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ From 4569a101995c7417484abd1462c1021b4cff8690 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 31 May 2021 17:24:27 +0300 Subject: [PATCH 350/553] Add Cached Data Per Object in Memory script --- Scripts/Cached_Data_Per_Object_in_Memory.sql | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Scripts/Cached_Data_Per_Object_in_Memory.sql diff --git a/Scripts/Cached_Data_Per_Object_in_Memory.sql b/Scripts/Cached_Data_Per_Object_in_Memory.sql new file mode 100644 index 00000000..e98f8d55 --- /dev/null +++ b/Scripts/Cached_Data_Per_Object_in_Memory.sql @@ -0,0 +1,39 @@ +/* + + List Cached Data Per Object in Memory + 1 data set: list Cached Data Per Object in Memory. + No + Pinal Dave + 2021-03-31 + 2021-03-31 by Konstantin Taranov + 1.0 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Cached_Data_Per_Object_in_Memory.sql + https://blog.sqlauthority.com/2021/03/31/sql-server-cached-data-per-object-in-memory/ + +*/ + +SELECT COUNT (1) * 8 / 1024 AS MBUsed, + OBJECT_SCHEMA_NAME(object_id) SchemaName, + name AS TableName, index_id +FROM sys.dm_os_buffer_descriptors AS bd + INNER JOIN + ( + SELECT object_name(object_id) AS name + ,index_id ,allocation_unit_id, object_id + FROM sys.allocation_units AS au + INNER JOIN sys.partitions AS p + ON au.container_id = p.hobt_id + AND (au.type = 1 OR au.type = 3) + UNION ALL + SELECT object_name(object_id) AS name + ,index_id, allocation_unit_id, object_id + FROM sys.allocation_units AS au + INNER JOIN sys.partitions AS p + ON au.container_id = p.partition_id + AND au.type = 2 + ) AS obj + ON bd.allocation_unit_id = obj.allocation_unit_id +WHERE database_id = DB_ID() +GROUP BY OBJECT_SCHEMA_NAME(object_id), name, index_id +ORDER BY COUNT (*) * 8 / 1024 DESC; +GO From 57c3b118598af0f94d8956978f27704700d63623 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 1 Jun 2021 23:24:11 +0300 Subject: [PATCH 351/553] article +1 --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 0935f7c0..bc2e8bb6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1393,7 +1393,8 @@ Articles types: | [olved steries #1 – SQL FCI Failovers] | Sean Gallardy | 2021-04-29 | [DBA] | | [Possible configuration error: 1000000 IO requests allocated] | Sean Gallardy | 2021-05-23 | [DBA] | | [Availability Group Long Failover Times] | Sean Gallardy | 2021-04-18 | [DBA] | -| [Testing Backups and Offloading CheckDB] |Taryn Pratt | 2021-04-19 | [DBA] | +| [Testing Backups and Offloading CheckDB] | Taryn Pratt | 2021-04-19 | [DBA] | +| [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2762,3 +2763,4 @@ Articles types: [Possible configuration error: 1000000 IO requests allocated]:https://www.seangallardy.com/possible-configuration-error-1000000-io-requests-allocated/ [Availability Group Long Failover Times]:https://www.seangallardy.com/availability-group-long-failover-times/ [Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ +[Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ From c30ccf63aa3bcdbcb4f579b710f46d3cf98130f3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 2 Jun 2021 23:26:46 +0300 Subject: [PATCH 352/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index bc2e8bb6..e20bc61a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1395,6 +1395,7 @@ Articles types: | [Availability Group Long Failover Times] | Sean Gallardy | 2021-04-18 | [DBA] | | [Testing Backups and Offloading CheckDB] | Taryn Pratt | 2021-04-19 | [DBA] | | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | +| [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2764,3 +2765,4 @@ Articles types: [Availability Group Long Failover Times]:https://www.seangallardy.com/availability-group-long-failover-times/ [Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ +[Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ From 79a47f88acd59eed0f046e6bfc21523c716efab0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 3 Jun 2021 23:28:53 +0300 Subject: [PATCH 353/553] Update SQL Server 2019 info --- SQL Server Version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index f0037be6..52da295a 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -415,7 +415,7 @@ Here is the latest output from `SELECT @@VERSION` for SQL Server 2019 CTP Develo ``` Microsoft SQL Server 2019 (RTM-CU12) (KB4570012) - 15.0.4153.1 (X64) - Aug 15 2020 10:48:11 + Jul 19 2021 15:37:34 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on … ``` From f993ab5abeafe8555a7d7c83126c0de86082632c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 4 Jun 2021 23:29:27 +0300 Subject: [PATCH 354/553] Update SQL Server 2019 info --- SQL Server Version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 52da295a..efa69394 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -414,7 +414,7 @@ More additional information about latest vNext SQL Server release you can find i Here is the latest output from `SELECT @@VERSION` for SQL Server 2019 CTP Developer Edition: ``` -Microsoft SQL Server 2019 (RTM-CU12) (KB4570012) - 15.0.4153.1 (X64) +Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64) Jul 19 2021 15:37:34 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on … From ddabfbf1cf0a8625934b0bc60572cac9be665adb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 5 Jun 2021 23:30:46 +0300 Subject: [PATCH 355/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e20bc61a..5535a009 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1396,6 +1396,7 @@ Articles types: | [Testing Backups and Offloading CheckDB] | Taryn Pratt | 2021-04-19 | [DBA] | | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | +| [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2766,3 +2767,4 @@ Articles types: [Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ [Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ +[Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ From 650ac8a47fb4024502d2de235b49513e20b75f7c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 7 Jun 2021 14:32:46 +0300 Subject: [PATCH 356/553] Add HammerDBBenchmark project --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fe68e20d..53483dff 100644 --- a/README.md +++ b/README.md @@ -398,6 +398,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SqlTableDependency - a high-level C# component used to audit, monitor and receive notifications on SQL Server's record table changes](https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency) (by Christian Del Bianco) - [EFSecondLevelCache.Core - Entity Framework Core Second Level Caching Library (Redis)](https://github.com/VahidN/EFSecondLevelCache.Core) (by Vahid Nasiri) - [Dotmim.Sync - a brand new database synchronization, multi platform, multi databases, developed on top of .Net Standard 2.0](https://github.com/Mimetis/Dotmim.Sync) + - [HammerDBBenchmark - Swarchy T101 Wilson HammerDb Benchmark Setup Scripts for SQL Server](https://github.com/swarchy/HammerDBBenchmark) (by Swarchy T101 Wilson) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 5ec7b9afd242d6aa1ec525e761a356a904031fd6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 7 Jun 2021 22:20:08 +0300 Subject: [PATCH 357/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5535a009..3b8f6994 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1397,6 +1397,7 @@ Articles types: | [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | +| [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2768,3 +2769,4 @@ Articles types: [Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ [Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ [Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ +[The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ From c29a57d4ea93fc8d984608b5bc18032c70624c5d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 8 Jun 2021 22:22:14 +0300 Subject: [PATCH 358/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3b8f6994..efedf172 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1398,6 +1398,7 @@ Articles types: | [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | | [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | +| [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2770,3 +2771,4 @@ Articles types: [Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ [Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ [The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ +[The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ From 3636a3c3708c8ac226770248b8da1421b21e8ed8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 9 Jun 2021 22:24:30 +0300 Subject: [PATCH 359/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index efedf172..72188244 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1399,6 +1399,7 @@ Articles types: | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | | [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | +| [SQL JOINs and UNIONs] | Thomas Kejser | 2020-03-13 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2772,3 +2773,4 @@ Articles types: [Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ [The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ +[SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 From 1ff7f58c9b094c00fdc854b505a5693e4ecf53c9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 10 Jun 2021 22:28:40 +0300 Subject: [PATCH 360/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 72188244..c14837ab 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1400,6 +1400,7 @@ Articles types: | [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | | [SQL JOINs and UNIONs] | Thomas Kejser | 2020-03-13 | [DBA][DEV] | +| [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2774,3 +2775,4 @@ Articles types: [The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ [SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 +[Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ From 2959a18efddddd9cb1698e196e8b43641b793175 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 11 Jun 2021 22:29:10 +0300 Subject: [PATCH 361/553] Fix typos --- Articles/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index c14837ab..9f6a9236 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1399,7 +1399,7 @@ Articles types: | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | | [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | -| [SQL JOINs and UNIONs] | Thomas Kejser | 2020-03-13 | [DBA][DEV] | +| [SQL JOINs and UNIONs] | Austin Smith | 2020-03-13 | [DBA][DEV] | | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ From e87548b4070ba1a3d302744d8f3914a9d6c47204 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 12 Jun 2021 22:30:51 +0300 Subject: [PATCH 362/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9f6a9236..e0eb15dc 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1401,6 +1401,7 @@ Articles types: | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | | [SQL JOINs and UNIONs] | Austin Smith | 2020-03-13 | [DBA][DEV] | | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | +| [How MERGE on two different rows can still deadlock you] | Daniel Hutmacher | 2021-05-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2776,3 +2777,4 @@ Articles types: [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ [SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 [Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ +[How MERGE on two different rows can still deadlock you]:https://sqlsunday.com/2021/05/04/how-merge-can-deadlock-you/ From fd9ce560dd72fcbf616de66806b6900acf5283d9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 13 Jun 2021 22:34:23 +0300 Subject: [PATCH 363/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e0eb15dc..796b1d6b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1402,6 +1402,7 @@ Articles types: | [SQL JOINs and UNIONs] | Austin Smith | 2020-03-13 | [DBA][DEV] | | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | | [How MERGE on two different rows can still deadlock you] | Daniel Hutmacher | 2021-05-04 | [DBA][DEV] | +| [Auto-failover Groups for Azure – Grace Period With Data Loss Hours] | Taiob Ali | 2021-03-31 | [AZ][DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2778,3 +2779,4 @@ Articles types: [SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 [Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ [How MERGE on two different rows can still deadlock you]:https://sqlsunday.com/2021/05/04/how-merge-can-deadlock-you/ +[Auto-failover Groups for Azure – Grace Period With Data Loss Hours]:https://sqlworldwide.com/auto-failover-groups-graceperiodwithdatalosshours/ From d96dcdd51b7bd5b7d1acb9f745b6136284c124dd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 13 Jun 2021 22:36:03 +0300 Subject: [PATCH 364/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 796b1d6b..b0cb7e3c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1403,6 +1403,7 @@ Articles types: | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | | [How MERGE on two different rows can still deadlock you] | Daniel Hutmacher | 2021-05-04 | [DBA][DEV] | | [Auto-failover Groups for Azure – Grace Period With Data Loss Hours] | Taiob Ali | 2021-03-31 | [AZ][DBA] | +| [How Parallel Plans Start Up – Part 1] | Paul White | 2021-03-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2780,3 +2781,4 @@ Articles types: [Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ [How MERGE on two different rows can still deadlock you]:https://sqlsunday.com/2021/05/04/how-merge-can-deadlock-you/ [Auto-failover Groups for Azure – Grace Period With Data Loss Hours]:https://sqlworldwide.com/auto-failover-groups-graceperiodwithdatalosshours/ +[How Parallel Plans Start Up – Part 1]:https://sqlperformance.com/2021/03/sql-performance/parallel-plans-start-1 From 5c4ddaf2106f7b186656d6ebdf0436eaef783e63 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 14 Jun 2021 22:38:38 +0300 Subject: [PATCH 365/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b0cb7e3c..05558cd8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1404,6 +1404,7 @@ Articles types: | [How MERGE on two different rows can still deadlock you] | Daniel Hutmacher | 2021-05-04 | [DBA][DEV] | | [Auto-failover Groups for Azure – Grace Period With Data Loss Hours] | Taiob Ali | 2021-03-31 | [AZ][DBA] | | [How Parallel Plans Start Up – Part 1] | Paul White | 2021-03-30 | [DBA][DEV] | +| [How Parallel Plans Start Up – Part 2] | Paul White | 2021-04-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2782,3 +2783,4 @@ Articles types: [How MERGE on two different rows can still deadlock you]:https://sqlsunday.com/2021/05/04/how-merge-can-deadlock-you/ [Auto-failover Groups for Azure – Grace Period With Data Loss Hours]:https://sqlworldwide.com/auto-failover-groups-graceperiodwithdatalosshours/ [How Parallel Plans Start Up – Part 1]:https://sqlperformance.com/2021/03/sql-performance/parallel-plans-start-1 +[How Parallel Plans Start Up – Part 2]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-2 From ffec907ee4909cde91e9c4bcff47b285acd581d2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 15 Jun 2021 22:42:23 +0300 Subject: [PATCH 366/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 05558cd8..88489f3b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1405,6 +1405,7 @@ Articles types: | [Auto-failover Groups for Azure – Grace Period With Data Loss Hours] | Taiob Ali | 2021-03-31 | [AZ][DBA] | | [How Parallel Plans Start Up – Part 1] | Paul White | 2021-03-30 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 2] | Paul White | 2021-04-08 | [DBA][DEV] | +| [How Parallel Plans Start Up – Part 3] | Paul White | 2021-04-20 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2784,3 +2785,4 @@ Articles types: [Auto-failover Groups for Azure – Grace Period With Data Loss Hours]:https://sqlworldwide.com/auto-failover-groups-graceperiodwithdatalosshours/ [How Parallel Plans Start Up – Part 1]:https://sqlperformance.com/2021/03/sql-performance/parallel-plans-start-1 [How Parallel Plans Start Up – Part 2]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-2 +[How Parallel Plans Start Up – Part 3]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-3 From a19d186e722d8b0e9505f9abba5981e8537e1c80 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 16 Jun 2021 00:25:28 +0300 Subject: [PATCH 367/553] Add nocount reference link --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 3377a01d..ff438d16 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -555,7 +555,7 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] - The procedure or function should begin with parameters checks (see example below) - Create `sp_` procedures only in `master` database - SQL Server will always scan through the system catalog first - Always use `BEGIN TRY` and `BEGIN CATCH` for error handling - - Use `SET NOCOUNT ON;` for stops the message that shows the count of the number of rows affected by a Transact-SQL statement and decreasing network traffic. + -
Use `SET NOCOUNT ON;` for stops the message that shows the count of the number of rows affected by a Transact-SQL statement and decreasing network traffic. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-set-nocount-problem-pe008-pe009) and [here][11]. - Do not use `SET NOCOUNT OFF;` because it is default behavior - Use `RAISERROR` instead `PRINT` if you want to give feedback about the state of the currently executing SQL batch without lags. From cb517891dd6ff768b11fe11b2decfe48413e4736 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 17 Jun 2021 22:44:49 +0300 Subject: [PATCH 368/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 88489f3b..11078107 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1406,6 +1406,7 @@ Articles types: | [How Parallel Plans Start Up – Part 1] | Paul White | 2021-03-30 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 2] | Paul White | 2021-04-08 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 3] | Paul White | 2021-04-20 | [DBA][DEV] | +| [How Parallel Plans Start Up – Part 4] | Paul White | 2021-05-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2786,3 +2787,4 @@ Articles types: [How Parallel Plans Start Up – Part 1]:https://sqlperformance.com/2021/03/sql-performance/parallel-plans-start-1 [How Parallel Plans Start Up – Part 2]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-2 [How Parallel Plans Start Up – Part 3]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-3 +[How Parallel Plans Start Up – Part 4]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-4 From 4a47ccc19d7eccb4299595acca8a9638dd0ea8db Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 18 Jun 2021 08:09:17 +0300 Subject: [PATCH 369/553] Add new argument for multi-line comment --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index ff438d16..8a980cf2 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -263,7 +263,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. [here](https://sqlblog.org/2019/09/12/bad-habits-to-kick-avoiding-the-schema-prefix). - Delimiters: **spaces** (not tabs). - Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems in different tools and programs. - More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/) and [here](https://sqlkover.com/ssis-and-the-ora-00907-missing-right-parenthesis-error/). + More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/), [here](https://sqlkover.com/ssis-and-the-ora-00907-missing-right-parenthesis-error/), and [here](https://docs.microsoft.com/troubleshoot/sql/admin/crashes-run-oracle-linked-server-query). - Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names. Main problems are: traffic issues, Memory Grants issues, Index usage issues. **Only one exception, see it below.** From 4460db9ad24b7afc169768a326b6d57d5d1c3ba1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 19 Jun 2021 22:46:00 +0300 Subject: [PATCH 370/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 11078107..f29b4f01 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1407,6 +1407,7 @@ Articles types: | [How Parallel Plans Start Up – Part 2] | Paul White | 2021-04-08 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 3] | Paul White | 2021-04-20 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 4] | Paul White | 2021-05-06 | [DBA][DEV] | +| [How Parallel Plans Start Up – Part 5] | Paul White | 2021-05-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2788,3 +2789,4 @@ Articles types: [How Parallel Plans Start Up – Part 2]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-2 [How Parallel Plans Start Up – Part 3]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-3 [How Parallel Plans Start Up – Part 4]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-4 +[How Parallel Plans Start Up – Part 5]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-5 From 5c41f9dc75f12b96a063b3b059450d9a8ddbd447 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 20 Jun 2021 22:48:44 +0300 Subject: [PATCH 371/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f29b4f01..5075fc59 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1408,6 +1408,7 @@ Articles types: | [How Parallel Plans Start Up – Part 3] | Paul White | 2021-04-20 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 4] | Paul White | 2021-05-06 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 5] | Paul White | 2021-05-17 | [DBA][DEV] | +| [Iterators, Query Plans, and Why They Run Backwards] | Paul White | 2010-08-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2790,3 +2791,4 @@ Articles types: [How Parallel Plans Start Up – Part 3]:https://sqlperformance.com/2021/04/sql-performance/parallel-plans-start-3 [How Parallel Plans Start Up – Part 4]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-4 [How Parallel Plans Start Up – Part 5]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-5 +[Iterators, Query Plans, and Why They Run Backwards]:https://www.sql.kiwi/2010/08/iterators-query-plans-and-why-they-run-backwards.html From 8f237bf5b9f42d2656c5a5da5f9456235a556f53 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 21 Jun 2021 10:35:43 +0300 Subject: [PATCH 372/553] Change default code page to UTF8 Fix case for data types --- Stored_Procedure/dbo.usp_bcpUnloadSelect.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Stored_Procedure/dbo.usp_bcpUnloadSelect.sql b/Stored_Procedure/dbo.usp_bcpUnloadSelect.sql index d974c63d..f5a6a107 100644 --- a/Stored_Procedure/dbo.usp_bcpUnloadSelect.sql +++ b/Stored_Procedure/dbo.usp_bcpUnloadSelect.sql @@ -2,19 +2,19 @@ IF OBJECT_ID('dbo.usp_bcpUnloadSelect', 'P') IS NULL EXECUTE('CREATE PROCEDURE d GO ALTER PROCEDURE dbo.usp_bcpUnloadSelect( - @outputFilePath VARCHAR(255) /* The path can have from 1 through 255 characters, see documentation */ - , @serverName SYSNAME = @@SERVERNAME - , @sqlCommand VARCHAR(MAX) - , @fileName VARCHAR(300) = '' - , @field_term VARCHAR( 10) = '|' - , @fileExtension VARCHAR( 10) = 'txt' - , @codePage VARCHAR( 10) = 'C1251' + @outputFilePath varchar(255) /* The path can have from 1 through 255 characters, see documentation */ + , @serverName sysname = @@SERVERNAME + , @sqlCommand varchar(MAX) + , @fileName varchar(300) = '' + , @field_term varchar( 10) = '|' + , @fileExtension varchar( 10) = 'txt' + , @codePage varchar( 10) = 'C65001' /* C1251 - Cyrillic */ , @row_term VARCHAR( 10) = '\n' , @debug BIT = 0 ) AS /*-- -Official bcp documentation: http://technet.microsoft.com/en-us/library/ms162802.aspx +Official bcp documentation: https://docs.microsoft.com/en-us/sql/tools/bcp-utility In select statement use full table names: DATABASENAME.SCHEMANAME.TABLENAME EXECUTE dbo.usp_bcpUnloadSelect @outputFilePath = 'd:\' From fd5b8c271c28ce91aec184c7174df867a70030b4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 23 Jun 2021 22:51:46 +0300 Subject: [PATCH 373/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5075fc59..9a6546a1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1409,6 +1409,7 @@ Articles types: | [How Parallel Plans Start Up – Part 4] | Paul White | 2021-05-06 | [DBA][DEV] | | [How Parallel Plans Start Up – Part 5] | Paul White | 2021-05-17 | [DBA][DEV] | | [Iterators, Query Plans, and Why They Run Backwards] | Paul White | 2010-08-05 | [DBA][DEV] | +| [What account is xp_cmdshell using?] | Kenneth Fisher | 2021-05-25 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2792,3 +2793,4 @@ Articles types: [How Parallel Plans Start Up – Part 4]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-4 [How Parallel Plans Start Up – Part 5]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-5 [Iterators, Query Plans, and Why They Run Backwards]:https://www.sql.kiwi/2010/08/iterators-query-plans-and-why-they-run-backwards.html +[What account is xp_cmdshell using?]:https://sqlstudies.com/2021/05/25/what-account-is-xp_cmdshell-using/ From aee20dca16ad1b9d3d3b9ca5ec96ed994fc9d3e3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 24 Jun 2021 22:54:34 +0300 Subject: [PATCH 374/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9a6546a1..f930d58b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1410,6 +1410,7 @@ Articles types: | [How Parallel Plans Start Up – Part 5] | Paul White | 2021-05-17 | [DBA][DEV] | | [Iterators, Query Plans, and Why They Run Backwards] | Paul White | 2010-08-05 | [DBA][DEV] | | [What account is xp_cmdshell using?] | Kenneth Fisher | 2021-05-25 | [DBA] | +| [Hammer Part 1 -What is HammerDB and why would I use it?] | Tom Wilson | 2021-04-17 | [BENCH][P] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2794,3 +2795,4 @@ Articles types: [How Parallel Plans Start Up – Part 5]:https://sqlperformance.com/2021/05/sql-performance/parallel-plans-start-5 [Iterators, Query Plans, and Why They Run Backwards]:https://www.sql.kiwi/2010/08/iterators-query-plans-and-why-they-run-backwards.html [What account is xp_cmdshell using?]:https://sqlstudies.com/2021/05/25/what-account-is-xp_cmdshell-using/ +[Hammer Part 1 -What is HammerDB and why would I use it?]:https://t101wilson.wordpress.com/2021/04/17/hammer-part-1-what-is-hammerdb-and-why-would-i-use-it/ From 1f97e6d9dad18ea6c0ade54b487f5bcbe9bd3d50 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 25 Jun 2021 22:56:08 +0300 Subject: [PATCH 375/553] add must read article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f930d58b..90a4d632 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1411,6 +1411,7 @@ Articles types: | [Iterators, Query Plans, and Why They Run Backwards] | Paul White | 2010-08-05 | [DBA][DEV] | | [What account is xp_cmdshell using?] | Kenneth Fisher | 2021-05-25 | [DBA] | | [Hammer Part 1 -What is HammerDB and why would I use it?] | Tom Wilson | 2021-04-17 | [BENCH][P] | +| [Hammer Part 2 -Let the Nail see the Hammer!] | Tom Wilson | 2021-05-26 | [BENCH][P] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2796,3 +2797,4 @@ Articles types: [Iterators, Query Plans, and Why They Run Backwards]:https://www.sql.kiwi/2010/08/iterators-query-plans-and-why-they-run-backwards.html [What account is xp_cmdshell using?]:https://sqlstudies.com/2021/05/25/what-account-is-xp_cmdshell-using/ [Hammer Part 1 -What is HammerDB and why would I use it?]:https://t101wilson.wordpress.com/2021/04/17/hammer-part-1-what-is-hammerdb-and-why-would-i-use-it/ +[Hammer Part 2 -Let the Nail see the Hammer!]:https://t101wilson.wordpress.com/2021/05/26/hammer-part-2-let-the-nail-see-the-hammer/ From bf1ba3bc6956d5ae62205981cb49e5b04e30d75a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 26 Jun 2021 23:01:44 +0300 Subject: [PATCH 376/553] article +1 --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 90a4d632..a52acaca 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1412,6 +1412,8 @@ Articles types: | [What account is xp_cmdshell using?] | Kenneth Fisher | 2021-05-25 | [DBA] | | [Hammer Part 1 -What is HammerDB and why would I use it?] | Tom Wilson | 2021-04-17 | [BENCH][P] | | [Hammer Part 2 -Let the Nail see the Hammer!] | Tom Wilson | 2021-05-26 | [BENCH][P] | +| [Fun with DATETIME Arithmetics] | Eitan Blumin | 2021-04-27 | [DBA][DEV] | +| [Even more fun with DATETIME arithmetics!] | Eitan Blumin | 2021-06-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2798,3 +2800,5 @@ Articles types: [What account is xp_cmdshell using?]:https://sqlstudies.com/2021/05/25/what-account-is-xp_cmdshell-using/ [Hammer Part 1 -What is HammerDB and why would I use it?]:https://t101wilson.wordpress.com/2021/04/17/hammer-part-1-what-is-hammerdb-and-why-would-i-use-it/ [Hammer Part 2 -Let the Nail see the Hammer!]:https://t101wilson.wordpress.com/2021/05/26/hammer-part-2-let-the-nail-see-the-hammer/ +[Fun with DATETIME Arithmetics]:https://eitanblumin.com/2021/04/27/fun-with-datetime-arithmetics/ +[Even more fun with DATETIME arithmetics!]:https://eitanblumin.com/2021/06/17/even-more-fun-with-datetime-arithmetics/ From ce0edb9c718a02643a2fca58243120ddd1c8945b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 27 Jun 2021 23:08:40 +0300 Subject: [PATCH 377/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a52acaca..5524c4ce 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1414,6 +1414,7 @@ Articles types: | [Hammer Part 2 -Let the Nail see the Hammer!] | Tom Wilson | 2021-05-26 | [BENCH][P] | | [Fun with DATETIME Arithmetics] | Eitan Blumin | 2021-04-27 | [DBA][DEV] | | [Even more fun with DATETIME arithmetics!] | Eitan Blumin | 2021-06-17 | [DBA][DEV] | +| [I learned to love WHILE (true) and you should too] | Eitan Blumin | 2021-02-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2802,3 +2803,4 @@ Articles types: [Hammer Part 2 -Let the Nail see the Hammer!]:https://t101wilson.wordpress.com/2021/05/26/hammer-part-2-let-the-nail-see-the-hammer/ [Fun with DATETIME Arithmetics]:https://eitanblumin.com/2021/04/27/fun-with-datetime-arithmetics/ [Even more fun with DATETIME arithmetics!]:https://eitanblumin.com/2021/06/17/even-more-fun-with-datetime-arithmetics/ +[I learned to love WHILE (true) and you should too]:https://eitanblumin.com/2021/02/16/i-learned-to-love-while-true-and-you-should-too/ From aedfd746d2ffe766cae11273c39bb92a39dbe507 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 28 Jun 2021 23:12:33 +0300 Subject: [PATCH 378/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 5524c4ce..b0eb66e3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1415,6 +1415,7 @@ Articles types: | [Fun with DATETIME Arithmetics] | Eitan Blumin | 2021-04-27 | [DBA][DEV] | | [Even more fun with DATETIME arithmetics!] | Eitan Blumin | 2021-06-17 | [DBA][DEV] | | [I learned to love WHILE (true) and you should too] | Eitan Blumin | 2021-02-16 | [DBA][DEV] | +| [Troubleshooting Long-Running SHRINK Operations] | Eitan Blumin | 2020-04-07 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2804,3 +2805,4 @@ Articles types: [Fun with DATETIME Arithmetics]:https://eitanblumin.com/2021/04/27/fun-with-datetime-arithmetics/ [Even more fun with DATETIME arithmetics!]:https://eitanblumin.com/2021/06/17/even-more-fun-with-datetime-arithmetics/ [I learned to love WHILE (true) and you should too]:https://eitanblumin.com/2021/02/16/i-learned-to-love-while-true-and-you-should-too/ +[Troubleshooting Long-Running SHRINK Operations]:https://eitanblumin.com/2020/04/07/troubleshooting-long-running-shrink-operations/ From fe15e81d890a417d593271038e9e3f257dd5d5cd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 29 Jun 2021 23:19:08 +0300 Subject: [PATCH 379/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b0eb66e3..9fd7d1e7 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1416,6 +1416,7 @@ Articles types: | [Even more fun with DATETIME arithmetics!] | Eitan Blumin | 2021-06-17 | [DBA][DEV] | | [I learned to love WHILE (true) and you should too] | Eitan Blumin | 2021-02-16 | [DBA][DEV] | | [Troubleshooting Long-Running SHRINK Operations] | Eitan Blumin | 2020-04-07 | [DBA] | +| [The Ultimate Compression Savings Estimation Script for an Entire Database] | Eitan Blumin | 2020-02-18 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2806,3 +2807,4 @@ Articles types: [Even more fun with DATETIME arithmetics!]:https://eitanblumin.com/2021/06/17/even-more-fun-with-datetime-arithmetics/ [I learned to love WHILE (true) and you should too]:https://eitanblumin.com/2021/02/16/i-learned-to-love-while-true-and-you-should-too/ [Troubleshooting Long-Running SHRINK Operations]:https://eitanblumin.com/2020/04/07/troubleshooting-long-running-shrink-operations/ +[The Ultimate Compression Savings Estimation Script for an Entire Database]:https://eitanblumin.com/2020/02/18/ultimate-compression-savings-estimation-script-entire-database/ From 79e8cc3b6c4561e8c8a490e32ed91f362400ce9e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 30 Jun 2021 23:24:40 +0300 Subject: [PATCH 380/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9fd7d1e7..66d303d9 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1417,6 +1417,7 @@ Articles types: | [I learned to love WHILE (true) and you should too] | Eitan Blumin | 2021-02-16 | [DBA][DEV] | | [Troubleshooting Long-Running SHRINK Operations] | Eitan Blumin | 2020-04-07 | [DBA] | | [The Ultimate Compression Savings Estimation Script for an Entire Database] | Eitan Blumin | 2020-02-18 | [DBA] | +| [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2808,3 +2809,4 @@ Articles types: [I learned to love WHILE (true) and you should too]:https://eitanblumin.com/2021/02/16/i-learned-to-love-while-true-and-you-should-too/ [Troubleshooting Long-Running SHRINK Operations]:https://eitanblumin.com/2020/04/07/troubleshooting-long-running-shrink-operations/ [The Ultimate Compression Savings Estimation Script for an Entire Database]:https://eitanblumin.com/2020/02/18/ultimate-compression-savings-estimation-script-entire-database/ +[The Complete Guide to Temporary Tables and Table Variables - Part 1]:https://www.madeiradata.com/post/the-complete-guide-to-temporary-tables-and-table-variables-part-1 From 9e104639ebc50a48d81cb22029923e907872b463 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 1 Jul 2021 21:26:21 +0300 Subject: [PATCH 381/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 66d303d9..0579d9c3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1418,6 +1418,7 @@ Articles types: | [Troubleshooting Long-Running SHRINK Operations] | Eitan Blumin | 2020-04-07 | [DBA] | | [The Ultimate Compression Savings Estimation Script for an Entire Database] | Eitan Blumin | 2020-02-18 | [DBA] | | [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | +| [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2810,3 +2811,4 @@ Articles types: [Troubleshooting Long-Running SHRINK Operations]:https://eitanblumin.com/2020/04/07/troubleshooting-long-running-shrink-operations/ [The Ultimate Compression Savings Estimation Script for an Entire Database]:https://eitanblumin.com/2020/02/18/ultimate-compression-savings-estimation-script-entire-database/ [The Complete Guide to Temporary Tables and Table Variables - Part 1]:https://www.madeiradata.com/post/the-complete-guide-to-temporary-tables-and-table-variables-part-1 +[Store Files in a File System, Not a Relational Database.]:https://www.brentozar.com/archive/2021/07/store-files-in-a-file-system-not-a-relational-database/ From b9b6fc0ae7a10c0c77869b552fd992a930e7da52 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 2 Jul 2021 21:29:21 +0300 Subject: [PATCH 382/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0579d9c3..2f4186ae 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1419,6 +1419,7 @@ Articles types: | [The Ultimate Compression Savings Estimation Script for an Entire Database] | Eitan Blumin | 2020-02-18 | [DBA] | | [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | | [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | +| [Most (XML) and Least (SQL_VARIANT) Favorite Data Type] | Eitan Blumin | 2021-03-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2812,3 +2813,4 @@ Articles types: [The Ultimate Compression Savings Estimation Script for an Entire Database]:https://eitanblumin.com/2020/02/18/ultimate-compression-savings-estimation-script-entire-database/ [The Complete Guide to Temporary Tables and Table Variables - Part 1]:https://www.madeiradata.com/post/the-complete-guide-to-temporary-tables-and-table-variables-part-1 [Store Files in a File System, Not a Relational Database.]:https://www.brentozar.com/archive/2021/07/store-files-in-a-file-system-not-a-relational-database/ +[Most (XML) and Least (SQL_VARIANT) Favorite Data Type]:https://eitanblumin.com/2021/03/09/t-sql-tuesday-136-most-and-least-favorite-data-type/ From e266d71c4f62fee375b0e43a30a21751d356db3d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 3 Jul 2021 21:31:45 +0300 Subject: [PATCH 383/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2f4186ae..9624f0c8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1420,6 +1420,7 @@ Articles types: | [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | | [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | | [Most (XML) and Least (SQL_VARIANT) Favorite Data Type] | Eitan Blumin | 2021-03-09 | [DBA][DEV] | +| [What should the CPU usage be of a fully-loaded CPU that has been throttled?] | Raymond | 2021-06-29 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2814,3 +2815,4 @@ Articles types: [The Complete Guide to Temporary Tables and Table Variables - Part 1]:https://www.madeiradata.com/post/the-complete-guide-to-temporary-tables-and-table-variables-part-1 [Store Files in a File System, Not a Relational Database.]:https://www.brentozar.com/archive/2021/07/store-files-in-a-file-system-not-a-relational-database/ [Most (XML) and Least (SQL_VARIANT) Favorite Data Type]:https://eitanblumin.com/2021/03/09/t-sql-tuesday-136-most-and-least-favorite-data-type/ +[What should the CPU usage be of a fully-loaded CPU that has been throttled?]:https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378 From 718b4b5ef2c56b49ace98146a355056323ff4e88 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 3 Jul 2021 21:33:57 +0300 Subject: [PATCH 384/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9624f0c8..ecfbc87c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1421,6 +1421,7 @@ Articles types: | [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | | [Most (XML) and Least (SQL_VARIANT) Favorite Data Type] | Eitan Blumin | 2021-03-09 | [DBA][DEV] | | [What should the CPU usage be of a fully-loaded CPU that has been throttled?] | Raymond | 2021-06-29 | [DBA][DEV] | +| [Fixing Queues with Watermarks] | Forrest Daniel | 2021-06-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2816,3 +2817,4 @@ Articles types: [Store Files in a File System, Not a Relational Database.]:https://www.brentozar.com/archive/2021/07/store-files-in-a-file-system-not-a-relational-database/ [Most (XML) and Least (SQL_VARIANT) Favorite Data Type]:https://eitanblumin.com/2021/03/09/t-sql-tuesday-136-most-and-least-favorite-data-type/ [What should the CPU usage be of a fully-loaded CPU that has been throttled?]:https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378 +[Fixing Queues with Watermarks]:https://forrestmcdaniel.com/2021/06/30/fixing-queues-with-watermarks/ From a3056a2cadc6a04a80094005079f54a6be8b2562 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 4 Jul 2021 21:35:36 +0300 Subject: [PATCH 385/553] article +1 --- Articles/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index ecfbc87c..3d856ba6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1417,11 +1417,12 @@ Articles types: | [I learned to love WHILE (true) and you should too] | Eitan Blumin | 2021-02-16 | [DBA][DEV] | | [Troubleshooting Long-Running SHRINK Operations] | Eitan Blumin | 2020-04-07 | [DBA] | | [The Ultimate Compression Savings Estimation Script for an Entire Database] | Eitan Blumin | 2020-02-18 | [DBA] | -| [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | -| [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | +| [The Complete Guide to Temporary Tables and Table Variables - Part 1] | Guy Glanster | 2021-04-08 | [DBA][DEV] | +| [Store Files in a File System, Not a Relational Database.] | Brent Ozar | 2021-07-01 | [DBA][DEV] | | [Most (XML) and Least (SQL_VARIANT) Favorite Data Type] | Eitan Blumin | 2021-03-09 | [DBA][DEV] | | [What should the CPU usage be of a fully-loaded CPU that has been throttled?] | Raymond | 2021-06-29 | [DBA][DEV] | | [Fixing Queues with Watermarks] | Forrest Daniel | 2021-06-30 | [DBA][DEV] | +| [How to Patch SQL Server] | Brent Ozar | 2021-06-04 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2818,3 +2819,4 @@ Articles types: [Most (XML) and Least (SQL_VARIANT) Favorite Data Type]:https://eitanblumin.com/2021/03/09/t-sql-tuesday-136-most-and-least-favorite-data-type/ [What should the CPU usage be of a fully-loaded CPU that has been throttled?]:https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378 [Fixing Queues with Watermarks]:https://forrestmcdaniel.com/2021/06/30/fixing-queues-with-watermarks/ +[How to Patch SQL Server]:https://www.brentozar.com/archive/2021/06/how-to-patch-sql-server/ From 7de62115f4da2361c72f19d6c94f4d7bd3c547be Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 5 Jul 2021 21:36:47 +0300 Subject: [PATCH 386/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3d856ba6..2d01124d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1423,6 +1423,7 @@ Articles types: | [What should the CPU usage be of a fully-loaded CPU that has been throttled?] | Raymond | 2021-06-29 | [DBA][DEV] | | [Fixing Queues with Watermarks] | Forrest Daniel | 2021-06-30 | [DBA][DEV] | | [How to Patch SQL Server] | Brent Ozar | 2021-06-04 | [DBA] | +| [“I’m getting index seeks. Why are my row estimates still wrong?”] | Brent Ozar | 2021-06-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2820,3 +2821,4 @@ Articles types: [What should the CPU usage be of a fully-loaded CPU that has been throttled?]:https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378 [Fixing Queues with Watermarks]:https://forrestmcdaniel.com/2021/06/30/fixing-queues-with-watermarks/ [How to Patch SQL Server]:https://www.brentozar.com/archive/2021/06/how-to-patch-sql-server/ +[“I’m getting index seeks. Why are my row estimates still wrong?”]:https://www.brentozar.com/archive/2021/06/how-can-index-seeks-get-inaccurate-row-estimates/ From 90433abf1877b5c4b1cf6ccccf48f1f8f50508bc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 6 Jul 2021 12:20:29 +0300 Subject: [PATCH 387/553] Update DBfiddle info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53483dff..ac70f697 100644 --- a/README.md +++ b/README.md @@ -415,7 +415,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Injection Cheat Sheet](https://www.netsparker.com/blog/web-security/sql-injection-cheat-sheet/) (by Ferruh Mavituna) - [Stackoverflow SQL Anti Patterns](http://stackoverflow.com/questions/346659/what-are-the-most-common-sql-anti-patterns) - [Azure Speed](http://www.azurespeed.com/) (by Blair Chen) - - [DBFiddle](https://dbfiddle.uk/?rdbms=sqlserver_2017) + - [DBFiddle - test your queries online](https://dbfiddle.uk/?rdbms=sqlserver_2019) - [Experts-Exchange.com MS SQL Server Topics](https://www.experts-exchange.com/topics/ms-sql-server/) - [Paste The Plan - share query plans quickly and easily](https://www.brentozar.com/pastetheplan/) (by Brent Ozar Team) - [StackExchange DataExplorer Query On line](http://data.stackexchange.com/stackoverflow/query/new) From 480b8545d49d965b4e14980b2e9dc19832d5e596 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 6 Jul 2021 12:56:27 +0300 Subject: [PATCH 388/553] Update SQL Server Name Convention and T-SQL Programming Style.md --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 8a980cf2..bfb78517 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -471,7 +471,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. SELECT @nvcmaxVariable; ``` More details [here](https://themondaymorningdba.wordpress.com/2018/09/13/them-concatenatin-blues/). - - Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`: + - Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`: ```tsql /* bad */ DECLARE @myBadVarcharVariable varchar; From 0c93ff252aa45dae861f38e919aeb4fa318c9c33 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 7 Jul 2021 21:38:54 +0300 Subject: [PATCH 389/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2d01124d..e2f1b6ff 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1424,6 +1424,7 @@ Articles types: | [Fixing Queues with Watermarks] | Forrest Daniel | 2021-06-30 | [DBA][DEV] | | [How to Patch SQL Server] | Brent Ozar | 2021-06-04 | [DBA] | | [“I’m getting index seeks. Why are my row estimates still wrong?”] | Brent Ozar | 2021-06-06 | [DBA][DEV] | +| [OLAP != OLAP Cube] | Cedric Chin | 2020-02-06 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2822,3 +2823,4 @@ Articles types: [Fixing Queues with Watermarks]:https://forrestmcdaniel.com/2021/06/30/fixing-queues-with-watermarks/ [How to Patch SQL Server]:https://www.brentozar.com/archive/2021/06/how-to-patch-sql-server/ [“I’m getting index seeks. Why are my row estimates still wrong?”]:https://www.brentozar.com/archive/2021/06/how-can-index-seeks-get-inaccurate-row-estimates/ +[OLAP != OLAP Cube]:https://www.holistics.io/blog/olap-is-not-olap-cube/ From c0ab4405ecaa18ab20ea6dccd1443626be68b617 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 8 Jul 2021 21:40:36 +0300 Subject: [PATCH 390/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e2f1b6ff..44a5c52c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1386,6 +1386,7 @@ Articles types: | [Incorrect Results with Parallel Eager Spools and Batch Mode] | Paul White | 2021-03-24 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | +| [Deprecated features to take out of your toolbox – Part 3] | Aaron Bertrand | 2021-07-01 | [DBA][DEV] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | | [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | | [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | @@ -2785,6 +2786,7 @@ Articles types: [Incorrect Results with Parallel Eager Spools and Batch Mode]:https://www.sql.kiwi/2021/03/spools-batch-mode-hp.html [Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 [Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 +[Deprecated features to take out of your toolbox – Part 3]:https://sqlperformance.com/2021/07/sql-performance/deprecated-features-3 [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ [Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ From 2a796b6be7b8ca1cd1ec335b30bbc8fd17c352bd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 9 Jul 2021 21:42:38 +0300 Subject: [PATCH 391/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 44a5c52c..092f7439 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1426,6 +1426,7 @@ Articles types: | [How to Patch SQL Server] | Brent Ozar | 2021-06-04 | [DBA] | | [“I’m getting index seeks. Why are my row estimates still wrong?”] | Brent Ozar | 2021-06-06 | [DBA][DEV] | | [OLAP != OLAP Cube] | Cedric Chin | 2020-02-06 | [DBA][DEV] | +| [Connecting a SQL Server client on Linux using Active Directory authentication] | Daniel Hutmacher | 2021-04-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2826,3 +2827,4 @@ Articles types: [How to Patch SQL Server]:https://www.brentozar.com/archive/2021/06/how-to-patch-sql-server/ [“I’m getting index seeks. Why are my row estimates still wrong?”]:https://www.brentozar.com/archive/2021/06/how-can-index-seeks-get-inaccurate-row-estimates/ [OLAP != OLAP Cube]:https://www.holistics.io/blog/olap-is-not-olap-cube/ +[Connecting a SQL Server client on Linux using Active Directory authentication]:https://sqlsunday.com/2021/04/15/connecting-linux-using-ad-authentication/ From 15ac19d9eedc7a05630636c41a17c4a00e580b05 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 10 Jul 2021 21:47:16 +0300 Subject: [PATCH 392/553] article +1 --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 092f7439..0db3169d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1427,6 +1427,8 @@ Articles types: | [“I’m getting index seeks. Why are my row estimates still wrong?”] | Brent Ozar | 2021-06-06 | [DBA][DEV] | | [OLAP != OLAP Cube] | Cedric Chin | 2020-02-06 | [DBA][DEV] | | [Connecting a SQL Server client on Linux using Active Directory authentication] | Daniel Hutmacher | 2021-04-15 | [DBA][DEV] | +| [Is a sort faster when the data is already sorted?] | Daniel Hutmacher | 2021-02-15 | [DBA][DEV] | +| [Connect using Windows authentication across domains] | Daniel Hutmacher | 2021-02-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2828,3 +2830,5 @@ Articles types: [“I’m getting index seeks. Why are my row estimates still wrong?”]:https://www.brentozar.com/archive/2021/06/how-can-index-seeks-get-inaccurate-row-estimates/ [OLAP != OLAP Cube]:https://www.holistics.io/blog/olap-is-not-olap-cube/ [Connecting a SQL Server client on Linux using Active Directory authentication]:https://sqlsunday.com/2021/04/15/connecting-linux-using-ad-authentication/ +[Is a sort faster when the data is already sorted?]:https://sqlsunday.com/2021/02/15/is-a-sort-faster-when-data-already-sorted/ +[Connect using Windows authentication across domains]:https://sqlsunday.com/2021/02/05/connect-using-windows-authentication-across-domains/ From 9c53956606b87e533d45199e0025698337b422bd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 11 Jul 2021 21:53:29 +0300 Subject: [PATCH 393/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0db3169d..59ec3f40 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1429,6 +1429,7 @@ Articles types: | [Connecting a SQL Server client on Linux using Active Directory authentication] | Daniel Hutmacher | 2021-04-15 | [DBA][DEV] | | [Is a sort faster when the data is already sorted?] | Daniel Hutmacher | 2021-02-15 | [DBA][DEV] | | [Connect using Windows authentication across domains] | Daniel Hutmacher | 2021-02-05 | [DBA][DEV] | +| [The uncorrelated correlated subquery] | Daniel Hutmacher | 2020-12-21 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2832,3 +2833,4 @@ Articles types: [Connecting a SQL Server client on Linux using Active Directory authentication]:https://sqlsunday.com/2021/04/15/connecting-linux-using-ad-authentication/ [Is a sort faster when the data is already sorted?]:https://sqlsunday.com/2021/02/15/is-a-sort-faster-when-data-already-sorted/ [Connect using Windows authentication across domains]:https://sqlsunday.com/2021/02/05/connect-using-windows-authentication-across-domains/ +[The uncorrelated correlated subquery]:https://sqlsunday.com/2020/12/21/the-uncorrelated-correlated-subquery/ From 37d6287d96940a263c3fb5496d190a3f327170dd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 12 Jul 2021 21:54:26 +0300 Subject: [PATCH 394/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 59ec3f40..9ccfee21 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1430,6 +1430,7 @@ Articles types: | [Is a sort faster when the data is already sorted?] | Daniel Hutmacher | 2021-02-15 | [DBA][DEV] | | [Connect using Windows authentication across domains] | Daniel Hutmacher | 2021-02-05 | [DBA][DEV] | | [The uncorrelated correlated subquery] | Daniel Hutmacher | 2020-12-21 | [DBA][DEV] | +| [How to fix rounding errors] | Daniel Hutmacher | 2020-12-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2834,3 +2835,4 @@ Articles types: [Is a sort faster when the data is already sorted?]:https://sqlsunday.com/2021/02/15/is-a-sort-faster-when-data-already-sorted/ [Connect using Windows authentication across domains]:https://sqlsunday.com/2021/02/05/connect-using-windows-authentication-across-domains/ [The uncorrelated correlated subquery]:https://sqlsunday.com/2020/12/21/the-uncorrelated-correlated-subquery/ +[How to fix rounding errors]:https://sqlsunday.com/2020/12/15/how-to-fix-rounding-errors/ From e4d8858f1b118d6546057fd45c61985fcce5bc5b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 13 Jul 2021 21:56:23 +0300 Subject: [PATCH 395/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9ccfee21..aeb3b62f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1431,6 +1431,7 @@ Articles types: | [Connect using Windows authentication across domains] | Daniel Hutmacher | 2021-02-05 | [DBA][DEV] | | [The uncorrelated correlated subquery] | Daniel Hutmacher | 2020-12-21 | [DBA][DEV] | | [How to fix rounding errors] | Daniel Hutmacher | 2020-12-15 | [DBA][DEV] | +| [The curious case of the Top N Sort] | Daniel Hutmacher | 2020-12-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2836,3 +2837,4 @@ Articles types: [Connect using Windows authentication across domains]:https://sqlsunday.com/2021/02/05/connect-using-windows-authentication-across-domains/ [The uncorrelated correlated subquery]:https://sqlsunday.com/2020/12/21/the-uncorrelated-correlated-subquery/ [How to fix rounding errors]:https://sqlsunday.com/2020/12/15/how-to-fix-rounding-errors/ +[The curious case of the Top N Sort]:https://sqlsunday.com/2020/12/08/the-curious-case-of-the-top-n-sort/ From bff760762fc7f1c80716511202e38cf40abf7e9e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 14 Jul 2021 22:02:45 +0300 Subject: [PATCH 396/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index aeb3b62f..53b0313d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1432,6 +1432,7 @@ Articles types: | [The uncorrelated correlated subquery] | Daniel Hutmacher | 2020-12-21 | [DBA][DEV] | | [How to fix rounding errors] | Daniel Hutmacher | 2020-12-15 | [DBA][DEV] | | [The curious case of the Top N Sort] | Daniel Hutmacher | 2020-12-08 | [DBA][DEV] | +| [Consolidating grouped transactions into evenly sized batches] | Daniel Hutmacher | 2020-07-13 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2838,3 +2839,4 @@ Articles types: [The uncorrelated correlated subquery]:https://sqlsunday.com/2020/12/21/the-uncorrelated-correlated-subquery/ [How to fix rounding errors]:https://sqlsunday.com/2020/12/15/how-to-fix-rounding-errors/ [The curious case of the Top N Sort]:https://sqlsunday.com/2020/12/08/the-curious-case-of-the-top-n-sort/ +[Consolidating grouped transactions into evenly sized batches]:https://sqlsunday.com/2020/07/13/grouping-into-evenly-sized-batches/ From c0282d41dfb510ee18fd2505623972d1677b4641 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 15 Jul 2021 22:04:05 +0300 Subject: [PATCH 397/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 53b0313d..1ae970e5 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1433,6 +1433,7 @@ Articles types: | [How to fix rounding errors] | Daniel Hutmacher | 2020-12-15 | [DBA][DEV] | | [The curious case of the Top N Sort] | Daniel Hutmacher | 2020-12-08 | [DBA][DEV] | | [Consolidating grouped transactions into evenly sized batches] | Daniel Hutmacher | 2020-07-13 | [DBA][DEV] | +| [A “shock absorber” pattern for high-performance data ingestion] | Daniel Hutmacher | 2021-07-15 | [P] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2840,3 +2841,4 @@ Articles types: [How to fix rounding errors]:https://sqlsunday.com/2020/12/15/how-to-fix-rounding-errors/ [The curious case of the Top N Sort]:https://sqlsunday.com/2020/12/08/the-curious-case-of-the-top-n-sort/ [Consolidating grouped transactions into evenly sized batches]:https://sqlsunday.com/2020/07/13/grouping-into-evenly-sized-batches/ +[A “shock absorber” pattern for high-performance data ingestion]:https://sqlsunday.com/2021/07/15/a-shock-absorber-pattern-for-high-performance-data-ingest/ From 7ed8abff7d01d597c3ac8f0b5de3157aefa4050d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 16 Jul 2021 22:06:01 +0300 Subject: [PATCH 398/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 1ae970e5..81145917 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1434,6 +1434,7 @@ Articles types: | [The curious case of the Top N Sort] | Daniel Hutmacher | 2020-12-08 | [DBA][DEV] | | [Consolidating grouped transactions into evenly sized batches] | Daniel Hutmacher | 2020-07-13 | [DBA][DEV] | | [A “shock absorber” pattern for high-performance data ingestion] | Daniel Hutmacher | 2021-07-15 | [P] | +| [Why Are Linked Server Queries So Bad?] | Brent Ozar | 2021-07-15 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2842,3 +2843,4 @@ Articles types: [The curious case of the Top N Sort]:https://sqlsunday.com/2020/12/08/the-curious-case-of-the-top-n-sort/ [Consolidating grouped transactions into evenly sized batches]:https://sqlsunday.com/2020/07/13/grouping-into-evenly-sized-batches/ [A “shock absorber” pattern for high-performance data ingestion]:https://sqlsunday.com/2021/07/15/a-shock-absorber-pattern-for-high-performance-data-ingest/ +[Why Are Linked Server Queries So Bad?]:https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/ From ee1b1235a2d8d602b21f079fa6a3ce16b7791b92 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 17 Jul 2021 22:13:37 +0300 Subject: [PATCH 399/553] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index c958aa86..89f65430 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2015-2020 Konstantin Taranov +Copyright (c) 2015-2021 Konstantin Taranov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b638dd8640682db1c125ead273ff4d1339725465 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 18 Jul 2021 22:15:53 +0300 Subject: [PATCH 400/553] Add Hekaton-based shock absorber pattern for SQL Server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2b5e43fb..73ba9e58 100644 --- a/README.md +++ b/README.md @@ -395,6 +395,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SqlTableDependency - a high-level C# component used to audit, monitor and receive notifications on SQL Server's record table changes](https://github.com/christiandelbianco/monitor-table-change-with-sqltabledependency) (by Christian Del Bianco) - [EFSecondLevelCache.Core - Entity Framework Core Second Level Caching Library (Redis)](https://github.com/VahidN/EFSecondLevelCache.Core) (by Vahid Nasiri) - [Dotmim.Sync - a brand new database synchronization, multi platform, multi databases, developed on top of .Net Standard 2.0](https://github.com/Mimetis/Dotmim.Sync) + - [Hekaton-based shock absorber pattern for SQL Server](https://github.com/sqlsunday/shock-absorber) (by Daniel Hutmacher) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From f2e728658d7ed6d0fde42338494035df49949f40 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 19 Jul 2021 22:20:17 +0300 Subject: [PATCH 401/553] article +1 --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 81145917..569253b7 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1434,7 +1434,8 @@ Articles types: | [The curious case of the Top N Sort] | Daniel Hutmacher | 2020-12-08 | [DBA][DEV] | | [Consolidating grouped transactions into evenly sized batches] | Daniel Hutmacher | 2020-07-13 | [DBA][DEV] | | [A “shock absorber” pattern for high-performance data ingestion] | Daniel Hutmacher | 2021-07-15 | [P] | -| [Why Are Linked Server Queries So Bad?] | Brent Ozar | 2021-07-15 | [DBA][DEV] | +| [Why Are Linked Server Queries So Bad?] | Brent Ozar | 2021-07-15 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 1] | Itzik Ben-Gan | 2021-04-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2844,3 +2845,4 @@ Articles types: [Consolidating grouped transactions into evenly sized batches]:https://sqlsunday.com/2020/07/13/grouping-into-evenly-sized-batches/ [A “shock absorber” pattern for high-performance data ingestion]:https://sqlsunday.com/2021/07/15/a-shock-absorber-pattern-for-high-performance-data-ingest/ [Why Are Linked Server Queries So Bad?]:https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/ +[Fundamentals of table expressions, Part 1]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-1 From 9c5384cddaee3b81cbb8c5f372368895c99f7c62 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 20 Jul 2021 22:21:50 +0300 Subject: [PATCH 402/553] article +1 --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index 569253b7..70210836 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1435,7 +1435,8 @@ Articles types: | [Consolidating grouped transactions into evenly sized batches] | Daniel Hutmacher | 2020-07-13 | [DBA][DEV] | | [A “shock absorber” pattern for high-performance data ingestion] | Daniel Hutmacher | 2021-07-15 | [P] | | [Why Are Linked Server Queries So Bad?] | Brent Ozar | 2021-07-15 | [DBA][DEV] | -| [Fundamentals of table expressions, Part 1] | Itzik Ben-Gan | 2021-04-08 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 1] | Itzik Ben-Gan | 2020-04-08 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations] | Itzik Ben-Gan | 2020-05-13 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2846,3 +2847,4 @@ Articles types: [A “shock absorber” pattern for high-performance data ingestion]:https://sqlsunday.com/2021/07/15/a-shock-absorber-pattern-for-high-performance-data-ingest/ [Why Are Linked Server Queries So Bad?]:https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/ [Fundamentals of table expressions, Part 1]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-1 +[Fundamentals of table expressions, Part 2 – Derived tables, logical considerations]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-2 From 4e39cefd6bf479f23dfcf5f941491abe81fc64b0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 22 Jul 2021 22:22:59 +0300 Subject: [PATCH 403/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 70210836..2c534a18 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1437,6 +1437,7 @@ Articles types: | [Why Are Linked Server Queries So Bad?] | Brent Ozar | 2021-07-15 | [DBA][DEV] | | [Fundamentals of table expressions, Part 1] | Itzik Ben-Gan | 2020-04-08 | [DBA][DEV] | | [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations] | Itzik Ben-Gan | 2020-05-13 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations] | Itzik Ben-Gan | 2020-06-10 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2848,3 +2849,4 @@ Articles types: [Why Are Linked Server Queries So Bad?]:https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/ [Fundamentals of table expressions, Part 1]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-1 [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-2 +[Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations]:https://sqlperformance.com/2020/06/t-sql-queries/table-expressions-part-3 From 4aedd31c386c20b05d1e97fda016d0d7006947c3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 23 Jul 2021 22:24:48 +0300 Subject: [PATCH 404/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2c534a18..bb38b5ba 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1438,6 +1438,7 @@ Articles types: | [Fundamentals of table expressions, Part 1] | Itzik Ben-Gan | 2020-04-08 | [DBA][DEV] | | [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations] | Itzik Ben-Gan | 2020-05-13 | [DBA][DEV] | | [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations] | Itzik Ben-Gan | 2020-06-10 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued] | Itzik Ben-Gan | 2020-07-08 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2850,3 +2851,4 @@ Articles types: [Fundamentals of table expressions, Part 1]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-1 [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-2 [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations]:https://sqlperformance.com/2020/06/t-sql-queries/table-expressions-part-3 +[Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued]:https://sqlperformance.com/2020/07/t-sql-queries/table-expressions-part-4 From d8da10bf0b9710ef25038643f5a8ce6688b082ec Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 24 Jul 2021 00:06:17 +0300 Subject: [PATCH 405/553] Add SQLBolt --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac70f697..835d6c9a 100644 --- a/README.md +++ b/README.md @@ -156,14 +156,14 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Kohera SQL Server Blog](https://kohera.be/blog/category/sql-server/) - Security (great thanks to [Troy Hunt](https://www.troyhunt.com/troys-ultimate-list-of-security-links/)) - SQL injection - - [sqlmap](http://sqlmap.org/) – The tool for mounting SQL injection attacks tests against a running site - - [Drupal 7 SQL injection flaw of 2014](https://www.drupal.org/PSA-2014-003) – great example of how impactful it still is (patch it within 7 hours or you’re owned) - - [Ethical Hacking: SQL Injection](http://www.pluralsight.com/courses/ethical-hacking-sql-injection) – If you really want to go deep, here’s five and a half hours worth of Pluralsight content + - [sqlmap - The tool for mounting SQL injection attacks tests against a running site](http://sqlmap.org/) + - [Drupal 7 SQL injection flaw of 2014](https://www.drupal.org/PSA-2014-003) – great example of how impactful it still is (patch it within 7 hours or you are owned) + - [Ethical Hacking: SQL Injection](http://www.pluralsight.com/courses/ethical-hacking-sql-injection) – If you really want to go deep, here is five and a half hours worth of Pluralsight content - Exploit databases and breach coverage - [seclists.org](http://seclists.org) – Heaps of exploits consolidated from various bug tracking lists - [Exploit Database](https://www.exploit-db.com/) – Very comprehensive list of vulnerabilities - [Data Loss DB](http://datalossdb.org/) – Good list of breaches including stats on number of records compromised - - [Information is Beautiful: World’s Biggest Data Breaches](http://www.informationisbeautiful.net/visualizations/worlds-biggest-data-breaches-hacks/) – Fantastic visualisation of incidents that give a great indication of scale + - [Information is Beautiful: World’s Biggest Data Breaches](http://www.informationisbeautiful.net/visualizations/worlds-biggest-data-breaches-hacks/) - [Biggest data breaches in history](https://www.comparitech.com/blog/information-security/biggest-data-breaches-in-history/) (by Dave Albaugh) - [Microsoft SQL Server Permissions Posters](https://github.com/Microsoft/sql-server-samples/tree/master/samples/features/security/permissions-posters) - [Module Signing Info](https://modulesigning.info/) - Info and resources related to module signing (i.e. Certificates, Asymmetric Keys, `ADD SIGNATURE`, etc) in T-SQL and SQLCLR @@ -212,6 +212,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Mixed Extents](https://youtu.be/hBgMadT9fuU) (by EightKB) - Courses - Free + - [SQLBolt - Learn SQL with simple, interactive exercises](https://sqlbolt.com/) - [Learning Extended Events in 60 Days](https://jasonbrimhall.info/2015/09/08/learning-extended-events-in-60-days/) and new [link](http://sqlxevents.com/) (by Jason Brimhall) - [Learn SQL Server by solving problems](https://littlekendra.com/courses-overview/) (by Little Kendra) - [Codecademy Learn SQL](https://www.codecademy.com/learn/learn-sql) From 98faad52bbc837cb0962dd5996a33a14ea0dbd12 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 24 Jul 2021 22:25:57 +0300 Subject: [PATCH 406/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index bb38b5ba..8c0bd9dc 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1439,6 +1439,7 @@ Articles types: | [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations] | Itzik Ben-Gan | 2020-05-13 | [DBA][DEV] | | [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations] | Itzik Ben-Gan | 2020-06-10 | [DBA][DEV] | | [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued] | Itzik Ben-Gan | 2020-07-08 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 5 – CTEs, logical considerations] | Itzik Ben-Gan | 2020-08-12 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2852,3 +2853,4 @@ Articles types: [Fundamentals of table expressions, Part 2 – Derived tables, logical considerations]:https://sqlperformance.com/2020/04/t-sql-queries/table-expressions-part-2 [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations]:https://sqlperformance.com/2020/06/t-sql-queries/table-expressions-part-3 [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued]:https://sqlperformance.com/2020/07/t-sql-queries/table-expressions-part-4 +[Fundamentals of table expressions, Part 5 – CTEs, logical considerations]:https://sqlperformance.com/2020/08/t-sql-queries/table-expressions-part-5 From 2b62a44c87de4c13452470d92b2aed8d41fd8a0c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 25 Jul 2021 22:28:58 +0300 Subject: [PATCH 407/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 8c0bd9dc..18b2dc6b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1440,6 +1440,7 @@ Articles types: | [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations] | Itzik Ben-Gan | 2020-06-10 | [DBA][DEV] | | [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued] | Itzik Ben-Gan | 2020-07-08 | [DBA][DEV] | | [Fundamentals of table expressions, Part 5 – CTEs, logical considerations] | Itzik Ben-Gan | 2020-08-12 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 6 – Recursive CTEs] | Itzik Ben-Gan | 2020-09-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2854,3 +2855,4 @@ Articles types: [Fundamentals of table expressions, Part 3 – Derived tables, optimization considerations]:https://sqlperformance.com/2020/06/t-sql-queries/table-expressions-part-3 [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued]:https://sqlperformance.com/2020/07/t-sql-queries/table-expressions-part-4 [Fundamentals of table expressions, Part 5 – CTEs, logical considerations]:https://sqlperformance.com/2020/08/t-sql-queries/table-expressions-part-5 +[Fundamentals of table expressions, Part 6 – Recursive CTEs]:https://sqlperformance.com/2020/09/t-sql-queries/fundamentals-of-table-expressions-part-6-recursive-ctes From 6b2492b9facabaa4e7ab49667313be1628062d81 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 26 Jul 2021 22:30:25 +0300 Subject: [PATCH 408/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 18b2dc6b..b4db688a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1441,6 +1441,7 @@ Articles types: | [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued] | Itzik Ben-Gan | 2020-07-08 | [DBA][DEV] | | [Fundamentals of table expressions, Part 5 – CTEs, logical considerations] | Itzik Ben-Gan | 2020-08-12 | [DBA][DEV] | | [Fundamentals of table expressions, Part 6 – Recursive CTEs] | Itzik Ben-Gan | 2020-09-09 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations] | Itzik Ben-Gan | 2020-10-14 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2856,3 +2857,4 @@ Articles types: [Fundamentals of table expressions, Part 4 – Derived tables, optimization considerations, continued]:https://sqlperformance.com/2020/07/t-sql-queries/table-expressions-part-4 [Fundamentals of table expressions, Part 5 – CTEs, logical considerations]:https://sqlperformance.com/2020/08/t-sql-queries/table-expressions-part-5 [Fundamentals of table expressions, Part 6 – Recursive CTEs]:https://sqlperformance.com/2020/09/t-sql-queries/fundamentals-of-table-expressions-part-6-recursive-ctes +[Fundamentals of table expressions, Part 7 – CTEs, optimization considerations]:https://sqlperformance.com/2020/10/t-sql-queries/table-expressions-part-7 From f629244eceafc52e4219cb1c997f81ffa347b1dd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 27 Jul 2021 22:31:31 +0300 Subject: [PATCH 409/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b4db688a..d5f5250a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1442,6 +1442,7 @@ Articles types: | [Fundamentals of table expressions, Part 5 – CTEs, logical considerations] | Itzik Ben-Gan | 2020-08-12 | [DBA][DEV] | | [Fundamentals of table expressions, Part 6 – Recursive CTEs] | Itzik Ben-Gan | 2020-09-09 | [DBA][DEV] | | [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations] | Itzik Ben-Gan | 2020-10-14 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued] | Itzik Ben-Gan | 2020-11-11 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2858,3 +2859,4 @@ Articles types: [Fundamentals of table expressions, Part 5 – CTEs, logical considerations]:https://sqlperformance.com/2020/08/t-sql-queries/table-expressions-part-5 [Fundamentals of table expressions, Part 6 – Recursive CTEs]:https://sqlperformance.com/2020/09/t-sql-queries/fundamentals-of-table-expressions-part-6-recursive-ctes [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations]:https://sqlperformance.com/2020/10/t-sql-queries/table-expressions-part-7 +[Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued]:https://sqlperformance.com/2020/11/t-sql-queries/table-expressions-part-8 From b0e89625d2d22acbd535b284b70f4c31748b7971 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 28 Jul 2021 22:32:56 +0300 Subject: [PATCH 410/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d5f5250a..8a2a4cc9 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1443,6 +1443,7 @@ Articles types: | [Fundamentals of table expressions, Part 6 – Recursive CTEs] | Itzik Ben-Gan | 2020-09-09 | [DBA][DEV] | | [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations] | Itzik Ben-Gan | 2020-10-14 | [DBA][DEV] | | [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued] | Itzik Ben-Gan | 2020-11-11 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs] | Itzik Ben-Gan | 2021-06-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2860,3 +2861,4 @@ Articles types: [Fundamentals of table expressions, Part 6 – Recursive CTEs]:https://sqlperformance.com/2020/09/t-sql-queries/fundamentals-of-table-expressions-part-6-recursive-ctes [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations]:https://sqlperformance.com/2020/10/t-sql-queries/table-expressions-part-7 [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued]:https://sqlperformance.com/2020/11/t-sql-queries/table-expressions-part-8 +[Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs]:https://sqlperformance.com/2021/06/t-sql-queries/table-expressions-part-9 From 8284ea7490d7132a1cb6d5e1ec2a8c1be579be44 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 29 Jul 2021 22:33:53 +0300 Subject: [PATCH 411/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 8a2a4cc9..1cf3aab4 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1444,6 +1444,7 @@ Articles types: | [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations] | Itzik Ben-Gan | 2020-10-14 | [DBA][DEV] | | [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued] | Itzik Ben-Gan | 2020-11-11 | [DBA][DEV] | | [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs] | Itzik Ben-Gan | 2021-06-09 | [DBA][DEV] | +| [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes] | Itzik Ben-Gan | 2021-07-14 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2862,3 +2863,4 @@ Articles types: [Fundamentals of table expressions, Part 7 – CTEs, optimization considerations]:https://sqlperformance.com/2020/10/t-sql-queries/table-expressions-part-7 [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued]:https://sqlperformance.com/2020/11/t-sql-queries/table-expressions-part-8 [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs]:https://sqlperformance.com/2021/06/t-sql-queries/table-expressions-part-9 +[Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes]:https://sqlperformance.com/2021/07/t-sql-queries/table-expressions-part-10 From 401a7ad7f02c37b2f3c04dbf4c1041188b385d76 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 30 Jul 2021 22:36:51 +0300 Subject: [PATCH 412/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 1cf3aab4..e1369bb6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1445,6 +1445,7 @@ Articles types: | [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued] | Itzik Ben-Gan | 2020-11-11 | [DBA][DEV] | | [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs] | Itzik Ben-Gan | 2021-06-09 | [DBA][DEV] | | [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes] | Itzik Ben-Gan | 2021-07-14 | [DBA][DEV] | +| [Understanding xp_fileexist and its usage] | Nisarg Upadhyay | 2021-07-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2864,3 +2865,4 @@ Articles types: [Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued]:https://sqlperformance.com/2020/11/t-sql-queries/table-expressions-part-8 [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs]:https://sqlperformance.com/2021/06/t-sql-queries/table-expressions-part-9 [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes]:https://sqlperformance.com/2021/07/t-sql-queries/table-expressions-part-10 +[Understanding xp_fileexist and its usage]:https://www.sqlshack.com/understanding-xp_fileexist-and-its-usage/ From 86a63273db9e8d892b9d85bdd4ac11b67ae8663e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 31 Jul 2021 22:38:29 +0300 Subject: [PATCH 413/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e1369bb6..98ef49b4 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1446,6 +1446,7 @@ Articles types: | [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs] | Itzik Ben-Gan | 2021-06-09 | [DBA][DEV] | | [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes] | Itzik Ben-Gan | 2021-07-14 | [DBA][DEV] | | [Understanding xp_fileexist and its usage] | Nisarg Upadhyay | 2021-07-09 | [DBA][DEV] | +| [SQL Server Restore Database Options and Examples] | Joe Gavin | 2021-06-21 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2866,3 +2867,4 @@ Articles types: [Fundamentals of table expressions, Part 9 – Views, compared with derived tables and CTEs]:https://sqlperformance.com/2021/06/t-sql-queries/table-expressions-part-9 [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes]:https://sqlperformance.com/2021/07/t-sql-queries/table-expressions-part-10 [Understanding xp_fileexist and its usage]:https://www.sqlshack.com/understanding-xp_fileexist-and-its-usage/ +[SQL Server Restore Database Options and Examples]:https://www.mssqltips.com/sqlservertip/6893/restore-database-sql-server-options-examples/ From 01716129030e588b1a21f5ab0361c4d2e9e5d77a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 1 Aug 2021 22:41:45 +0300 Subject: [PATCH 414/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 98ef49b4..6f03b25b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1447,6 +1447,7 @@ Articles types: | [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes] | Itzik Ben-Gan | 2021-07-14 | [DBA][DEV] | | [Understanding xp_fileexist and its usage] | Nisarg Upadhyay | 2021-07-09 | [DBA][DEV] | | [SQL Server Restore Database Options and Examples] | Joe Gavin | 2021-06-21 | [DBA] | +| [SQL Server Database RESTORE WITH MOVE or not WITH MOVE] | Mike Eastland | 2013-11-22 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2868,3 +2869,4 @@ Articles types: [Fundamentals of table expressions, Part 10 – Views, SELECT *, and DDL changes]:https://sqlperformance.com/2021/07/t-sql-queries/table-expressions-part-10 [Understanding xp_fileexist and its usage]:https://www.sqlshack.com/understanding-xp_fileexist-and-its-usage/ [SQL Server Restore Database Options and Examples]:https://www.mssqltips.com/sqlservertip/6893/restore-database-sql-server-options-examples/ +[SQL Server Database RESTORE WITH MOVE or not WITH MOVE]:https://www.mssqltips.com/sqlservertip/3113/sql-server-database-restore-with-move-or-not-with-move/ From 8cca634ea021c8029f2b689fac0c099dadcdaf73 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 2 Aug 2021 22:43:44 +0300 Subject: [PATCH 415/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 6f03b25b..7489039b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1448,6 +1448,7 @@ Articles types: | [Understanding xp_fileexist and its usage] | Nisarg Upadhyay | 2021-07-09 | [DBA][DEV] | | [SQL Server Restore Database Options and Examples] | Joe Gavin | 2021-06-21 | [DBA] | | [SQL Server Database RESTORE WITH MOVE or not WITH MOVE] | Mike Eastland | 2013-11-22 | [DBA] | +| [Getting exclusive access to restore SQL Server database] | Greg Robidoux | 2021-02-21 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2870,3 +2871,4 @@ Articles types: [Understanding xp_fileexist and its usage]:https://www.sqlshack.com/understanding-xp_fileexist-and-its-usage/ [SQL Server Restore Database Options and Examples]:https://www.mssqltips.com/sqlservertip/6893/restore-database-sql-server-options-examples/ [SQL Server Database RESTORE WITH MOVE or not WITH MOVE]:https://www.mssqltips.com/sqlservertip/3113/sql-server-database-restore-with-move-or-not-with-move/ +[Getting exclusive access to restore SQL Server database]:https://www.mssqltips.com/sqlservertip/1407/getting-exclusive-access-to-restore-sql-server-database/ From f8a61a1284ae98358fc9ce3ad763bb7d94019f40 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 3 Aug 2021 22:44:53 +0300 Subject: [PATCH 416/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 7489039b..71581b16 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1449,6 +1449,7 @@ Articles types: | [SQL Server Restore Database Options and Examples] | Joe Gavin | 2021-06-21 | [DBA] | | [SQL Server Database RESTORE WITH MOVE or not WITH MOVE] | Mike Eastland | 2013-11-22 | [DBA] | | [Getting exclusive access to restore SQL Server database] | Greg Robidoux | 2021-02-21 | [DBA] | +| [How to migrate a SQL Server database to a lower version] | Basit Farooq | 2019-08-05 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2872,3 +2873,4 @@ Articles types: [SQL Server Restore Database Options and Examples]:https://www.mssqltips.com/sqlservertip/6893/restore-database-sql-server-options-examples/ [SQL Server Database RESTORE WITH MOVE or not WITH MOVE]:https://www.mssqltips.com/sqlservertip/3113/sql-server-database-restore-with-move-or-not-with-move/ [Getting exclusive access to restore SQL Server database]:https://www.mssqltips.com/sqlservertip/1407/getting-exclusive-access-to-restore-sql-server-database/ +[How to migrate a SQL Server database to a lower version]:https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/ From 91cb78600e19116e32e958ab16e1b1d2e0ba86af Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 4 Aug 2021 22:47:12 +0300 Subject: [PATCH 417/553] article +1 --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 71581b16..4f40bf6e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1450,6 +1450,7 @@ Articles types: | [SQL Server Database RESTORE WITH MOVE or not WITH MOVE] | Mike Eastland | 2013-11-22 | [DBA] | | [Getting exclusive access to restore SQL Server database] | Greg Robidoux | 2021-02-21 | [DBA] | | [How to migrate a SQL Server database to a lower version] | Basit Farooq | 2019-08-05 | [DBA] | +| [Make Network Path Visible For SQL Server Backup and Restore in SSMS] | Ahmad Yaseen | 2015-03-03 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2874,3 +2875,4 @@ Articles types: [SQL Server Database RESTORE WITH MOVE or not WITH MOVE]:https://www.mssqltips.com/sqlservertip/3113/sql-server-database-restore-with-move-or-not-with-move/ [Getting exclusive access to restore SQL Server database]:https://www.mssqltips.com/sqlservertip/1407/getting-exclusive-access-to-restore-sql-server-database/ [How to migrate a SQL Server database to a lower version]:https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/ +[Make Network Path Visible For SQL Server Backup and Restore in SSMS]:https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/ From 1e671dde395199ee4e9503aafd7c00a6f298903a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 5 Aug 2021 22:52:18 +0300 Subject: [PATCH 418/553] Add SSMS 18.9 release --- SSMS/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index a4525d35..b3c8788a 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -70,9 +70,10 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.8 GA Release] | **Latest GA** | 15.0.18369.0 | 2020-12-17 | 640 | +| [18.9 GA Release] | **Latest GA** | 15.0.18382.0 | 2021-04-15 | 635 | +| [18.8 GA Release] | | 15.0.18369.0 | 2020-12-17 | 640 | | [18.7.1 GA Release] | | 15.0.18358.0 | 2020-10-27 | 635 | -| [18.7. GA Release] | | 15.0.18357.0 | 2020-10-20 | 635 | +| [18.7 GA Release] | | 15.0.18357.0 | 2020-10-20 | 635 | | [18.6 GA Release] | | 15.0.18338.0 | 2020-07-22 | 534 | | [18.5.1 GA Release] | | 15.0.18333.0 | 2020-06-09 | 535 | | [18.5 GA Release] | | 15.0.18183.0 | 2020-04-07 | 535 | @@ -116,6 +117,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | +[18.9 GA Release]:https://go.microsoft.com/fwlink/?linkid=2160964 [18.8 GA Release]:https://go.microsoft.com/fwlink/?linkid=2151644 [18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 [18.7 GA Release]:https://go.microsoft.com/fwlink/?linkid=2146265 From 4200004305dbc10a856964b278e66b16e9c94205 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 6 Aug 2021 11:58:28 +0300 Subject: [PATCH 419/553] Update TSQL formatters info --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 835d6c9a..33166394 100644 --- a/README.md +++ b/README.md @@ -528,15 +528,15 @@ BIML Bloggers ## TSQL Format Code - - http://sqlinform.com/ - - http://www.dpriver.com/pp/sqlformat.htm - - http://stackoverflow.com/questions/401928/sql-formatter-for-sql-management-studio - - http://www.apexsql.com/sql_tools_refactor.aspx + - [SQLinform Online](https://sqlinform.azurewebsites.net) + - [Instant SQL Formatter](http://www.dpriver.com/pp/sqlformat.htm) - http://poorsql.com/ - http://www.architectshack.com/PoorMansTSqlFormatter.ashx - http://www.ssmstoolspack.com/ - http://www.devart.com/dbforge/sql/sqlcomplete/ - http://www.sql-format.com/ + - http://www.apexsql.com/sql_tools_refactor.aspx + - http://stackoverflow.com/questions/401928/sql-formatter-for-sql-management-studio **[⬆ back to top](#table-of-contents)** From 469926b38216b13712db111d606a0bc993f142af Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 7 Aug 2021 22:54:12 +0300 Subject: [PATCH 420/553] Add SSMS 18.9.1 release --- SSMS/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SSMS/README.md b/SSMS/README.md index b3c8788a..4e229a3e 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -70,7 +70,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.9 GA Release] | **Latest GA** | 15.0.18382.0 | 2021-04-15 | 635 | +| [18.9.1 GA Release] | **Latest GA** | 15.0.18384.0 | 2021-04-20 | 635 | +| [18.9 GA Release] | | 15.0.18382.0 | 2021-04-15 | 635 | | [18.8 GA Release] | | 15.0.18369.0 | 2020-12-17 | 640 | | [18.7.1 GA Release] | | 15.0.18358.0 | 2020-10-27 | 635 | | [18.7 GA Release] | | 15.0.18357.0 | 2020-10-20 | 635 | @@ -117,6 +118,7 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | +[18.9.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=21611093 [18.9 GA Release]:https://go.microsoft.com/fwlink/?linkid=2160964 [18.8 GA Release]:https://go.microsoft.com/fwlink/?linkid=2151644 [18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 From 8d13971d1eb4d19fb566f50d0b5fe01aa446a86f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 8 Aug 2021 02:09:49 +0300 Subject: [PATCH 421/553] Update TOP(100) recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index bfb78517..e11c67a6 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -402,8 +402,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. DECLARE @n int = 1; SELECT TOP@n name FROM sys.objects; ``` - - For demo queries use `TOP(100)` or lower value because SQL Server uses one sorting method for `TOP` 1-100 rows, and a different one for 101+ rows. - More details [here](https://www.brentozar.com/archive/2017/09/much-can-one-row-change-query-plan-part-2/). + - For demo queries use `TOP(100)` or lower value because SQL Server uses one sorting method for `TOP` 1-100 rows, and a different one for 101+ rows. + More details [here](https://www.brentozar.com/archive/2017/09/much-can-one-row-change-query-plan-part-2/) and [here](https://sqlsunday.com/2020/12/08/the-curious-case-of-the-top-n-sort/). - Avoid specifying integers in the `ORDER BY` clause as positional representations of the columns in the select list. The statement with integers is not as easily understood by others compared with specifying the actual column name. In addition, changes to the select list, such as changing the column order or adding new columns, requires modifying the `ORDER BY` clause in order to avoid unexpected results. From e3ab8e664667f18cae44e6a7fb09e7657686d439 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 9 Aug 2021 17:53:02 +0300 Subject: [PATCH 422/553] Add alias using recommendation in joins --- SQL Server Name Convention and T-SQL Programming Style.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index e11c67a6..ec6f7df4 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -337,6 +337,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. ``` - Always use aliases for table names. More details [here](https://sqlinthewild.co.za/index.php/2019/04/23/no-this-is-not-a-bug-in-t-sql/). + - Whenever you’re working with multiple tables in a join (explicit or, like this one, implicit), always specify which table each column comes from. Even if your code works just fine today, just adding an unfortunately named column many years later can break your code. More details [here](https://sqlsunday.com/2020/12/21/the-uncorrelated-correlated-subquery/). - Avoid non-standard column and table aliases, use, if required, double-quotes for special characters and always `AS` keyword before alias: ```sql SELECT From 7506845c67f3b1dc94b775ad2630b787b0e4db40 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 10 Aug 2021 09:59:09 +0300 Subject: [PATCH 423/553] Add SSMS 18.9.2 version info --- SSMS/README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/SSMS/README.md b/SSMS/README.md index 4e229a3e..8da84520 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -49,18 +49,18 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u ## Available Languages -**SQL Server Management Studio 18.8 GA**: - [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x804) | - [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x404) | - [English (United States)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x409) | - [French](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x40c) | - [German](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x407) | - [Italian](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x410) | - [Japanese](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x411) | - [Korean](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x412) | - [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x416) | - [Russian](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x419) | - [Spanish](https://go.microsoft.com/fwlink/?linkid=2151644&clcid=0x40a) +**SQL Server Management Studio 18.9.2 GA**: + [Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x804) | + [Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x404) | + [English (United States)](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x409) | + [French](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x40c) | + [German](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x407) | + [Italian](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x410) | + [Japanese](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x411) | + [Korean](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x412) | + [Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x416) | + [Russian](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x419) | + [Spanish](https://go.microsoft.com/fwlink/?linkid=2168063&clcid=0x40a) ## SQL Server Management Studio Download Links and Release Info @@ -70,7 +70,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | Version/Download Link | Info | Build | Release Date | Size, Mb | | --------------------------|----------------|---------------|--------------|---------:| -| [18.9.1 GA Release] | **Latest GA** | 15.0.18384.0 | 2021-04-20 | 635 | +| [18.9.2 GA Release] | **Latest GA** | 15.0.18386.0 | 2021-07-15 | 642 | +| [18.9.1 GA Release] | | 15.0.18384.0 | 2021-04-20 | 635 | | [18.9 GA Release] | | 15.0.18382.0 | 2021-04-15 | 635 | | [18.8 GA Release] | | 15.0.18369.0 | 2020-12-17 | 640 | | [18.7.1 GA Release] | | 15.0.18358.0 | 2020-10-27 | 635 | @@ -118,7 +119,8 @@ SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell u | [SQL Server 2012 SP3] | | 11.0.6020.0 | 2015-11-21 | 964 | | [SQL Server 2008 R2] | | 10.50.4000 | 2012-07-02 | 161 | -[18.9.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=21611093 +[18.9.2 GA Release]:https://go.microsoft.com/fwlink/?linkid=2168063 +[18.9.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2161193 [18.9 GA Release]:https://go.microsoft.com/fwlink/?linkid=2160964 [18.8 GA Release]:https://go.microsoft.com/fwlink/?linkid=2151644 [18.7.1 GA Release]:https://go.microsoft.com/fwlink/?linkid=2147207 From 09b0fcdc4921214323546105131f9bb3d566559c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 11 Aug 2021 10:06:31 +0300 Subject: [PATCH 424/553] Add getdate functions recommendations --- ... Convention and T-SQL Programming Style.md | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index ec6f7df4..ca13bedc 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -201,15 +201,18 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Not Recommended | Recommended | When and Why | More details | -|-----------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| -| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | -| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | -| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | -| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | -| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | -| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | +| Not Recommended | Recommended | When and Why | More details | +|-----------------|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | +| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | +| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | +| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | +| [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -234,6 +237,10 @@ This is only recommendations! But it is consistent for choosing only 1 function [`ISNUMERIC`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql [`TRY_CONVERT`]:https://docs.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql [24]:https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-avoid-using-isnumeric-function-e1029 +[25]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ +[`GETDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getdate-transact-sql +[`GETUTCDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getutcdate-transact-sql +[`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql **[⬆ back to top](#table-of-contents)** From e687dc2c8208b26db07308e90250c6eb0da849df Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 12 Aug 2021 00:20:11 +0300 Subject: [PATCH 425/553] Add awesome Solomon Rutzky Index_Creating_Info.sql script --- Scripts/Index_Creating_Info.sql | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Scripts/Index_Creating_Info.sql diff --git a/Scripts/Index_Creating_Info.sql b/Scripts/Index_Creating_Info.sql new file mode 100644 index 00000000..5bebae2d --- /dev/null +++ b/Scripts/Index_Creating_Info.sql @@ -0,0 +1,45 @@ +/* + + Track index creating progress + 1 data set: index creation info. + No + Solomon Rutzky + 2020-09-03 + 2021-08-12 by Konstantin Taranov + 1.0 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Index_Creating_Info.sql + https://dba.stackexchange.com/a/139225/107045 + +*/ + +WITH agg AS +( + SELECT SUM(qp.row_count) AS RowsProcessed, + SUM(qp.estimate_row_count) AS TotalRows, + MAX(qp.last_active_time) - MIN(qp.first_active_time) AS ElapsedMS, + MAX(IIF(qp.close_time = 0 AND qp.first_row_time > 0, + physical_operator_name, + N'')) AS CurrentStep + FROM sys.dm_exec_query_profiles qp + WHERE qp.[physical_operator_name] IN (N'Table Scan', N'Clustered Index Scan', + N'Index Scan', N'Sort') + AND qp.[session_id] IN (SELECT session_id from sys.dm_exec_requests where command IN ( 'CREATE INDEX','ALTER INDEX','ALTER TABLE') ) +), comp AS +( + SELECT *, + (TotalRows - RowsProcessed) AS RowsLeft, + (ElapsedMS / 1000.0) AS ElapsedSeconds + FROM agg +) +SELECT CurrentStep, + TotalRows, + RowsProcessed, + RowsLeft, + CONVERT(DECIMAL(5, 2), + ((RowsProcessed * 1.0) / TotalRows) * 100) AS PercentComplete, + ElapsedSeconds, + ((ElapsedSeconds / RowsProcessed) * RowsLeft) AS EstimatedSecondsLeft, + DATEADD(SECOND, + ((ElapsedSeconds / RowsProcessed) * RowsLeft), + GETDATE()) AS EstimatedCompletionTime +FROM comp; From d6ff036d178ae81ed710f45d11a0e58307bc7ea7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 13 Aug 2021 16:25:46 +0300 Subject: [PATCH 426/553] Remce duplicates and fix broken link --- Articles/README.md | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 4f40bf6e..c4a3aead 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -26,7 +26,6 @@ Articles types: - **[V]** Visualization Articles - **[X]** XML, JSON, YAML, HTML Articles - **[XE]** [Extended events](https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-events) - | Title | Author | Modified | Type | |-------------------------------------------------------------------------------------------------------------------------|------------------------------------------|------------|-------------| | [Understanding how SQL Server executes a query] | Remus Rusanu | 2016-04-15 | | @@ -239,7 +238,6 @@ Articles types: | [ALTER SCHEMA TRANSFER for Zero Downtime Database Upgrades] | Dave Wentzel | 2013-05-21 | | | [Delayed Durability in SQL Server 2014] | Aaron Bertrand | 2014-04-28 | | | [Daylight Savings end affects not only you, but your SQL Server too] | Aaron Bertrand | 2014-04-28 | | -| [Searching Strings in SQL Server is Expensive] | Brent Ozar | 2016-10-18 | | | [Let’s Corrupt a SQL Server Database Together, Part 1: Clustered Indexes] | Brent Ozar | 2017-02-22 | [COR][IDX] | | [Let’s Corrupt a Database Together, Part 2: Nonclustered Indexes] | Brent Ozar | 2017-02-28 | [COR][IDX] | | [The Guide SQL Server Installation Checklist (settings that increase SQL Server Performance)] | Mark Varnas | 2017-03-03 | | @@ -1061,7 +1059,6 @@ Articles types: | [Queue table issues with Availability Groups in SQL Server] | Aaron Bertrand | 2020-01-29 | [DBA] | | [Transact-SQL: openjson hierarchy solution] | Ronen Ariely | 2019-09-29 | [DBA][DEV] | | [CREATE DLL TRIGGER ON CREATE_LOGIN to configure default parameters for any new LOGIN] | Ronen Ariely | 2019-10-12 | [DBA][DEV] | -| [Code: Order of columns in table might impact the size of the table/database and even related to errors] | Ronen Ariely | 2019-10-13 | [DBA][DEV] | | [SQL Server Internals: Getting the data of deleted column] | Ronen Ariely | 2018-08-11 | [DBA][DEV] | | [SQL varchar data type deep dive] | Gauri Mahajan | 2019-05-29 | [DBA][DEV] | | [What is the datatype SQL_VARIANT] | Kenneth Fisher | 2020-04-16 | [DBA][DEV] | @@ -1149,11 +1146,8 @@ Articles types: | [15 SQL Server Performance Counters to Monitor In 2020] | Allen White | 2020-05-05 | [DBA][DEV] | | [Pulling Group By Above a Join] | Paul White | 2020-05-31 | [DBA][DEV] | | [SQLskills SQL101: Running out of ints and bigints] | Paul Randal | 2017-10-03 | [DBA][DEV] | -| [Parallel Execution Plans – Branches and Threads] | Paul White | 2013-10-07 | [DBA][DEV] | | [Understanding and Using Parallelism in SQL Server] | Paul White | 2011-03-03 | [DBA][DEV] | | [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers] | Sean Gallardy | 2020-06-16 | [DBA] | -| [The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates] | Brent Ozar | 2020-07-07 | [DBA][DEV] | -| [The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows] | Brent Ozar | 2020-07-08 | [DBA][DEV] | | [Encrypting SQL Server Database Backups] | David Fowler | 2018-04-04 | [DBA] | | [Using Track Causality to Understand Query Execution] | Erin Stellato | 2019-01-04 | [DBA][DEV] | | [Understanding SQL Server Backup Types] | Prashanth Jayaram | 2018-04-19 | [B][DBA] | @@ -1209,7 +1203,6 @@ Articles types: | [When Select * Doesn’t Matter] | Erik Darlling | 2019-11-18 | [DBA][DEV] | | [HT Waits – Explained and Animated] | Forrest McDaniel | 2020-08-12 | [DBA][DEV] | | [SQL Server 100% Online Deployments] | Michael J Swart | 2018-01-05 | [DBA] | -| [When Measuring Timespans, try DATEADD instead of DATEDIFF] | Michael J Swart | 2017-12-20 | [DBA][DEV] | | [The Curious Case of… setting up a server for DBCC CHECKDB] | Paul Randal | 2020-08-24 | [DBA] | | [When should a primary key be declared non-clustered?] | Paul White | 2012-12-01 | [IDX] | | [Guid vs INT - Which is better as a primary key?] | Sandeep Kumar M | 2011-01-05 | [DBA][DEV] | @@ -1225,7 +1218,6 @@ Articles types: | [SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea] | Brent Ozar | 2019-05-06 | [DBA][DEV] | | [Tempdb: The Ghost Of Version Store] | Stijn Wynants | 2015-11-09 | [DBA][DEV] | | [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)] | Glenn Boonen | 2020-05-07 | [DBA][DEV] | -| [A SQL Server DBA myth a day: (26/30) nested transactions are real] | Paul Randal | 2010-04-26 | [DBA][DEV] | | [The Best Medium-Hard Data Analyst SQL Interview Questions] | Zachary Thomas | 2020-01-01 | [DBA][DEV] | | [Starting SQL: Why Not Make Everything Dynamic?] | Eric Darling | 2020-09-28 | [DBA][DEV] | | [dbatools multithreading commands] | Kin | 2019-01-04 | [PS] | @@ -1274,7 +1266,6 @@ Articles types: | [Deploy SQLWATCH to SQL Server using GitHub Actions] | Kevin Chant | 2020-11-17 | [DBA] | | [SQL Server table hints – WITH (NOLOCK) best practices] | Ahmad Yaseen | 2018-02-24 | [DBA][DEV] | | [Memory-Optimized TempDB Metadata in SQL Server 2019] | Aaron Bertrand | 2020-02-14 | [DBA] | -| [What permissions do temp stored procedures use?] | Kenneth Fisher | 2019-06-19 | [DBA][DEV] | | [SQLskills SQL101: Should you kill that long-running transaction?] | Paul Randal | 2020-10-10 | [DBA][DEV] | | [A quick and dirty scan of a list of instances using a dynamic linked server] | Kenneth Fisher | 2020-11-12 | [DBA] | | [sp_whoisactive: Analyzing Tempdb Contention] | Adam Machanic | 2017-01-01 | [DBA][DEV] | @@ -1334,7 +1325,6 @@ Articles types: | [Towards Safer Dynamic SQL] | Eric Darling | 2020-10-11 | [DBA][DEV] | | [Setting the timezone to anything other than UTC] | Yeller | 2015-01-12 | [DBA][DEV] | | [Advanced Service Broker Sample: Multi-Threading] | Eitan Blumin | 2018-10-31 | [DBA][DEV] | -| [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | | [Copy a SQL Server database with just the objects and no data] | Jeffrey Yao | 2017-02-01 | [DBA][DEV] | | [QOMPLX Knowledge: Kerberoasting Attacks Explained] | QOMPLX | 2020-01-01 | [SEC] | | [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-24 | [DBA][DEV] | @@ -1365,7 +1355,6 @@ Articles types: | [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | | [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | | [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | -| [The Table Variable in SQL Server] | Esat Erkec | 2019-12-03 | [DBA][DEV] | | [Using Amazon Fsx For Sql Server Failover Cluster Instances – What You Need To Know!] | Dave Berm | 2020-01-24 | [AMZ] | | [Sometimes you CAN upsize a column in-place] | Aaron Bertrand | 2020-08-19 | [DBA] | | [Which Microsoft Certification Should You Get?] | Brent Ozar | 2021-01-04 | [DBA][DEV] | @@ -1387,7 +1376,6 @@ Articles types: | [Deprecated features to take out of your toolbox – Part 1] | Aaron Bertrand | 2021-02-22 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 2] | Aaron Bertrand | 2021-03-15 | [DBA][DEV] | | [Deprecated features to take out of your toolbox – Part 3] | Aaron Bertrand | 2021-07-01 | [DBA][DEV] | -| [How to create a SQL dependency diagram in SQL Server] | Marko Zivkovic | 2018-09-04 | [DBA][DEV] | | [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore] | Erik Darling | 2021-04-19 | [DBA] | | [Execution Plans Don’t Have the Yellow Bang They Really Need.] | Brent Ozar | 2021-04-29 | [DBA][DEV] | | [The Curious Case of… the un-killable thread] | Paul Randal | 2021-04-20 | [DBA] | @@ -1395,10 +1383,8 @@ Articles types: | [Possible configuration error: 1000000 IO requests allocated] | Sean Gallardy | 2021-05-23 | [DBA] | | [Availability Group Long Failover Times] | Sean Gallardy | 2021-04-18 | [DBA] | | [Testing Backups and Offloading CheckDB] | Taryn Pratt | 2021-04-19 | [DBA] | -| [Adding Additional Data Files To The TempDB Database In SQL Server] | Jack Worthen | 2017-08-24 | [DBA] | | [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | -| [The Ascending Key Problem in Fact Tables– Part one: Pain!] | Thomas Kejser | 2011-07-01 | [DEV] | | [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | | [SQL JOINs and UNIONs] | Austin Smith | 2020-03-13 | [DBA][DEV] | | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | @@ -1451,7 +1437,6 @@ Articles types: | [Getting exclusive access to restore SQL Server database] | Greg Robidoux | 2021-02-21 | [DBA] | | [How to migrate a SQL Server database to a lower version] | Basit Farooq | 2019-08-05 | [DBA] | | [Make Network Path Visible For SQL Server Backup and Restore in SSMS] | Ahmad Yaseen | 2015-03-03 | [DBA] | - [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx [SQL Server 2012 Security Best Practices - Microsoft]:http://download.microsoft.com/download/8/f/a/8fabacd7-803e-40fc-adf8-355e7d218f4c/sql_server_2012_security_best_practice_whitepaper_apr2012.docx @@ -1663,7 +1648,6 @@ Articles types: [ALTER SCHEMA TRANSFER for Zero Downtime Database Upgrades]:http://www.davewentzel.com/content/alter-schema-transfer-zero-downtime-database-upgrades [Delayed Durability in SQL Server 2014]:https://sqlperformance.com/2014/04/io-subsystem/delayed-durability-in-sql-server-2014 [Daylight Savings end affects not only you, but your SQL Server too]:http://www.sqldoubleg.com/2015/10/28/daylight-savings-end-affects-not-only-you-but-your-sql-server-too/ -[Searching Strings in SQL Server is Expensive]:https://www.brentozar.com/archive/2016/10/searching-strings-sql-server-expensive/ [Let’s Corrupt a SQL Server Database Together, Part 1: Clustered Indexes]:https://www.brentozar.com/archive/2017/02/lets-corrupt-sql-server-database-together/ [Let’s Corrupt a Database Together, Part 2: Nonclustered Indexes]:https://www.brentozar.com/archive/2017/02/lets-corrupt-database-together-part-2-nonclustered-indexes/ [The Guide SQL Server Installation Checklist (settings that increase SQL Server Performance)]:https://red9.com/blog/sql-server-installation-checklist/ @@ -1828,7 +1812,6 @@ Articles types: [Generating Concurrent Activity]:http://michaeljswart.com/2014/01/generating-concurrent-activity/ [Required Testing for Installing SQL Server Cumulative Updates and Service Packs]:http://littlekendra.com/2016/04/28/required-testing-for-installing-sql-server-cumulative-updates-and-service-packs/ [Microsoft SQL Server R Services - Internals X]:http://www.nielsberglund.com/2017/08/29/microsoft-sql-server-r-services-internals-x/ -[Clustered columnstore: on-disk vs. in-mem]:http://nedotter.com/archive/2017/03/clustered-columnstore-on-disk-vs-in-mem/ [Hands on Full-Text Search in SQL Server]:https://www.sqlshack.com/hands-full-text-search-sql-server/ [SQL Code Smells]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/sql-code-smells/ [Corruption demo databases and scripts]:https://www.sqlskills.com/blogs/paul/corruption-demo-databases-and-scripts/ @@ -1890,7 +1873,6 @@ Articles types: [Using Plan Explorer with Entity Framework]:https://blogs.sentryone.com/jasonhall/using-plan-explorer-entity-framework/ [Overview of Encryption Tools in SQL Server]:https://matthewmcgiffen.com/2017/12/05/overview-of-encryption-tools-in-sql-server/ [Clustered Index Uniquifier Existence and Size]:https://sqlquantumleap.com/2017/09/18/clustered-index-uniquifier-existence-and-size/ -[Understanding Logging and Recovery in SQL Server]:https://technet.microsoft.com/en-us/library/2009.02.logging.aspx [Understanding SQL Server Backups]:https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd822915(v=msdn.10) [Recovering from Disasters Using Backups]:https://technet.microsoft.com/en-us/library/ee677581.aspx [Simple SQL: Handling Location Datatypes]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/simple-sql-handling-location-datatypes/ @@ -1911,7 +1893,6 @@ Articles types: [A Method to Find Trace Flags]:https://rebrand.ly/joe-finding-undocumented-trace-flags [Using Windows stored credentials to connect to SQL in containers]:https://dbafromthecold.com/2018/01/17/using-windows-stored-credentials-to-connect-to-sql-in-containers/ [Step by Step Guide to Migrate SQL Server Data to SQL Server 2017]:https://www.databasejournal.com/features/mssql/step-by-step-guide-to-migrate-sql-server-data-to-sql-server-2017.html -[Nasty Fast PERCENT_RANK]:http://www.sqlservercentral.com/articles/PERCENT_RANK/141532/ [Administrative Logins and Users]:https://sqlstudies.com/2015/11/02/administrative-logins-and-users/ [Parallelism in Hekaton (In-Memory OLTP)]:http://www.nikoport.com/2018/01/20/parallelism-in-hekaton-in-memory-oltp/ [Troubleshooting THREADPOOL Waits]:https://www.sqlpassion.at/archive/2011/10/25/troubleshooting-threadpool-waits/ @@ -1951,7 +1932,6 @@ Articles types: [Digitally Signing a Stored Procedure To Allow It To Run With Elevated Permissions]:https://sqlundercover.com/2018/05/02/digitally-signing-a-stored-procedure-to-allow-it-to-run-with-elevated-permissions/ [NOLOCK and Top Optimization]:https://www.sqlshack.com/nolock-and-top-optimization/ [Operator Precedence versus the Confusing Constraint Translation]:https://www.red-gate.com/simple-talk/blogs/operator-precedence-versus-confusing-constraint-translation/ -[Interval Queries in SQL Server]:http://www.itprotoday.com/software-development/interval-queries-sql-server [Query Trace Column Values]:https://www.sqlshack.com/query-trace-column-values/ [Concurrency Week: How to Delete Just Some Rows from a Really Big Table]:https://www.brentozar.com/archive/2018/04/how-to-delete-just-some-rows-from-a-really-big-table/ [Break large delete operations into chunks]:https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes @@ -1973,7 +1953,6 @@ Articles types: [How to implement error handling in SQL Server]:https://www.sqlshack.com/how-to-implement-error-handling-in-sql-server/ [SQL Server Closure Tables]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/sql-server-closure-tables/ [Deadlock victim choice in SQL Server - an exception?]:http://joshthecoder.com/2018/05/10/deadlock-victim-choice-an-exception.html -[Azure and Windows PowerShell: The Basics]:https://www.red-gate.com/simple-talk/sysadmin/powershell/azure-windows-powershell-basics/ [Azure and Windows PowerShell: Getting Information]:https://www.red-gate.com/simple-talk/sysadmin/powershell/azure-and-windows-powershell-getting-information/ [Be our guest, be our guest, put our database to the test]:https://sqlstudies.com/2018/06/25/be-our-guest-be-our-guest-put-our-database-to-the-test/ [Finding code smells using SQL Prompt: the SET NOCOUNT problem (PE008 and PE009)]:https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-set-nocount-problem-pe008-pe009 @@ -2096,7 +2075,6 @@ Articles types: [How to perform a Page Level Restore in SQL Server]:https://sqlperfmon.blogspot.com/2016/07/how-to-perform-page-level-restore-in.html [How Much Memory Does SSIS Need?]:https://www.timmitchell.net/post/2019/05/02/how-much-memory-does-ssis-need/ [The Curious Case of… trying to find an MDF file in a RAW disk]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-trying-to-find-an-mdf-file-in-a-raw-disk/ -[Understanding the SQL Server NOLOCK hint]:https://www.mssqltips.com/sqlservertip/2470/understanding-the-sql-server-nolock-hint/ [Methods to Insert Data into SQL Server]:https://www.sqlshack.com/methods-to-insert-data-into-sql-server/ [Batching data manipulation is great as long as you do it correctly]:http://desertdba.com/batching-data-manipulation-is-great/ [Azure and Windows PowerShell: Using VM Extensions]:https://www.red-gate.com/simple-talk/sysadmin/powershell/azure-and-windows-powershell-using-vm-extensions/ @@ -2232,7 +2210,6 @@ Articles types: [Corruption in TempDB]:https://stevestedman.com/2019/08/corruption-in-tempdb/ [Corruption recovery using DBCC WRITEPAGE]:https://www.sqlskills.com/blogs/paul/corruption-recovery-using-dbcc-writepage/ [Why DBCC CHECKDB can miss memory corruption]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-why-dbcc-checkdb-can-miss-memory-corruption/ -[Fixing Cardinality Estimation Errors with Filtered Statistics]:https://www.sqlpassion.at/archive/2013/10/29/fixing-cardinality-estimation-errors-with-filtered-statistics/ [Plan Stitch: Harnessing the Best of Many Plans]:https://www.microsoft.com/en-us/research/publication/plan-stitch-harnessing-the-best-of-many-plans-2/ [Query and Resource Optimization: Bridging the Gap]:https://www.microsoft.com/en-us/research/publication/query-resource-optimization-bridging-gap/ [Cuttlefish: A Lightweight Primitive for Adaptive Query Processing]:https://www.microsoft.com/en-us/research/publication/cuttlefish-a-lightweight-primitive-for-adaptive-query-processing/ @@ -2386,7 +2363,7 @@ Articles types: [Don’t install SQL Server from a mounted ISO]:https://bornsql.ca/blog/dont-install-sql-server-from-a-mounted-iso/ [NULL complexities – Part 1]:https://sqlperformance.com/2019/12/t-sql-queries/null-complexities-part-1 [NULL complexities – Part 2]:https://sqlperformance.com/2020/01/t-sql-queries/null-complexities-part-2 -[NULL complexities – Part 3]:https://sqlperformance.com/2020/01/t-sql-queries/null-complexities-part-3 +[NULL complexities – Part 3]:https://sqlperformance.com/2020/02/t-sql-queries/null-complexities-part-3-missing-standard-features-and-t-sql-alternatives [How to fix the “Agent XPs disabled” error]:https://www.sqlshack.com/how-to-fix-the-agent-xps-disabled-error/ [Number of Rows Read / Actual Rows Read warnings in Plan Explorer]:https://sqlperformance.com/2016/06/sql-indexes/actual-rows-read-warnings-plan-explorer [Data Compression + Backup Compression = Double Compression?]:https://jesspomfret.com/double-compression/ @@ -2485,8 +2462,6 @@ Articles types: [Queue table issues with Availability Groups in SQL Server]:mssqltips.com/sqlservertip/6284/queue-table-issues-with-availability-groups-in-sql-server/ [Transact-SQL: openjson hierarchy solution]:http://ariely.info/Blog/tabid/83/EntryId/239/Transact-SQL-openjson-hierarchy-solution.aspx [CREATE DLL TRIGGER ON CREATE_LOGIN to configure default parameters for any new LOGIN]:http://ariely.info/Blog/tabid/83/EntryId/240/CREATE-DLL-TRIGGER-ON-CREATE_LOGIN-to-configure-default-parameters-for-any-new-LOGIN.aspx -[Code: Order of columns in table might impact the size of the table/database and even related to errors]:http://ariely.info/Blog/tabid/83/EntryId/243/Code-Order-of-columns-in-table-might-impact-the-size-of-the-table-database-and-even-related-to-errors.aspx -[SQL Server Internals: Getting the data of deleted column]:http://ariely.info/Blog/tabid/83/EntryId/213/SQL-Server-Internals-Getting-the-data-of-deleted-column.aspx [SQL varchar data type deep dive]:https://www.sqlshack.com/sql-varchar-data-type-deep-dive/ [What is the datatype SQL_VARIANT]:https://sqlstudies.com/2020/04/16/what-is-the-datatype-sql_varient/ [An Introduction to Asynchronous Processing with Service Broker]:https://sqlperformance.com/2014/03/sql-performance/intro-to-service-broker @@ -2577,8 +2552,6 @@ Articles types: [Parallel Execution Plans – Branches and Threads]:https://sqlperformance.com/2013/10/sql-plan/parallel-plans-branches-threads [Understanding and Using Parallelism in SQL Server]:https://www.red-gate.com/simple-talk/sql/learn-sql-server/understanding-and-using-parallelism-in-sql-server/ [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers]:https://www.seangallardy.com/top-asked-availability-group-questions-and-maybe-some-helpful-tidbits-as-answers/ -[The 201 Buckets Problem, Part 1: Why You Still Don’t Get Accurate Estimates]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-1-why-you-still-dont-get-accurate-estimates/ -[The 201 Buckets Problem, Part 2: How Bad Estimates Backfire As Your Data Grows]:https://www.brentozar.com/archive/2020/07/the-201-buckets-problem-part-2-how-bad-estimates-backfire-as-your-data-grows/ [Encrypting SQL Server Database Backups]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ [Using Track Causality to Understand Query Execution]:https://sqlperformance.com/2019/01/extended-events/using-track-causality-to-understand-query-execution [Understanding SQL Server Backup Types]:https://www.sqlshack.com/understanding-sql-server-backup-types/ @@ -2620,7 +2593,6 @@ Articles types: [Database alias in Microsoft SQL Server]:http://www.baud.cz/blog/database-alias-in-microsoft-sql-server [The Curious Case of… the 8060-byte row size limit]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-8060-byte-row-size-limit/ [.NET TransactionScope Considered Annoying - Default Isolation Level is Serializable]:https://joshthecoder.com/2020/07/27/transactionscope-considered-annoying.html -[Parameter Sniffing, Embedding, and the RECOMPILE Options]:https://sqlperformance.com/2013/08/t-sql-queries/parameter-sniffing-embedding-and-the-recompile-options [Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)]:https://www.brentozar.com/archive/2014/06/tuning-stored-procedures-local-variables-problems/ [Yet Another Post About Local Variables]:https://www.erikdarlingdata.com/sql-server/yet-another-post-about-local-variables/ [Cleaning up Backups from Azure Blob Storage]:http://www.nikoport.com/2020/03/30/cleaning-up-backups-from-azure-blob-storage/ @@ -2651,7 +2623,6 @@ Articles types: [Tempdb: The Ghost Of Version Store]:https://kohera.be/blog/sql-server/tempdb-the-ghost-of-version-store/ [Row Versioning Concurrency in SQL Server]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [When Tempdb Becomes Permanentdb (In-memory tempdb metadata and Resource governor problems)]:https://kohera.be/blog/sql-server/when-tempdb-becomes-permanentdb/ -[A SQL Server DBA myth a day: (26/30) nested transactions are real]:https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2630-nested-transactions-are-real/ [The Best Medium-Hard Data Analyst SQL Interview Questions]:https://quip.com/2gwZArKuWk7W [Starting SQL: Why Not Make Everything Dynamic?]:https://www.erikdarlingdata.com/starting-sql/starting-sql-why-not-make-everything-dynamic/ [dbatools multithreading commands]:https://dbatools.io/multithread/ @@ -2699,7 +2670,6 @@ Articles types: [Deploy SQLWATCH to SQL Server using GitHub Actions]:https://www.kevinrchant.com/2020/11/17/deploy-sqlwatch-to-sql-server-using-github-actions/ [SQL Server table hints – WITH (NOLOCK) best practices]:https://www.sqlshack.com/understanding-impact-clr-strict-security-configuration-setting-sql-server-2017/ [Memory-Optimized TempDB Metadata in SQL Server 2019]:https://www.mssqltips.com/sqlservertip/6230/memoryoptimized-tempdb-metadata-in-sql-server-2019/ -[What permissions do temp stored procedures use?]:https://sqlstudies.com/2019/06/19/what-permissions-do-temp-stored-procedures-use/ [SQLskills SQL101: Should you kill that long-running transaction?]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-should-you-kill-that-long-running-transaction/ [A quick and dirty scan of a list of instances using a dynamic linked server]:https://sqlstudies.com/2020/11/12/a-quick-and-dirty-scan-of-a-list-of-instances-using-a-dynamic-linked-server/ [sp_whoisactive: Analyzing Tempdb Contention]:http://whoisactive.com/docs/21_tempdb/ @@ -2741,7 +2711,6 @@ Articles types: [The danger of HADR_SYNC_COMMIT wait and synchronous replication in AlwaysOn Availability Groups]:https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/ [Faster SQL Pagination with Keysets, Continued]:https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/ [We need tool support for keyset pagination]:https://use-the-index-luke.com/no-offset -[Insight into the SQL Server buffer cache]:https://www.sqlshack.com/insight-into-the-sql-server-buffer-cache/ [Index-Only Scan: Avoiding Table Access]:https://use-the-index-luke.com/sql/clustering/index-only-scan-covering-index [The two top performance problems caused by ORM tool]:https://use-the-index-luke.com/blog/2013-04/the-two-top-performance-problems-caused-by-ORM-tools [Nested loops join and n1 problem in ORM]:https://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem @@ -2759,7 +2728,6 @@ Articles types: [Towards Safer Dynamic SQL]:https://www.erikdarlingdata.com/sql-server/towards-safer-dynamic-sql/ [Setting the timezone to anything other than UTC]:http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html [Advanced Service Broker Sample: Multi-Threading]:https://eitanblumin.com/2018/10/31/advanced-service-broker-sample-multi-threading/ -[Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html [Copy a SQL Server database with just the objects and no data]:https://www.mssqltips.com/sqlservertip/4664/copy-a-sql-server-database-with-just-the-objects-and-no-data/ [QOMPLX Knowledge: Kerberoasting Attacks Explained]:https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/ [How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ @@ -2786,11 +2754,9 @@ Articles types: [Identifying Cost-Saving Opportunities in Azure DevOps]:https://www.sentryone.com/blog/cost-savings-in-azuredevops [One wide index or multiple narrow indexes?]:https://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/ [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups]:https://www.apress.com/de/blog/all-blog-posts/readable-secondaries-in-sql-server/16064064 -[When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ [Poor Man’s Resource Governor: Database-Scoped Configurations]:https://www.brentozar.com/archive/2020/10/poor-mans-resource-governor-database-scoped-configurations/ [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.]:https://www.brentozar.com/archive/2020/09/sql-server-suddenly-frozen-you-might-be-snapshotting-too-many-databases/ [How to Batch Updates A Few Thousand Rows at a Time]:https://www.brentozar.com/archive/2020/12/how-to-batch-updates-a-few-thousand-rows-at-a-time/ -[The Table Variable in SQL Server]:https://www.sqlshack.com/the-table-variable-in-sql-server/ [USING AMAZON FSX FOR SQL SERVER FAILOVER CLUSTER INSTANCES – WHAT YOU NEED TO KNOW!]:https://clusteringformeremortals.com/2021/01/08/using-amazon-fsx-for-sql-server-failover-cluster-instances-what-you-need-to-know/ [Sometimes you CAN upsize a column in-place]:https://sqlperformance.com/2020/08/sql-indexes/upsize-column-in-place [Which Microsoft Certification Should You Get?]:https://www.brentozar.com/archive/2021/01/which-microsoft-certification-should-you-get/ @@ -2812,7 +2778,6 @@ Articles types: [Deprecated features to take out of your toolbox – Part 1]:https://sqlperformance.com/2021/02/sql-performance/deprecated-features-1 [Deprecated features to take out of your toolbox – Part 2]:https://sqlperformance.com/2021/03/sql-performance/deprecated-features-2 [Deprecated features to take out of your toolbox – Part 3]:https://sqlperformance.com/2021/07/sql-performance/deprecated-features-3 -[How to create a SQL dependency diagram in SQL Server]:https://www.sqlshack.com/how-to-create-a-sql-dependency-diagram-in-sql-server/ [Troubleshooting Security Cache Issues: USERSTORE_TOKENPERM And TokenAndPermUserStore]:https://www.erikdarlingdata.com/sql-server/troubleshooting-security-cache-issues-userstore_tokenperm-and-tokenandpermuserstore/ [Execution Plans Don’t Have the Yellow Bang They Really Need.]:https://www.brentozar.com/archive/2021/04/execution-plans-dont-have-the-yellow-bang-they-really-need/ [The Curious Case of… the un-killable thread]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-un-killable-thread/ @@ -2820,10 +2785,8 @@ Articles types: [Possible configuration error: 1000000 IO requests allocated]:https://www.seangallardy.com/possible-configuration-error-1000000-io-requests-allocated/ [Availability Group Long Failover Times]:https://www.seangallardy.com/availability-group-long-failover-times/ [Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ -[Adding Additional Data Files To The TempDB Database In SQL Server]:https://jackworthen.com/2017/08/24/adding-additional-data-files-to-the-tempdb-database-in-sql-server/ [Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ [Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ -[The Ascending Key Problem in Fact Tables– Part one: Pain!]:https://kejserbi.wordpress.com/2011/07/01/the-ascending-key-problem-in-fact-tables-part-one-pain/ [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ [SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 [Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ From 3f2ec193a00f0ef6680f4f07d0d25ffa939787b4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 13 Aug 2021 16:30:00 +0300 Subject: [PATCH 427/553] Add article, fix markdown --- Articles/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c4a3aead..d9eb0350 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1437,6 +1437,8 @@ Articles types: | [Getting exclusive access to restore SQL Server database] | Greg Robidoux | 2021-02-21 | [DBA] | | [How to migrate a SQL Server database to a lower version] | Basit Farooq | 2019-08-05 | [DBA] | | [Make Network Path Visible For SQL Server Backup and Restore in SSMS] | Ahmad Yaseen | 2015-03-03 | [DBA] | +| [T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting] | Itzik Ben-Gan | 2019-09-12 | [DBA][DEV] | + [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx [SQL Server 2012 Security Best Practices - Microsoft]:http://download.microsoft.com/download/8/f/a/8fabacd7-803e-40fc-adf8-355e7d218f4c/sql_server_2012_security_best_practice_whitepaper_apr2012.docx @@ -2839,3 +2841,4 @@ Articles types: [Getting exclusive access to restore SQL Server database]:https://www.mssqltips.com/sqlservertip/1407/getting-exclusive-access-to-restore-sql-server-database/ [How to migrate a SQL Server database to a lower version]:https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/ [Make Network Path Visible For SQL Server Backup and Restore in SSMS]:https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/ +[T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting]:https://sqlperformance.com/2019/09/t-sql-queries/t-sql-pitfalls-pivoting-unpivoting From bad884b770b16c7e3ce22cea9a994cc5f16efaa5 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 13 Aug 2021 16:34:29 +0300 Subject: [PATCH 428/553] Add article, yet another markdown fix --- Articles/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d9eb0350..a9f16e5a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -26,6 +26,7 @@ Articles types: - **[V]** Visualization Articles - **[X]** XML, JSON, YAML, HTML Articles - **[XE]** [Extended events](https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-events) + | Title | Author | Modified | Type | |-------------------------------------------------------------------------------------------------------------------------|------------------------------------------|------------|-------------| | [Understanding how SQL Server executes a query] | Remus Rusanu | 2016-04-15 | | @@ -1438,6 +1439,7 @@ Articles types: | [How to migrate a SQL Server database to a lower version] | Basit Farooq | 2019-08-05 | [DBA] | | [Make Network Path Visible For SQL Server Backup and Restore in SSMS] | Ahmad Yaseen | 2015-03-03 | [DBA] | | [T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting] | Itzik Ben-Gan | 2019-09-12 | [DBA][DEV] | +| [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2842,3 +2844,4 @@ Articles types: [How to migrate a SQL Server database to a lower version]:https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/ [Make Network Path Visible For SQL Server Backup and Restore in SSMS]:https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/ [T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting]:https://sqlperformance.com/2019/09/t-sql-queries/t-sql-pitfalls-pivoting-unpivoting +[How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ From 6de496974fc23efa2152656ead1cecf372a02ffc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 14 Aug 2021 17:44:29 +0300 Subject: [PATCH 429/553] Add SQL Murder courses --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eef293a2..8cc42a3a 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Red Gate Data Platform courses](https://www.red-gate.com/hub/university/courses/data-platform) (by Red Gate) - [SQLZoo tutorial](https://sqlzoo.net/) - [edX SQL Courses](https://www.edx.org/learn/sql) (by edX) + - [SQL Murder Mystery](https://github.com/NUKnightLab/sql-mysteries) (by NUKnightLab) + - [SQL Murder Mystery with answers](https://github.com/erika-e/sql-mysteries) (by Erika Pullum) - Paid - [Lynda Courses](http://www.lynda.com/SQL-Server-training-tutorials/456-0.html) - [Veeam Free Courses](https://go.veeam.com/microsoft-sql-series-webinars.html) From a4204d2126792885f8c28b6ae72f6eae4153e256 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 15 Aug 2021 18:28:51 +0300 Subject: [PATCH 430/553] Add CURRENT_TIMESTAMP and DATETIMEFROMPARTS in not recommended --- ... Convention and T-SQL Programming Style.md | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index ca13bedc..45d467da 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -201,18 +201,20 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Not Recommended | Recommended | When and Why | More details | -|-----------------|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| -| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | -| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | -| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | -| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | -| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | -| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | -| [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| Not Recommended | Recommended | When and Why | More details | +|-----------------------|-------------------- |------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | +| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | +| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | +| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | +| [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | +| [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -241,6 +243,8 @@ This is only recommendations! But it is consistent for choosing only 1 function [`GETDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getdate-transact-sql [`GETUTCDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getutcdate-transact-sql [`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql +[26]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ + **[⬆ back to top](#table-of-contents)** From 8c754675943c1eb18ef70711a1b36d59bf49ba4c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 16 Aug 2021 10:15:09 +0300 Subject: [PATCH 431/553] Add ISDATE recommendation --- ...Server Name Convention and T-SQL Programming Style.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 45d467da..8d5dc71e 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -166,7 +166,6 @@ More details about SQL Server data types and mapping it with another databases a [6]:https://docs.microsoft.com/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql [7]:https://docs.microsoft.com/sql/t-sql/data-types/ntext-text-and-image-transact-sql [8]:https://docs.microsoft.com/sql/t-sql/data-types/binary-and-varbinary-transact-sql - [9]:https://www.red-gate.com/hub/product-learning/sql-prompt/avoid-use-money-smallmoney-datatypes [bit]:https://docs.microsoft.com/sql/t-sql/data-types/bit-transact-sql @@ -187,7 +186,6 @@ More details about SQL Server data types and mapping it with another databases a [geometry]:https://docs.microsoft.com/sql/t-sql/spatial-geometry/spatial-types-geometry-transact-sql [geography]:https://docs.microsoft.com/sql/t-sql/spatial-geography/spatial-types-geography [On the Advantages of DateTime2(n) over DateTime]:http://www.sqltact.com/2012/12/on-advantages-of-datetime2n-over.html - [Differences Between Sql Server TEXT and VARCHAR(MAX) Data Type]:https://sqlhints.com/2016/05/11/differences-between-sql-server-text-and-varcharmax-data-type/ [NVARCHAR(MAX) VS NTEXT in SQL Server]:https://www.sqlservercurry.com/2010/07/nvarcharmax-vs-ntext-in-sql-server.html [VARBINARY(MAX) Tames the BLOB]:https://www.itprotoday.com/microsoft-visual-studio/varbinarymax-tames-blob @@ -201,8 +199,8 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Not Recommended | Recommended | When and Why | More details | -|-----------------------|-------------------- |------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| Not Recommended | Recommended | When and Why | More details | +|-----------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| | [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | | [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | | [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | @@ -215,6 +213,7 @@ This is only recommendations! But it is consistent for choosing only 1 function | [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | | [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | | [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | +| [`ISDATE`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [26] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -244,7 +243,7 @@ This is only recommendations! But it is consistent for choosing only 1 function [`GETUTCDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getutcdate-transact-sql [`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql [26]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ - +[`ISDATE`]:https://docs.microsoft.com/sql/t-sql/functions/isdate-transact-sql **[⬆ back to top](#table-of-contents)** From 0092b4ec7b34b415e0950237512975edc8b0c08e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 17 Aug 2021 10:23:51 +0300 Subject: [PATCH 432/553] Add BETWEEN recommendation --- ... Convention and T-SQL Programming Style.md | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 8d5dc71e..3d0a1d71 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -199,21 +199,22 @@ More details about SQL Server data types and mapping it with another databases a This is only recommendations! But it is consistent for choosing only 1 function from possibles alterntives and use only it. -| Not Recommended | Recommended | When and Why | More details | -|-----------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|----------------| -| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | -| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | -| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | -| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | -| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | -| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | -| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | -| [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | -| [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | -| [`ISDATE`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [26] | +| Not Recommended | Recommended | When and Why | More details | +|-----------------------|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| [`!=`][12] | [`<>`][12] | `<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13] | [13] | +| [`CONVERT`][10] | [`CAST`][10] | `CAST` is [`ANSI`] | [14],[15] | +| [`ISNULL`] | [`COALECSE`] | `COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string | [16],[17] | +| [`DATEDIFF`] | [`DATEADD`] | The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`] | [18],[19] | +| [`SELECT`] | [`SET`] | Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value` | [20],[21],[22] | +| [`STR`] | [`CAST`][10] | `STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR` | [23] | +| [`ISNUMERIC`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [24] | +| [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | +| [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | +| [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | +| [`ISDATE`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [26] | +| [`BETWEEN`] | `>=` and `<=` | Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. | [27] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -244,6 +245,8 @@ This is only recommendations! But it is consistent for choosing only 1 function [`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql [26]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ [`ISDATE`]:https://docs.microsoft.com/sql/t-sql/functions/isdate-transact-sql +[`BETWEEN`]:https://docs.microsoft.com/sql/t-sql/language-elements/between-transact-sql?view=sql-server-ver15 +[27]:https://www.mssqltips.com/sqlservertip/5206/sql-server-datetime-best-practices/ **[⬆ back to top](#table-of-contents)** @@ -437,7 +440,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Avoid using `INSERT INTO` a permanent table with `ORDER BY`. More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-insert-permanent-table-order-pe020). - Avoid using shorthand (`wk, yyyy, d` etc.) with date/time operations, use full names: `month, day, year`. - More details [here](https://sqlblog.org/2011/09/20/bad-habits-to-kick-using-shorthand-with-date-time-operations). + More details [here](https://sqlblog.org/2011/09/20/bad-habits-to-kick-using-shorthand-with-date-time-operations) and [here][27]. - Avoid ambiguous formats for date-only literals, use `CAST('yyyymmdd' AS DATE)` format. - Avoid treating dates like strings and avoid calculations on the left-hand side of the `WHERE` clause. More details [here](https://sqlblog.org/2009/10/16/bad-habits-to-kick-mis-handling-date-range-queries). From a9185ad5ce60412493249261832c43a8dc495268 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 18 Aug 2021 10:34:34 +0300 Subject: [PATCH 433/553] Add DATETFROMPARTS recommendation, fix links --- SQL Server Name Convention and T-SQL Programming Style.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 3d0a1d71..40ba1204 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -211,8 +211,9 @@ This is only recommendations! But it is consistent for choosing only 1 function | [`GETDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | | [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | | [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | -| [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | -| [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called ROWVERSION. | [26] | +| [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called `ROWVERSION`. | [26] | +| [`DATETFROMPARTS`] | [`DATET2FROMPARTS`] | The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. | [26] | +| [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. | [26] | | [`ISDATE`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [26] | | [`BETWEEN`] | `>=` and `<=` | Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. | [27] | @@ -243,7 +244,10 @@ This is only recommendations! But it is consistent for choosing only 1 function [`GETDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getdate-transact-sql [`GETUTCDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getutcdate-transact-sql [`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql +[`CURRENT_TIMESTAMP`]:https://docs.microsoft.com/sql/t-sql/functions/current-timestamp-transact-sql [26]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ +[`DATETFROMPARTS`]:https://docs.microsoft.com/sql/t-sql/functions/datefromparts-transact-sql +[`DATETIMEFROMPARTS`]:https://docs.microsoft.com/sql/t-sql/functions/datetimefromparts-transact-sql [`ISDATE`]:https://docs.microsoft.com/sql/t-sql/functions/isdate-transact-sql [`BETWEEN`]:https://docs.microsoft.com/sql/t-sql/language-elements/between-transact-sql?view=sql-server-ver15 [27]:https://www.mssqltips.com/sqlservertip/5206/sql-server-datetime-best-practices/ From 2c55aadae4a69a18dfb699d97380f58a4062115b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 19 Aug 2021 17:32:33 +0300 Subject: [PATCH 434/553] Remove duplicates articles --- Articles/README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index a9f16e5a..43adc97b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -53,7 +53,6 @@ Articles types: | [SQL Server Columnstore Articles] | Niko Neugebauer | 2016-05-09 | | | [Documentation: It Does not Suck!] | Jes Schultz Borland | 2013-01-15 | | | [The Data Loading Performance Guide] | Thomas Kejser, Peter Carlin, Stuart Ozer | 2009-01-15 | | -| [Required Testing for Installing SQL Server Cumulative Updates and Service Packs] | Kendra Little | 2016-04-28 | | | [Stop Shrinking Your Database Files. Seriously. Now.] | Brent Ozar | 2009-08-19 | | | [How to shrink a database in 4 easy steps] | Andy Mallon | 2016-04-28 | | | [Introduction to the Index Operational Statistics Dynamic Management Function] | Tim Ford | 2016-04-26 | [IDX] | @@ -65,8 +64,6 @@ Articles types: | [Understanding GRANT, DENY, and REVOKE in SQL Server] | K. Brian Kelley | 2013-02-27 | | | [Monitor SQL Server Transaction Log File Free Space] | Mike Eastland | 2015-05-12 | | | [Dynamically Query a 100 Million Row Table-Efficiently] | Gary Strange | 2016-05-27 | | -| [Understanding and Using Parallelism in SQL Server] | Paul White | 2011-03-03 | | -| [Diagnosing and Resolving Latch Contention on SQL Server] | Microsoft | 2014-02-28 | | | [Parallel Execution Plans – Branches and Threads] | Paul White | 2013-10-07 | [DBA][DEV] | | [Nasty Fast PERCENT_RANK] | Alan Burstein | 2016-06-07 | | | [Looking at VIEWs, Close Up] | Joe Celko | 2016-05-10 | | @@ -1478,7 +1475,6 @@ Articles types: [Monitor SQL Server Transaction Log File Free Space]:https://www.mssqltips.com/sqlservertip/3617/monitor-sql-server-transaction-log-file-free-space/ [Dynamically Query a 100 Million Row Table-Efficiently]:http://www.sqlservercentral.com/articles/T-SQL/121906/ [Understanding and Using Parallelism in SQL Server]:https://www.simple-talk.com/sql/learn-sql-server/understanding-and-using-parallelism-in-sql-server/ -[Diagnosing and Resolving Latch Contention on SQL Server]:https://www.microsoft.com/en-us/download/details.aspx?id=26665 [Parallel Execution Plans – Branches and Threads]:http://sqlperformance.com/2013/10/sql-plan/parallel-plans-branches-threads [Nasty Fast PERCENT_RANK]:http://www.sqlservercentral.com/articles/PERCENT_RANK/141532/ [Looking at VIEWs, Close Up]:https://www.simple-talk.com/sql/t-sql-programming/looking-at-views,-close-up/ @@ -1814,7 +1810,6 @@ Articles types: [Dynamic Data Unmasking]:https://orderbyselectnull.com/2017/08/25/dynamic-data-unmasking/ [Why is My Database Application so Slow?]:https://www.red-gate.com/simple-talk/dotnet/net-performance/database-application-slow/ [Generating Concurrent Activity]:http://michaeljswart.com/2014/01/generating-concurrent-activity/ -[Required Testing for Installing SQL Server Cumulative Updates and Service Packs]:http://littlekendra.com/2016/04/28/required-testing-for-installing-sql-server-cumulative-updates-and-service-packs/ [Microsoft SQL Server R Services - Internals X]:http://www.nielsberglund.com/2017/08/29/microsoft-sql-server-r-services-internals-x/ [Hands on Full-Text Search in SQL Server]:https://www.sqlshack.com/hands-full-text-search-sql-server/ [SQL Code Smells]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/sql-code-smells/ @@ -2554,7 +2549,6 @@ Articles types: [Pulling Group By Above a Join]:https://www.sql.kiwi/2020/05/pulling-group-by-above-join.html [SQLskills SQL101: Running out of ints and bigints]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-running-out-of-ints-and-bigints/ [Parallel Execution Plans – Branches and Threads]:https://sqlperformance.com/2013/10/sql-plan/parallel-plans-branches-threads -[Understanding and Using Parallelism in SQL Server]:https://www.red-gate.com/simple-talk/sql/learn-sql-server/understanding-and-using-parallelism-in-sql-server/ [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers]:https://www.seangallardy.com/top-asked-availability-group-questions-and-maybe-some-helpful-tidbits-as-answers/ [Encrypting SQL Server Database Backups]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ [Using Track Causality to Understand Query Execution]:https://sqlperformance.com/2019/01/extended-events/using-track-causality-to-understand-query-execution From 0854eeb568998f13e8d03a1da6f86e6c2660f1b0 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 20 Aug 2021 17:33:58 +0300 Subject: [PATCH 435/553] Remove duplicates articles --- Articles/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 43adc97b..3923a214 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -118,10 +118,8 @@ Articles types: | [Introduction to Latches in SQL Server] | Klaus Aschenbrenner | 2014-06-23 | | | [Latch Coupling in SQL Server] | Klaus Aschenbrenner | 2016-10-24 | | | [Partitioned Views? A How-To Guide] | Erik Darling | 2016-09-22 | | -| [How to Choose Between RCSI and Snapshot Isolation Levels] | Kendra Little | 2016-02-18 | | | [TroubleShooting SQL Server Memory Consumption] | Satnam Singh | 2012-09-28 | | | [Time Series Algorithms in SQL Server] | Dinesh Asanka | 2015-06-01 | | -| [Heap Tables in SQL Server] | Klaus Aschenbrenner | 2015-10-19 | | | [Internals of the Seven SQL Server Sorts – Part 1] | Paul White | 2015-04-29 | | | [Internals of the Seven SQL Server Sorts – Part 2] | Paul White | 2015-05-07 | | | [The 9 Letters That Get DBAs Fired] | Brent Ozar | 2011-12-22 | | @@ -1529,10 +1527,8 @@ Articles types: [Introduction to Latches in SQL Server]:http://www.sqlpassion.at/archive/2014/06/23/introduction-to-latches-in-sql-server/ [Latch Coupling in SQL Server]:https://www.sqlpassion.at/archive/2016/10/24/latch-coupling-in-sql-server/ [Partitioned Views? A How-To Guide]:https://www.brentozar.com/archive/2016/09/partitioned-views-guide/ -[How to Choose Between RCSI and Snapshot Isolation Levels]:https://www.littlekendra.com/2016/02/18/how-to-choose-rcsi-snapshot-isolation-levels/ [TroubleShooting SQL Server Memory Consumption]:http://www.sql-server-performance.com/2016/trouble-shooting-sql-server-ra-memory-consumption/ [Time Series Algorithms in SQL Server]:http://www.sql-server-performance.com/2015/time-series-algorithms-sql-server/ -[Heap Tables in SQL Server]:http://www.sqlpassion.at/archive/2015/10/19/heap-tables-in-sql-server/ [Internals of the Seven SQL Server Sorts – Part 1]:https://sqlperformance.com/2015/04/sql-plan/internals-of-the-seven-sql-server-sorts-part-1 [Internals of the Seven SQL Server Sorts – Part 2]:https://sqlperformance.com/2015/05/sql-plan/internals-of-the-seven-sql-server-sorts-part-2 [The 9 Letters That Get DBAs Fired]:https://www.brentozar.com/archive/2011/12/letters-that-get-dbas-fired/ @@ -2548,7 +2544,6 @@ Articles types: [15 SQL Server Performance Counters to Monitor In 2020]:https://www.sentryone.com/blog/allenwhite/sql-server-performance-counters-to-monitor [Pulling Group By Above a Join]:https://www.sql.kiwi/2020/05/pulling-group-by-above-join.html [SQLskills SQL101: Running out of ints and bigints]:https://www.sqlskills.com/blogs/paul/sqlskills-sql101-running-out-of-ints-and-bigints/ -[Parallel Execution Plans – Branches and Threads]:https://sqlperformance.com/2013/10/sql-plan/parallel-plans-branches-threads [Top Asked Availability Group Questions… and Maybe Some Helpful Tidbits as Answers]:https://www.seangallardy.com/top-asked-availability-group-questions-and-maybe-some-helpful-tidbits-as-answers/ [Encrypting SQL Server Database Backups]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ [Using Track Causality to Understand Query Execution]:https://sqlperformance.com/2019/01/extended-events/using-track-causality-to-understand-query-execution From e1c4f7d532171503c0e9b9d0f75c5371b1c57cc2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 21 Aug 2021 17:38:52 +0300 Subject: [PATCH 436/553] Remove duplicates articles --- Articles/README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 3923a214..79c2bbb3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -131,7 +131,6 @@ Articles types: | [Successful Anti-Patterns, Storage Requirements] | Raul Gonzalez | 2016-10-19 | | | [SQL Server table columns under the hood] | Remus Rusanu | 2011-10-20 | | | [How to analyse SQL Server performance] | Remus Rusanu | 2014-02-24 | | -| [To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem?] | Jim Gray | 2006-04-01 | | | [Asynchronous procedure execution] | Remus Rusanu | 2009-08-05 | | | [What is the CXPACKET Wait Type, and How Do You Reduce It?] | Brent Ozar | 2013-08-27 | | | [New indexes, hypothetically] | Kenneth Fisher | 2016-11-02 | [IDX] | @@ -524,7 +523,7 @@ Articles types: | [Query Trace Column Values] | Dmitry Piliugin | 2018-04-23 | [XE] | | [Concurrency Week: How to Delete Just Some Rows from a Really Big Table] | Brent Ozar | 2018-04-27 | [DEV] | | [Break large delete operations into chunks] | Aaron Bertrand | 2013-03-13 | [DBA][DEV] | -| [How to perform a page level restore in SQL Server] | Prashanth Jayaram | 2018-08-18 | [DBA][DEV] | +| [How to perform a page level restore in SQL Server - Jayaram] | Prashanth Jayaram | 2018-08-18 | [DBA][DEV] | | [Grouping dates without blocking operators] | Daniel Hutmacher | 2018-05-14 | [DEV] | | [What’s CHECKDB doing in my database restore?] | Mike Fal | 2018-04-10 | [DBA] | | [How To Hide An Instance Of SQL Server] | Thomas Larock | 2018-04-10 | [DBA] | @@ -1191,7 +1190,6 @@ Articles types: | [Cleaning up Backups from Azure Blob Storage] | Niko Neugebauer | 2020-03-30 | [AZ][B] | | [Temporary Table Caching Explained] | Paul White | 2012-08-17 | [DBA][DEV] | | [SQL Server Temporary Object Caching] | Paul White | 2017-05-02 | [DBA][DEV] | -| [Dynamic Data Unmasking] | Joe Obbish | 2017-08-24 | [DBA][DEV] | | [3 Ways to Run DBCC CHECKDB Faster] | Brent Ozar | 2020-08-27 | [DBA][DEV] | | [Back Up SQL Server 43%-67% Faster by Writing to Multiple Files] | Brent Ozar | 2020-08-23 | [DBA][DEV] | | [Bad Habits to Kick : Using SELECT * / omitting the column list] | Aaron Bertrand | 2009-10-10 | [DBA][DEV] | @@ -1540,7 +1538,6 @@ Articles types: [Successful Anti-Patterns, Storage Requirements]:http://www.sqldoubleg.com/2016/10/19/successful-anti-patterns-storage-requirements/ [SQL Server table columns under the hood]:http://rusanu.com/2011/10/20/sql-server-table-columns-under-the-hood/ [How to analyse SQL Server performance]:http://rusanu.com/2014/02/24/how-to-analyse-sql-server-performance/ -[To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem?]:https://www.microsoft.com/en-us/research/publication/to-blob-or-not-to-blob-large-object-storage-in-a-database-or-a-filesystem/ [Asynchronous procedure execution]:http://rusanu.com/2009/08/05/asynchronous-procedure-execution/ [What is the CXPACKET Wait Type, and How Do You Reduce It?]:https://www.brentozar.com/archive/2013/08/what-is-the-cxpacket-wait-type-and-how-do-you-reduce-it/ [New indexes, hypothetically]:https://sqlstudies.com/2016/11/02/new-indexes-hypothetically/ @@ -1930,7 +1927,7 @@ Articles types: [Query Trace Column Values]:https://www.sqlshack.com/query-trace-column-values/ [Concurrency Week: How to Delete Just Some Rows from a Really Big Table]:https://www.brentozar.com/archive/2018/04/how-to-delete-just-some-rows-from-a-really-big-table/ [Break large delete operations into chunks]:https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes -[How to perform a page level restore in SQL Server]:https://www.sqlshack.com/how-to-perform-a-page-level-restore-in-sql-server/ +[How to perform a page level restore in SQL Server - Jayaram]:https://www.sqlshack.com/how-to-perform-a-page-level-restore-in-sql-server/ [Grouping dates without blocking operators]:https://sqlsunday.com/2018/05/14/grouping-dates-without-blocking-operators/ [What’s CHECKDB doing in my database restore?]:http://www.mikefal.net/2018/04/10/whats-checkdb-doing-in-my-database-restore/ [How To Hide An Instance Of SQL Server]:https://thomaslarock.com/2018/04/how-to-hide-an-instance-of-sql-server/ @@ -1973,7 +1970,6 @@ Articles types: [Can Rowstore Compression Beat Columnstore Compression?]:https://orderbyselectnull.com/2018/06/28/can-rowstore-compression-beat-columnstore-compression/ [Inside the Storage Engine: Anatomy of a record]:https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-record/ [Inside the Storage Engine: Anatomy of an extent]:https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-an-extent/ -[Inside the Storage Engine: Anatomy of a page]:https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-page/ [Inside the Storage Engine: IAM pages, IAM chains, and allocation units]:https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-iam-pages-iam-chains-and-allocation-units/ [Inside The Storage Engine: GAM, SGAM, PFS and other allocation maps]:https://www.sqlskills.com/blogs/paul/inside-the-storage-engine-gam-sgam-pfs-and-other-allocation-maps/ [Disaster recovery 101: fixing a broken boot page]:https://www.sqlskills.com/blogs/paul/disaster-recovery-101-fixing-a-broken-boot-page/ @@ -2591,7 +2587,6 @@ Articles types: [Cleaning up Backups from Azure Blob Storage]:http://www.nikoport.com/2020/03/30/cleaning-up-backups-from-azure-blob-storage/ [Temporary Table Caching Explained]:https://www.sql.kiwi/2012/08/temporary-object-caching-explained.html [SQL Server Temporary Object Caching]:https://sqlperformance.com/2017/05/sql-performance/sql-server-temporary-object-caching -[Dynamic Data Unmasking]:https://www.erikdarlingdata.com/sql-server/dynamic-data-unmasking/ [3 Ways to Run DBCC CHECKDB Faster]:https://www.brentozar.com/archive/2020/08/3-ways-to-run-dbcc-checkdb-faster/ [Back Up SQL Server 43%-67% Faster by Writing to Multiple Files]:https://www.brentozar.com/archive/2020/08/back-up-sql-server-43-67-faster-by-writing-to-multiple-files/ [Bad Habits to Kick : Using SELECT * / omitting the column list]:https://sqlblog.org/2009/10/10/bad-habits-to-kick-using-select-omitting-the-column-list @@ -2599,7 +2594,6 @@ Articles types: [When Select * Doesn’t Matter]:https://www.erikdarlingdata.com/sql-server/when-select-doesnt-matter/ [HT Waits – Explained and Animated]:https://forrestmcdaniel.com/2020/08/12/ht-waits-explained-and-animated/ [SQL Server 100% Online Deployments]:https://michaeljswart.com/2018/01/100-online-deployments/ -[When Measuring Timespans, try DATEADD instead of DATEDIFF]:https://michaeljswart.com/2017/12/when-measuring-timespans-try-dateadd-instead-of-datediff/ [The Curious Case of… setting up a server for DBCC CHECKDB]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-setting-up-a-server-for-dbcc-checkdb/ [When should a primary key be declared non-clustered?]:https://dba.stackexchange.com/q/7741/107045 [Guid vs INT - Which is better as a primary key?]:https://dba.stackexchange.com/q/264/107045 From 8d2991eb8001055b807646e0288c438273133f7e Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 22 Aug 2021 17:40:45 +0300 Subject: [PATCH 437/553] Remove duplicates articles --- Articles/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 79c2bbb3..34b8962b 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -640,7 +640,6 @@ Articles types: | [Preparation for SQL Server Installation] | Michal Sadowski | 2018-12-12 | [DBA] | | [Executing xp_cmdshell with Non SysAdmin Account] | Lucas Kartawidjaja | 2019-01-04 | [DBA] | | [Generating SQL using Biml (T-SQL Tuesday #110)] | Cathrine Wilhelmsen | 2019-01-08 | [DEV] | -| [Avoiding SQL Server Upgrade Performance Issues] | Glenn Berry | 2019-02-05 | [DBA] | | [Using Temporary Procedures] | Phil Factor | 2019-02-08 | [DBA][DEV] | | [Introduction to SQL Server Security — Part 1] | Robert Sheldon | 2018-12-31 | [SEC] | | [Introduction to SQL Server Security — Part 2] | Robert Sheldon | 2019-01-28 | [SEC] | @@ -766,7 +765,7 @@ Articles types: | [SQL Server Tipping Games – Why Non-Clustered Indexes are just ignored!] | Klaus Aschenbrenner | 2013-06-12 | [DBA][DEV] | | [SQL Server Guide To NULL Handling] | Gavin Draper | 2018-11-29 | [DBA][DEV] | | [Living with SQL’s 900 Byte Index Key Length Limit] | Bart Duncan | 2011-01-06 | [DBA][DEV] | -| [Memory-Optimized TempDB Metadata in SQL Server 2019] | Ed Pollack | 2019-07-10 | [DBA][DEV] | +| [Memory-Optimized TempDB Metadata in SQL Server 2019 - SQLHack] | Ed Pollack | 2019-07-10 | [DBA][DEV] | | [Forcing A Plan That Has A Plan Guide] | Grant Fritchey | 2018-11-26 | [DBA][DEV] | | [Remember the Default Window] | Steve Jones | 2018-08-23 | [DBA][DEV] | | [The Impact of Non-Updating Updates] | Paul Randal | 2010-08-11 | [DBA][DEV] | @@ -1063,7 +1062,6 @@ Articles types: | [Why Ordering Isn’t Guaranteed Without an ORDER BY] | Brent Ozar | 2020-04-22 | [DBA][DEV] | | [How to Attach a SQL Server Database without a Transaction Log and with Open Transactions] | Daniel Farina | 2020-04-29 | [COR] | | [SQL 2016 - It Just Runs Faster: Indirect Checkpoint Default] | Ryan Stonecipher, Peter Byrne, Bob Dorr | 2016-04-12 | [DBA][CHP] | -| [Indirect Checkpoint and tempdb – the good, the bad and the non-yielding scheduler] | Parikshit Savjani | 2017-06-26 | [DBA][CHP] | | [How do checkpoints work and what gets logged] | Paul Randal | 2009-09-27 | [DBA][CHP] | | [Inside the Storage Engine: What’s in the buffer pool?] | Paul Randal | 2008-08-26 | [DBA] | | [What does checkpoint do for tempdb?] | Paul Randal | 2009-10-07 | [DBA][CHP] | @@ -2041,7 +2039,6 @@ Articles types: [Preparation for SQL Server Installation]:https://sqlplayer.net/2018/12/preparation-for-sql-server-installation/ [Executing xp_cmdshell with Non SysAdmin Account]:http://www.lucasnotes.com/2019/01/executing-xpcmdshell-with-non-sysadmin.html [Generating SQL using Biml (T-SQL Tuesday #110)]:https://www.cathrinewilhelmsen.net/2019/01/08/generating-sql-using-biml/ -[Avoiding SQL Server Upgrade Performance Issues]:https://www.sqlskills.com/blogs/glenn/avoiding-sql-server-upgrade-performance-issues/ [Using Temporary Procedures]:https://www.red-gate.com/simple-talk/blogs/using-temporary-procedures/ [Introduction to SQL Server Security — Part 1]:https://www.red-gate.com/simple-talk/sysadmin/data-protection-and-privacy/introduction-to-sql-server-security-part-1/ [Introduction to SQL Server Security — Part 2]:https://www.red-gate.com/simple-talk/sysadmin/data-protection-and-privacy/introduction-to-sql-server-security-part-2/ @@ -2166,7 +2163,7 @@ Articles types: [SQL Server Tipping Games – Why Non-Clustered Indexes are just ignored!]:https://www.sqlpassion.at/archive/2013/06/12/sql-server-tipping-games-why-non-clustered-indexes-are-just-ignored/ [SQL Server Guide To NULL Handling]:https://gavindraper.com//2018/11/29/SQL-Server-Guide-To-NULL-Handling/ [Living with SQL’s 900 Byte Index Key Length Limit]:https://blogs.msdn.microsoft.com/bartd/2011/01/06/living-with-sqls-900-byte-index-key-length-limit/ -[Memory-Optimized TempDB Metadata in SQL Server 2019]:https://www.sqlshack.com/memory-optimized-tempdb-metadata-in-sql-server-2019/ +[Memory-Optimized TempDB Metadata in SQL Server 2019 - SQLHack]:https://www.sqlshack.com/memory-optimized-tempdb-metadata-in-sql-server-2019/ [Forcing A Plan That Has A Plan Guide]:https://www.scarydba.com/2018/11/26/forcing-a-plan-that-has-a-plan-guide/ [Remember the Default Window]:https://voiceofthedba.com/2018/08/23/remember-the-default-window/ [The Impact of Non-Updating Updates]:https://www.sql.kiwi/2010/08/the-impact-of-non-updating-updates.html @@ -2237,7 +2234,6 @@ Articles types: [SQL Injection: Detection and prevention]:https://www.sqlshack.com/sql-injection-detection-and-prevention/ [Some T-SQL INSERTs DO Follow the Fill Factor!]:https://www.sqlservercentral.com/articles/some-t-sql-inserts-do-follow-the-fill-factor-sql-oolie [Install SQL Server 2019 Big Data Cluster using Azure Data Studio]:https://nielsberglund.com/2019/09/11/install-sql-server-2019-big-data-cluster-using-azure-data-studio/ -[Indirect Checkpoint and tempdb – the good, the bad and the non-yielding scheduler]:https://techcommunity.microsoft.com/t5/SQL-Server/Indirect-Checkpoint-and-tempdb-8211-the-good-the-bad-and-the-non/bc-p/851152#M1351 [Ghost Records in SQL Server… Now whats that ????]:https://www.sqlservergeeks.com/sql-server-ghost-records-in-sql-server-now-whats-that/ [Transaction Isolation Levels and sp_executesql]:https://www.sqlserverscience.com/basics/stored-procedure-dynamic-sql-execute-as/ [Batch Mode Bitmaps in SQL Server]:https://sqlperformance.com/2019/08/sql-performance/batch-mode-bitmaps-in-sql-server From d41c23186c8bae6b98bbc61f4ac2447edfaa7f29 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 23 Aug 2021 17:43:03 +0300 Subject: [PATCH 438/553] Remove duplicates articles, fix title --- Articles/README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 34b8962b..a0a4cdfd 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1098,7 +1098,6 @@ Articles types: | [Changing an INT to a BIGINT with no downtime] | Michael J Swart | 2020-06-19 | [DBA] | | [New Metadata-Only Column Changes in SQL Server 2016] | Paul White | 2020-04-17 | [DBA][DEV] | | [Bandwidth-friendly Query Profiling for Azure SQL Database] | Greg Gonzalez | 2020-04-15 | [AZ][XE] | -| [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-10 | [DBA][DEV] | | [Column scope and binding order in subqueries] | Gail Shaw | 2019-04-23 | [DBA][DEV] | | [Improve SQL Server Extended Events system_health Session] | Aaron Bertrand | 2020-06-17 | [DBA][DEV] | | [Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It.] | Brent Ozar | 2020-06-17 | [DBA][DEV] | @@ -1157,7 +1156,6 @@ Articles types: | [What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)] | Joe Obbish | 2018-09-27 | [DBA][DEV] | | [SQL Server 2019 Aggregate Splitting] | Paul White | 2020-08-04 | [DBA][DEV] | | [Security Best Practice: dny and revoke permissions granted to All Users by default - HIGHLY IMPORTANT!] | Ronen Ariely | 2019-10-13 | [DBA][SEC] | -| [Execute multiple jobs Synchronously from in a main job] | Ronen Ariely | 2020-04-11 | [DBA][DEV] | | [The Trillion Row Table] | Joe Obbish | 2020-08-12 | [BENCH] | | [Temporal Tables and Table Partitioning: Not If You Like Switching Partitions] | Erik Darlling | 2020-03-03 | [DBA][DEV] | | [Long Running Query on Read-Only Replica that takes moments on the Primary] | Sean Gallardy,Joe Obbish | 2019-09-05 | [DBA][DEV] | @@ -1343,7 +1341,7 @@ Articles types: | [Identifying Cost-Saving Opportunities in Azure DevOps] | Eric Smith | 2020-04-28 | [Az] | | [One wide index or multiple narrow indexes?] | Gail Shaw | 2010-09-14 | [DBA][DEV] | | [The Hidden Danger of Readable Secondaries in SQL Server AlwaysOn Availability Groups] | Dmitri Korotkevitch | 2018-09-04 | [DBA] | -| [When a Columnstore Index Makes Your Query Fail] | Brent Ozar | 2020-06-08 | [DBA] | +| [When a Columnstore Index Makes Your Query Fail - 1/0 error] | Brent Ozar | 2020-06-08 | [DBA] | | [Poor Man’s Resource Governor: Database-Scoped Configurations] | Brent Ozar | 2020-09-26 | [DBA] | | [SQL Server Suddenly Frozen? You Might Be Snapshotting Too Many Databases.] | Brent Ozar | 2020-11-27 | [DBA] | | [How to Batch Updates A Few Thousand Rows at a Time] | Brent Ozar | 2020-12-17 | [DBA][DEV] | @@ -1377,7 +1375,6 @@ Articles types: | [Testing Backups and Offloading CheckDB] | Taryn Pratt | 2021-04-19 | [DBA] | | [Fighting with Deadlocks] | Taryn Pratt | 2021-04-09 | [DBA][DEV] | | [Syncing Logins Between Availability Group Replicas] | Taryn Pratt | 2020-12-18 | [DBA] | -| [The Ascending Key Problem In Fact Tables –Part Two: Stat Job!] | Thomas Kejser | 2011-07-07 | [DEV] | | [SQL JOINs and UNIONs] | Austin Smith | 2020-03-13 | [DBA][DEV] | | [Some opinionated thoughts on SQL databases] | Nelson Elhage | 2020-03-30 | [DBA][DEV] | | [How MERGE on two different rows can still deadlock you] | Daniel Hutmacher | 2021-05-04 | [DBA][DEV] | @@ -2495,7 +2492,7 @@ Articles types: [Changing an INT to a BIGINT with no downtime]:https://michaeljswart.com/2020/06/problem-solving-by-cheating/ [New Metadata-Only Column Changes in SQL Server 2016]:https://sqlperformance.com/2020/04/database-design/new-metadata-column-changes-sql-server-2016 [Bandwidth-friendly Query Profiling for Azure SQL Database]:https://sqlperformance.com/2020/04/sql-performance/bandwidth-friendly-query-profiling-azure-sql-database -[When a Columnstore Index Makes Your Query Fail]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ +[When a Columnstore Index Makes Your Query Fail - 1/0 error]:https://www.brentozar.com/archive/2020/06/when-a-columnstore-index-makes-your-query-fail/ [Column scope and binding order in subqueries]:https://sqlinthewild.co.za/index.php/2019/04/23/no-this-is-not-a-bug-in-t-sql/ [Improve SQL Server Extended Events system_health Session]:https://www.mssqltips.com/sqlservertip/6456/improve-sql-server-extended-events-systemhealth-session/ [Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It.]:https://www.brentozar.com/archive/2020/06/page-life-expectancy-doesnt-mean-jack-and-you-should-stop-looking-at-it/ @@ -2553,7 +2550,6 @@ Articles types: [What is the SOS_WORK_DISPATCHER Wait Type? (Or how to work with Call Stacks in SQL Server)]:https://orderbyselectnull.com/2018/09/27/what-is-the-sos_work_dispatcher-wait-type/ [SQL Server 2019 Aggregate Splitting]:https://www.sql.kiwi/2020/08/sql-server-2019-aggregate-splitting.html [Security Best Practice: dny and revoke permissions granted to All Users by default - HIGHLY IMPORTANT!]:https://ariely.info/Blog/tabid/83/EntryId/241/Security-Best-Practice-dny-and-revoke-permissions-granted-to-All-Users-by-default-HIGHLY-IMPORTANT.aspx -[Execute multiple jobs Synchronously from in a main job]:https://ariely.info/Blog/tabid/83/EntryId/250/Execute-multiple-jobs-Synchronously-from-in-a-main-job.aspx [The Trillion Row Operator]:https://www.erikdarlingdata.com/2020/08/the-trillion-row-operator/ [Temporal Tables and Table Partitioning: Not If You Like Switching Partitions]:https://www.erikdarlingdata.com/sql-server/temporal-tables-and-table-partitioning-not-if-you-like-switching-partitions/ [Long Running Query on Read-Only Replica that takes moments on the Primary]:https://dba.stackexchange.com/questions/237671/long-running-query-on-read-only-replica-that-takes-moments-on-the-primary/ @@ -2770,7 +2766,6 @@ Articles types: [Testing Backups and Offloading CheckDB]:https://www.tarynpivots.com/post/2021/testing-backups-offload-dbcc-checkdb/ [Fighting with Deadlocks]:https://www.tarynpivots.com/post/2021/fighting-with-deadlocks/ [Syncing Logins Between Availability Group Replicas]:https://www.tarynpivots.com/post/2020/syncing-logins-between-availablity-group-replicas/ -[The Ascending Key Problem In Fact Tables –Part Two: Stat Job!]:http://kejser.org/the-ascending-column-problem-in-fact-tables-part-two-stat-job/ [SQL JOINs and UNIONs]:https://levelup.gitconnected.com/sql-joins-2cc89babb6f9 [Some opinionated thoughts on SQL databases]:https://blog.nelhage.com/post/some-opinionated-sql-takes/ [How MERGE on two different rows can still deadlock you]:https://sqlsunday.com/2021/05/04/how-merge-can-deadlock-you/ From 4697c4792176364e946d7a1b534230256e06b973 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 24 Aug 2021 17:47:19 +0300 Subject: [PATCH 439/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a0a4cdfd..2634852e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1428,6 +1428,8 @@ Articles types: | [Make Network Path Visible For SQL Server Backup and Restore in SSMS] | Ahmad Yaseen | 2015-03-03 | [DBA] | | [T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting] | Itzik Ben-Gan | 2019-09-12 | [DBA][DEV] | | [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | +| [Special Agent Jenkins] | Kirill Kravtsov | 2018-03-03 | [J] | +| [What To Avoid If You Want To Use MERGE] | Michael J Swart | 2021-08-04 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2819,3 +2821,5 @@ Articles types: [Make Network Path Visible For SQL Server Backup and Restore in SSMS]:https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/ [T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting]:https://sqlperformance.com/2019/09/t-sql-queries/t-sql-pitfalls-pivoting-unpivoting [How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ +[Special Agent Jenkins]:https://nvarscar.wordpress.com/2018/05/03/special-agent-jenkins/ +[What To Avoid If You Want To Use MERGE]:https://michaeljswart.com/2021/08/what-to-avoid-if-you-want-to-use-merge/ From 75ece26fd42f6fab99debd84898b943df37cbed2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 25 Aug 2021 17:51:59 +0300 Subject: [PATCH 440/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 2634852e..0534e406 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1430,6 +1430,8 @@ Articles types: | [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | | [Special Agent Jenkins] | Kirill Kravtsov | 2018-03-03 | [J] | | [What To Avoid If You Want To Use MERGE] | Michael J Swart | 2021-08-04 | [DBA][DEV] | +| [Solving Gaps and Islands with Enhanced Window] | Itzik Ben-Gan | 2012-09-20 | [DBA][DEV] | +| [How to choose between SQL and NoSQL databases] | Robert Sheldon | 2021-04-13 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2823,3 +2825,5 @@ Articles types: [How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ [Special Agent Jenkins]:https://nvarscar.wordpress.com/2018/05/03/special-agent-jenkins/ [What To Avoid If You Want To Use MERGE]:https://michaeljswart.com/2021/08/what-to-avoid-if-you-want-to-use-merge/ +[Solving Gaps and Islands with Enhanced Window]:https://www.itprotoday.com/sql-server/solving-gaps-and-islands-enhanced-window-functions +[How to choose between SQL and NoSQL databases]:https://www.red-gate.com/simple-talk/databases/nosql/how-to-choose-between-sql-and-nosql-databases/ From 0cb3f9133987637d46094f686e297168a08ac64a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 26 Aug 2021 17:55:41 +0300 Subject: [PATCH 441/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0534e406..b96405d3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1432,6 +1432,8 @@ Articles types: | [What To Avoid If You Want To Use MERGE] | Michael J Swart | 2021-08-04 | [DBA][DEV] | | [Solving Gaps and Islands with Enhanced Window] | Itzik Ben-Gan | 2012-09-20 | [DBA][DEV] | | [How to choose between SQL and NoSQL databases] | Robert Sheldon | 2021-04-13 | [DBA][DEV] | +| [SQL Server plan cache mining – Plan attributes] | Edward Pollack | 2021-04-26 | [DBA][DEV] | +| [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2827,3 +2829,5 @@ Articles types: [What To Avoid If You Want To Use MERGE]:https://michaeljswart.com/2021/08/what-to-avoid-if-you-want-to-use-merge/ [Solving Gaps and Islands with Enhanced Window]:https://www.itprotoday.com/sql-server/solving-gaps-and-islands-enhanced-window-functions [How to choose between SQL and NoSQL databases]:https://www.red-gate.com/simple-talk/databases/nosql/how-to-choose-between-sql-and-nosql-databases/ +[SQL Server plan cache mining – Plan attributes]:https://www.red-gate.com/simple-talk/homepage/sql-server-plan-cache-mining-plan-attributes/ +[How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ From 335c475a16aceb03adda75921c0b7ae013f8c57f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 27 Aug 2021 18:22:48 +0300 Subject: [PATCH 442/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b96405d3..0bd64857 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1434,6 +1434,8 @@ Articles types: | [How to choose between SQL and NoSQL databases] | Robert Sheldon | 2021-04-13 | [DBA][DEV] | | [SQL Server plan cache mining – Plan attributes] | Edward Pollack | 2021-04-26 | [DBA][DEV] | | [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | +| [How to create an autonomous transaction in SQL Server 2008] | SQL-Server-Team | 2021-02-08 | [DBA][DEV] | +| [Cloud Comparison: AWS vs. Azure vs. GCP] | Troy Blake | 2021-03-24 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2831,3 +2833,5 @@ Articles types: [How to choose between SQL and NoSQL databases]:https://www.red-gate.com/simple-talk/databases/nosql/how-to-choose-between-sql-and-nosql-databases/ [SQL Server plan cache mining – Plan attributes]:https://www.red-gate.com/simple-talk/homepage/sql-server-plan-cache-mining-plan-attributes/ [How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ +[How to create an autonomous transaction in SQL Server 2008]:https://techcommunity.microsoft.com/t5/sql-server/how-to-create-an-autonomous-transaction-in-sql-server-2008/ba-p/383471 +[Cloud Comparison: AWS vs. Azure vs. GCP]:https://seniordba.wordpress.com/2021/05/24/cloud-comparison-aws-vs-azure-vs-gcp/ From 6de88724f0a7b1aa3f7025cc20c37223ae919a88 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 28 Aug 2021 18:31:19 +0300 Subject: [PATCH 443/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0bd64857..0270378d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1436,6 +1436,8 @@ Articles types: | [How to Prep a SQL Server Availability Group for VM-Level DR Replication] | David Klee | 2021-02-08 | [DBA] | | [How to create an autonomous transaction in SQL Server 2008] | SQL-Server-Team | 2021-02-08 | [DBA][DEV] | | [Cloud Comparison: AWS vs. Azure vs. GCP] | Troy Blake | 2021-03-24 | [DBA][DEV] | +| [New VLF status value] | Troy Blake | 2021-03-24 | [DBA][DEV] | +| [The Simplest Alternative to sp_MSforeachdb] | Eitan Blumin | 2021-08-05 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2835,3 +2837,5 @@ Articles types: [How to Prep a SQL Server Availability Group for VM-Level DR Replication]:https://www.davidklee.net/2021/02/08/how-to-prep-a-sql-server-availability-group-for-vm-level-dr-replication/ [How to create an autonomous transaction in SQL Server 2008]:https://techcommunity.microsoft.com/t5/sql-server/how-to-create-an-autonomous-transaction-in-sql-server-2008/ba-p/383471 [Cloud Comparison: AWS vs. Azure vs. GCP]:https://seniordba.wordpress.com/2021/05/24/cloud-comparison-aws-vs-azure-vs-gcp/ +[New VLF status value]:https://www.sqlskills.com/blogs/paul/new-vlf-status-value/ +[The Simplest Alternative to sp_MSforeachdb]:https://eitanblumin.com/2021/08/05/simplest-alternative-to-sp_msforeachdb/ From 0b97b19b9383f011b4473c275a5cabe2644a88bd Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 29 Aug 2021 18:33:39 +0300 Subject: [PATCH 444/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0270378d..0387fc4a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1438,6 +1438,8 @@ Articles types: | [Cloud Comparison: AWS vs. Azure vs. GCP] | Troy Blake | 2021-03-24 | [DBA][DEV] | | [New VLF status value] | Troy Blake | 2021-03-24 | [DBA][DEV] | | [The Simplest Alternative to sp_MSforeachdb] | Eitan Blumin | 2021-08-05 | [DBA][DEV] | +| [Your database connection deserves a name] | Andy Grunwald | 2021-07-25 | [DBA][DEV] | +| [Renaming a Database Table In-Flight] | Arvind Paul | 2021-01-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2839,3 +2841,5 @@ Articles types: [Cloud Comparison: AWS vs. Azure vs. GCP]:https://seniordba.wordpress.com/2021/05/24/cloud-comparison-aws-vs-azure-vs-gcp/ [New VLF status value]:https://www.sqlskills.com/blogs/paul/new-vlf-status-value/ [The Simplest Alternative to sp_MSforeachdb]:https://eitanblumin.com/2021/08/05/simplest-alternative-to-sp_msforeachdb/ +[Your database connection deserves a name]:https://andygrunwald.com/blog/your-database-connection-deserves-a-name/ +[Renaming a Database Table In-Flight]:https://engineering.outschool.com/posts/renaming-database-table/ From aa2e5d34c56486c3148b0c6ee759b62bf775ab9a Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 30 Aug 2021 18:37:00 +0300 Subject: [PATCH 445/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 0387fc4a..c38ec134 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1440,6 +1440,8 @@ Articles types: | [The Simplest Alternative to sp_MSforeachdb] | Eitan Blumin | 2021-08-05 | [DBA][DEV] | | [Your database connection deserves a name] | Andy Grunwald | 2021-07-25 | [DBA][DEV] | | [Renaming a Database Table In-Flight] | Arvind Paul | 2021-01-01 | [DBA][DEV] | +| [Upgrading/Migrating Large Replicated Databases Without Reinitializing] | Jonathan Kehayias | 2021-08-12 | [DBA][DEV] | +| [TempDB configuration for people in a hurry] | Jeff Iannucci | 2021-07-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2843,3 +2845,5 @@ Articles types: [The Simplest Alternative to sp_MSforeachdb]:https://eitanblumin.com/2021/08/05/simplest-alternative-to-sp_msforeachdb/ [Your database connection deserves a name]:https://andygrunwald.com/blog/your-database-connection-deserves-a-name/ [Renaming a Database Table In-Flight]:https://engineering.outschool.com/posts/renaming-database-table/ +[Upgrading/Migrating Large Replicated Databases Without Reinitializing]:https://www.sqlskills.com/blogs/jonathan/upgrading-migrating-large-replicated-databases-without-reinitializing/ +[TempDB configuration for people in a hurry]:https://desertdba.com/tempdb-configuration-for-people-in-a-hurry/ From 30a6e0669d13bce08a98a4d182673521aae2b8ec Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 31 Aug 2021 11:33:15 +0300 Subject: [PATCH 446/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c38ec134..b45f374c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1442,6 +1442,7 @@ Articles types: | [Renaming a Database Table In-Flight] | Arvind Paul | 2021-01-01 | [DBA][DEV] | | [Upgrading/Migrating Large Replicated Databases Without Reinitializing] | Jonathan Kehayias | 2021-08-12 | [DBA][DEV] | | [TempDB configuration for people in a hurry] | Jeff Iannucci | 2021-07-03 | [DBA][DEV] | +| [Help! My tempdb database won’t shrink!] | Jeff Iannucci | 2018-06-22 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2847,3 +2848,4 @@ Articles types: [Renaming a Database Table In-Flight]:https://engineering.outschool.com/posts/renaming-database-table/ [Upgrading/Migrating Large Replicated Databases Without Reinitializing]:https://www.sqlskills.com/blogs/jonathan/upgrading-migrating-large-replicated-databases-without-reinitializing/ [TempDB configuration for people in a hurry]:https://desertdba.com/tempdb-configuration-for-people-in-a-hurry/ +[Help! My tempdb database won’t shrink!]:https://desertdba.com/help-my-tempdb-database-wont-shrink/ From 15a0ce3dba3f06712c42d7189ab8e32f905f28bc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 1 Sep 2021 11:35:11 +0300 Subject: [PATCH 447/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index b45f374c..fc065d5c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1443,6 +1443,7 @@ Articles types: | [Upgrading/Migrating Large Replicated Databases Without Reinitializing] | Jonathan Kehayias | 2021-08-12 | [DBA][DEV] | | [TempDB configuration for people in a hurry] | Jeff Iannucci | 2021-07-03 | [DBA][DEV] | | [Help! My tempdb database won’t shrink!] | Jeff Iannucci | 2018-06-22 | [DBA][DEV] | +| [SQL Server Checkpoint Monitoring with Extended Events] | Aaron Bertrand | 2020-02-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2849,3 +2850,4 @@ Articles types: [Upgrading/Migrating Large Replicated Databases Without Reinitializing]:https://www.sqlskills.com/blogs/jonathan/upgrading-migrating-large-replicated-databases-without-reinitializing/ [TempDB configuration for people in a hurry]:https://desertdba.com/tempdb-configuration-for-people-in-a-hurry/ [Help! My tempdb database won’t shrink!]:https://desertdba.com/help-my-tempdb-database-wont-shrink/ +[SQL Server Checkpoint Monitoring with Extended Events]:https://www.mssqltips.com/sqlservertip/6319/sql-server-checkpoint-monitoring-with-extended-events/ From 089e74a04d970a54ef54c53e7d0eba99f7e43fd7 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 2 Sep 2021 11:40:33 +0300 Subject: [PATCH 448/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index fc065d5c..3d6f84c3 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1444,6 +1444,7 @@ Articles types: | [TempDB configuration for people in a hurry] | Jeff Iannucci | 2021-07-03 | [DBA][DEV] | | [Help! My tempdb database won’t shrink!] | Jeff Iannucci | 2018-06-22 | [DBA][DEV] | | [SQL Server Checkpoint Monitoring with Extended Events] | Aaron Bertrand | 2020-02-17 | [DBA][DEV] | +| ["0 to 60" : Switching to indirect checkpoints] | Aaron Bertrand | 2020-05-01 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2851,3 +2852,4 @@ Articles types: [TempDB configuration for people in a hurry]:https://desertdba.com/tempdb-configuration-for-people-in-a-hurry/ [Help! My tempdb database won’t shrink!]:https://desertdba.com/help-my-tempdb-database-wont-shrink/ [SQL Server Checkpoint Monitoring with Extended Events]:https://www.mssqltips.com/sqlservertip/6319/sql-server-checkpoint-monitoring-with-extended-events/ +["0 to 60" : Switching to indirect checkpoints]:https://sqlperformance.com/2020/05/system-configuration/0-to-60-switching-to-indirect-checkpoints From 734a992906970245c60984268c7035e8903f9920 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 2 Sep 2021 11:46:31 +0300 Subject: [PATCH 449/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3d6f84c3..f648ddec 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1445,6 +1445,7 @@ Articles types: | [Help! My tempdb database won’t shrink!] | Jeff Iannucci | 2018-06-22 | [DBA][DEV] | | [SQL Server Checkpoint Monitoring with Extended Events] | Aaron Bertrand | 2020-02-17 | [DBA][DEV] | | ["0 to 60" : Switching to indirect checkpoints] | Aaron Bertrand | 2020-05-01 | [DBA][DEV] | +| [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases] | Niko Neugebauer | 2021-02-09 | [AZ] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2853,3 +2854,4 @@ Articles types: [Help! My tempdb database won’t shrink!]:https://desertdba.com/help-my-tempdb-database-wont-shrink/ [SQL Server Checkpoint Monitoring with Extended Events]:https://www.mssqltips.com/sqlservertip/6319/sql-server-checkpoint-monitoring-with-extended-events/ ["0 to 60" : Switching to indirect checkpoints]:https://sqlperformance.com/2020/05/system-configuration/0-to-60-switching-to-indirect-checkpoints +[A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases]:https://www.nikoport.com/2021/02/09/a-case-against-using-basic-and-standard-s0-s1-tiers-in-azure-sql-databases/ From c14dcf6597167fc9bbfdc5ec8448f8d726f13ea3 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 3 Sep 2021 11:59:08 +0300 Subject: [PATCH 450/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f648ddec..d1131592 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1446,6 +1446,7 @@ Articles types: | [SQL Server Checkpoint Monitoring with Extended Events] | Aaron Bertrand | 2020-02-17 | [DBA][DEV] | | ["0 to 60" : Switching to indirect checkpoints] | Aaron Bertrand | 2020-05-01 | [DBA][DEV] | | [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases] | Niko Neugebauer | 2021-02-09 | [AZ] | +| [Experiment: Does sp_recompile on a table update associated views.] | Niko Neugebauer | 2021-08-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2855,3 +2856,4 @@ Articles types: [SQL Server Checkpoint Monitoring with Extended Events]:https://www.mssqltips.com/sqlservertip/6319/sql-server-checkpoint-monitoring-with-extended-events/ ["0 to 60" : Switching to indirect checkpoints]:https://sqlperformance.com/2020/05/system-configuration/0-to-60-switching-to-indirect-checkpoints [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases]:https://www.nikoport.com/2021/02/09/a-case-against-using-basic-and-standard-s0-s1-tiers-in-azure-sql-databases/ +[Experiment: Does sp_recompile on a table update associated views.]:https://sqlstudies.com/2021/08/17/experiment-does-sp_recompile-on-a-table-update-associated-views/ From 9da7c9c57d80ba27b2737c968729f041c914203b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 4 Sep 2021 12:04:22 +0300 Subject: [PATCH 451/553] Add new article --- Articles/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Articles/README.md b/Articles/README.md index d1131592..f82595ac 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1446,7 +1446,8 @@ Articles types: | [SQL Server Checkpoint Monitoring with Extended Events] | Aaron Bertrand | 2020-02-17 | [DBA][DEV] | | ["0 to 60" : Switching to indirect checkpoints] | Aaron Bertrand | 2020-05-01 | [DBA][DEV] | | [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases] | Niko Neugebauer | 2021-02-09 | [AZ] | -| [Experiment: Does sp_recompile on a table update associated views.] | Niko Neugebauer | 2021-08-17 | [DBA][DEV] | +| [Experiment: Does sp_recompile on a table update associated views.] | Kenneth Fisher | 2021-08-17 | [DBA][DEV] | +| [On index key size, index depth, and performance] | Paul Radal | 2015-10-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2857,3 +2858,4 @@ Articles types: ["0 to 60" : Switching to indirect checkpoints]:https://sqlperformance.com/2020/05/system-configuration/0-to-60-switching-to-indirect-checkpoints [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases]:https://www.nikoport.com/2021/02/09/a-case-against-using-basic-and-standard-s0-s1-tiers-in-azure-sql-databases/ [Experiment: Does sp_recompile on a table update associated views.]:https://sqlstudies.com/2021/08/17/experiment-does-sp_recompile-on-a-table-update-associated-views/ +[On index key size, index depth, and performance]:https://www.sqlskills.com/blogs/paul/on-index-key-size-index-depth-and-performance/ From e4bc54d7f50536855e8f883ab583642061b94984 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 5 Sep 2021 12:10:16 +0300 Subject: [PATCH 452/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f82595ac..6afcfdd1 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1448,6 +1448,7 @@ Articles types: | [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases] | Niko Neugebauer | 2021-02-09 | [AZ] | | [Experiment: Does sp_recompile on a table update associated views.] | Kenneth Fisher | 2021-08-17 | [DBA][DEV] | | [On index key size, index depth, and performance] | Paul Radal | 2015-10-23 | [DBA][DEV] | +| [SQL Server Hierarchyid Data Type Overview and Examples] | Rick Dobson | 2019-06-21 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2859,3 +2860,4 @@ Articles types: [A case against using Basic and Standard (S0 & S1) tiers in Azure SQL Databases]:https://www.nikoport.com/2021/02/09/a-case-against-using-basic-and-standard-s0-s1-tiers-in-azure-sql-databases/ [Experiment: Does sp_recompile on a table update associated views.]:https://sqlstudies.com/2021/08/17/experiment-does-sp_recompile-on-a-table-update-associated-views/ [On index key size, index depth, and performance]:https://www.sqlskills.com/blogs/paul/on-index-key-size-index-depth-and-performance/ +[SQL Server Hierarchyid Data Type Overview and Examples]:https://www.mssqltips.com/sqlservertip/6048/sql-server-hierarchyid-data-type-overview-and-examples/ From 8843d078d8d021f48dc887b8e90531570460b418 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 6 Sep 2021 12:14:57 +0300 Subject: [PATCH 453/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 6afcfdd1..eb426668 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1449,6 +1449,7 @@ Articles types: | [Experiment: Does sp_recompile on a table update associated views.] | Kenneth Fisher | 2021-08-17 | [DBA][DEV] | | [On index key size, index depth, and performance] | Paul Radal | 2015-10-23 | [DBA][DEV] | | [SQL Server Hierarchyid Data Type Overview and Examples] | Rick Dobson | 2019-06-21 | [DBA][DEV] | +| [Make It Easier for the DBA: Give SQL Connections the Application’s Name!] | Ben Gribaudo | 2017-06-23 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2861,3 +2862,4 @@ Articles types: [Experiment: Does sp_recompile on a table update associated views.]:https://sqlstudies.com/2021/08/17/experiment-does-sp_recompile-on-a-table-update-associated-views/ [On index key size, index depth, and performance]:https://www.sqlskills.com/blogs/paul/on-index-key-size-index-depth-and-performance/ [SQL Server Hierarchyid Data Type Overview and Examples]:https://www.mssqltips.com/sqlservertip/6048/sql-server-hierarchyid-data-type-overview-and-examples/ +[Make It Easier for the DBA: Give SQL Connections the Application’s Name!]:https://bengribaudo.com/blog/2017/06/23/3657/give-sql-connections-the-applications-name From 109922510a127d450ee979c5f321ca51cbac4171 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 7 Sep 2021 12:19:11 +0300 Subject: [PATCH 454/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index eb426668..9f29b2c4 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1450,6 +1450,7 @@ Articles types: | [On index key size, index depth, and performance] | Paul Radal | 2015-10-23 | [DBA][DEV] | | [SQL Server Hierarchyid Data Type Overview and Examples] | Rick Dobson | 2019-06-21 | [DBA][DEV] | | [Make It Easier for the DBA: Give SQL Connections the Application’s Name!] | Ben Gribaudo | 2017-06-23 | [DBA][DEV] | +| [You Probably Shouldn’t Index Your Temp Tables.] | Brent Ozar | 2021-08-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2863,3 +2864,4 @@ Articles types: [On index key size, index depth, and performance]:https://www.sqlskills.com/blogs/paul/on-index-key-size-index-depth-and-performance/ [SQL Server Hierarchyid Data Type Overview and Examples]:https://www.mssqltips.com/sqlservertip/6048/sql-server-hierarchyid-data-type-overview-and-examples/ [Make It Easier for the DBA: Give SQL Connections the Application’s Name!]:https://bengribaudo.com/blog/2017/06/23/3657/give-sql-connections-the-applications-name +[You Probably Shouldn’t Index Your Temp Tables.]:https://www.brentozar.com/archive/2021/08/you-probably-shouldnt-index-your-temp-tables/ From 5fafbaa65f36a583ff24a6f99c0fe3e6e8f50203 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 8 Sep 2021 12:20:58 +0300 Subject: [PATCH 455/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 9f29b2c4..f3dd9672 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1451,6 +1451,7 @@ Articles types: | [SQL Server Hierarchyid Data Type Overview and Examples] | Rick Dobson | 2019-06-21 | [DBA][DEV] | | [Make It Easier for the DBA: Give SQL Connections the Application’s Name!] | Ben Gribaudo | 2017-06-23 | [DBA][DEV] | | [You Probably Shouldn’t Index Your Temp Tables.] | Brent Ozar | 2021-08-17 | [DBA][DEV] | +| [SQL Server Error Handling Gotchas] | Niels Berglund | 2016-12-31 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2865,3 +2866,4 @@ Articles types: [SQL Server Hierarchyid Data Type Overview and Examples]:https://www.mssqltips.com/sqlservertip/6048/sql-server-hierarchyid-data-type-overview-and-examples/ [Make It Easier for the DBA: Give SQL Connections the Application’s Name!]:https://bengribaudo.com/blog/2017/06/23/3657/give-sql-connections-the-applications-name [You Probably Shouldn’t Index Your Temp Tables.]:https://www.brentozar.com/archive/2021/08/you-probably-shouldnt-index-your-temp-tables/ +[SQL Server Error Handling Gotchas]:https://nielsberglund.com/2016/12/31/sql-server-error-handling-gotchas/ From b1adc1bad7ff3afa7e0266ae2aa40f655d4061ac Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 9 Sep 2021 12:26:18 +0300 Subject: [PATCH 456/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index f3dd9672..63460c56 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1452,6 +1452,7 @@ Articles types: | [Make It Easier for the DBA: Give SQL Connections the Application’s Name!] | Ben Gribaudo | 2017-06-23 | [DBA][DEV] | | [You Probably Shouldn’t Index Your Temp Tables.] | Brent Ozar | 2021-08-17 | [DBA][DEV] | | [SQL Server Error Handling Gotchas] | Niels Berglund | 2016-12-31 | [DBA][DEV] | +| [B-Trees: More Than I Thought I'd Want to Know] | Ben Congdon | 2021-08-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2867,3 +2868,4 @@ Articles types: [Make It Easier for the DBA: Give SQL Connections the Application’s Name!]:https://bengribaudo.com/blog/2017/06/23/3657/give-sql-connections-the-applications-name [You Probably Shouldn’t Index Your Temp Tables.]:https://www.brentozar.com/archive/2021/08/you-probably-shouldnt-index-your-temp-tables/ [SQL Server Error Handling Gotchas]:https://nielsberglund.com/2016/12/31/sql-server-error-handling-gotchas/ +[B-Trees: More Than I Thought I'd Want to Know]:https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/ From f30da3c8f0cbde0078b8cc55d65ac7348c13e35d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 10 Sep 2021 12:29:03 +0300 Subject: [PATCH 457/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 63460c56..03efbb62 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1453,6 +1453,7 @@ Articles types: | [You Probably Shouldn’t Index Your Temp Tables.] | Brent Ozar | 2021-08-17 | [DBA][DEV] | | [SQL Server Error Handling Gotchas] | Niels Berglund | 2016-12-31 | [DBA][DEV] | | [B-Trees: More Than I Thought I'd Want to Know] | Ben Congdon | 2021-08-17 | [DBA][DEV] | +| [Wait Stats During Hash Spills] | Eric Darling | 2021-09-21 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2869,3 +2870,4 @@ Articles types: [You Probably Shouldn’t Index Your Temp Tables.]:https://www.brentozar.com/archive/2021/08/you-probably-shouldnt-index-your-temp-tables/ [SQL Server Error Handling Gotchas]:https://nielsberglund.com/2016/12/31/sql-server-error-handling-gotchas/ [B-Trees: More Than I Thought I'd Want to Know]:https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/ +[Wait Stats During Hash Spills]:https://www.erikdarlingdata.com/sql-server/wait-stats-during-hash-spills/ From 7897144c66c18a4640ee638c2413018895f5e704 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 11 Sep 2021 12:30:38 +0300 Subject: [PATCH 458/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 03efbb62..057eae45 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1454,6 +1454,7 @@ Articles types: | [SQL Server Error Handling Gotchas] | Niels Berglund | 2016-12-31 | [DBA][DEV] | | [B-Trees: More Than I Thought I'd Want to Know] | Ben Congdon | 2021-08-17 | [DBA][DEV] | | [Wait Stats During Hash Spills] | Eric Darling | 2021-09-21 | [DBA][DEV] | +| [Shrinking The tempdb System Database Without Restarting SQL Server] | Jack Worthen | 2016-06-02 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2871,3 +2872,4 @@ Articles types: [SQL Server Error Handling Gotchas]:https://nielsberglund.com/2016/12/31/sql-server-error-handling-gotchas/ [B-Trees: More Than I Thought I'd Want to Know]:https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/ [Wait Stats During Hash Spills]:https://www.erikdarlingdata.com/sql-server/wait-stats-during-hash-spills/ +[Shrinking The tempdb System Database Without Restarting SQL Server]:https://jackworthen.com/2016/06/02/shrinking-the-tempdb-system-database-without-restarting-sql-server/ From e3d0401720d105f4ab317c74c32f4b1afc09714d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 12 Sep 2021 12:36:22 +0300 Subject: [PATCH 459/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 057eae45..1b68c341 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1455,6 +1455,7 @@ Articles types: | [B-Trees: More Than I Thought I'd Want to Know] | Ben Congdon | 2021-08-17 | [DBA][DEV] | | [Wait Stats During Hash Spills] | Eric Darling | 2021-09-21 | [DBA][DEV] | | [Shrinking The tempdb System Database Without Restarting SQL Server] | Jack Worthen | 2016-06-02 | [DBA][DEV] | +| [Graphing SQL Server wait stats on Prometheus and Grafana] | David Barbarin | 2021-09-09 | [M] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2873,3 +2874,4 @@ Articles types: [B-Trees: More Than I Thought I'd Want to Know]:https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/ [Wait Stats During Hash Spills]:https://www.erikdarlingdata.com/sql-server/wait-stats-during-hash-spills/ [Shrinking The tempdb System Database Without Restarting SQL Server]:https://jackworthen.com/2016/06/02/shrinking-the-tempdb-system-database-without-restarting-sql-server/ +[Graphing SQL Server wait stats on Prometheus and Grafana]:https://blog.developpez.com/mikedavem/p13209/devops/graphing-sql-server-wait-stats-on-prometheus-and-grafana From 14caa779c49ab61a18b38004590d1b9a89de7bbe Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 13 Sep 2021 12:37:54 +0300 Subject: [PATCH 460/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 1b68c341..e18c0bb8 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1456,6 +1456,7 @@ Articles types: | [Wait Stats During Hash Spills] | Eric Darling | 2021-09-21 | [DBA][DEV] | | [Shrinking The tempdb System Database Without Restarting SQL Server] | Jack Worthen | 2016-06-02 | [DBA][DEV] | | [Graphing SQL Server wait stats on Prometheus and Grafana] | David Barbarin | 2021-09-09 | [M] | +| [Transition from SSMS to DataGrip: 10 tips] | Maksim Sobolevskiy | 2021-08-19 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2875,3 +2876,4 @@ Articles types: [Wait Stats During Hash Spills]:https://www.erikdarlingdata.com/sql-server/wait-stats-during-hash-spills/ [Shrinking The tempdb System Database Without Restarting SQL Server]:https://jackworthen.com/2016/06/02/shrinking-the-tempdb-system-database-without-restarting-sql-server/ [Graphing SQL Server wait stats on Prometheus and Grafana]:https://blog.developpez.com/mikedavem/p13209/devops/graphing-sql-server-wait-stats-on-prometheus-and-grafana +[Transition from SSMS to DataGrip: 10 tips]:https://blog.jetbrains.com/datagrip/2021/08/19/transition-from-ssms-to-datagrip-10-tips/ From b767f050bd57776b1134b778043618fb4d820136 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 14 Sep 2021 15:24:45 +0300 Subject: [PATCH 461/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e18c0bb8..3cf34fe6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1457,6 +1457,7 @@ Articles types: | [Shrinking The tempdb System Database Without Restarting SQL Server] | Jack Worthen | 2016-06-02 | [DBA][DEV] | | [Graphing SQL Server wait stats on Prometheus and Grafana] | David Barbarin | 2021-09-09 | [M] | | [Transition from SSMS to DataGrip: 10 tips] | Maksim Sobolevskiy | 2021-08-19 | [DBA][DEV] | +| [Query Store Hints] | Erin Stellato | 2021-06-09 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2877,3 +2878,4 @@ Articles types: [Shrinking The tempdb System Database Without Restarting SQL Server]:https://jackworthen.com/2016/06/02/shrinking-the-tempdb-system-database-without-restarting-sql-server/ [Graphing SQL Server wait stats on Prometheus and Grafana]:https://blog.developpez.com/mikedavem/p13209/devops/graphing-sql-server-wait-stats-on-prometheus-and-grafana [Transition from SSMS to DataGrip: 10 tips]:https://blog.jetbrains.com/datagrip/2021/08/19/transition-from-ssms-to-datagrip-10-tips/ +[Query Store Hints]:https://www.sqlskills.com/blogs/erin/query-store-hints/ From d276d8038c6003ba1fbc42ff0b8cc79300f42ef2 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 15 Sep 2021 15:29:07 +0300 Subject: [PATCH 462/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 3cf34fe6..c51b6b7c 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1458,6 +1458,7 @@ Articles types: | [Graphing SQL Server wait stats on Prometheus and Grafana] | David Barbarin | 2021-09-09 | [M] | | [Transition from SSMS to DataGrip: 10 tips] | Maksim Sobolevskiy | 2021-08-19 | [DBA][DEV] | | [Query Store Hints] | Erin Stellato | 2021-06-09 | [DBA][DEV] | +| [Announcing SSIS Framework Manager, v1] | Andy Leonard | 2021-06-09 | [SSIS] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2879,3 +2880,4 @@ Articles types: [Graphing SQL Server wait stats on Prometheus and Grafana]:https://blog.developpez.com/mikedavem/p13209/devops/graphing-sql-server-wait-stats-on-prometheus-and-grafana [Transition from SSMS to DataGrip: 10 tips]:https://blog.jetbrains.com/datagrip/2021/08/19/transition-from-ssms-to-datagrip-10-tips/ [Query Store Hints]:https://www.sqlskills.com/blogs/erin/query-store-hints/ +[Announcing SSIS Framework Manager, v1]:https://andyleonard.blog/2021/06/announcing-ssis-framework-manager-v1/ From 4df023ace5dc7caae759ae6e0bf8538214f91d97 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 16 Sep 2021 15:35:32 +0300 Subject: [PATCH 463/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index c51b6b7c..4f390b16 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1459,6 +1459,8 @@ Articles types: | [Transition from SSMS to DataGrip: 10 tips] | Maksim Sobolevskiy | 2021-08-19 | [DBA][DEV] | | [Query Store Hints] | Erin Stellato | 2021-06-09 | [DBA][DEV] | | [Announcing SSIS Framework Manager, v1] | Andy Leonard | 2021-06-09 | [SSIS] | +| [Improving The Performance of RBAR Modifications] | Erik Darling | 2021-02-15 | [DBA][DEV] | +| [Minimal Logging with INSERT…SELECT into Empty Clustered Tables] | Paul White | 2019-05-16 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2881,3 +2883,5 @@ Articles types: [Transition from SSMS to DataGrip: 10 tips]:https://blog.jetbrains.com/datagrip/2021/08/19/transition-from-ssms-to-datagrip-10-tips/ [Query Store Hints]:https://www.sqlskills.com/blogs/erin/query-store-hints/ [Announcing SSIS Framework Manager, v1]:https://andyleonard.blog/2021/06/announcing-ssis-framework-manager-v1/ +[Improving The Performance of RBAR Modifications]:https://www.erikdarlingdata.com/sql-server/improving-the-performance-of-rbar-modifications/ +[Minimal Logging with INSERT…SELECT into Empty Clustered Tables]:https://sqlperformance.com/2019/05/sql-performance/minimal-logging-empty-clustered From 41b4682e3ff79bf1f8926384bc4012745b9b9a46 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 17 Sep 2021 15:38:40 +0300 Subject: [PATCH 464/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 4f390b16..a08b3c2f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1461,6 +1461,7 @@ Articles types: | [Announcing SSIS Framework Manager, v1] | Andy Leonard | 2021-06-09 | [SSIS] | | [Improving The Performance of RBAR Modifications] | Erik Darling | 2021-02-15 | [DBA][DEV] | | [Minimal Logging with INSERT…SELECT into Empty Clustered Tables] | Paul White | 2019-05-16 | [DBA][DEV] | +| [What Is a Cost-Based Optimizer?] | Brent Ozar | 2021-09-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2885,3 +2886,4 @@ Articles types: [Announcing SSIS Framework Manager, v1]:https://andyleonard.blog/2021/06/announcing-ssis-framework-manager-v1/ [Improving The Performance of RBAR Modifications]:https://www.erikdarlingdata.com/sql-server/improving-the-performance-of-rbar-modifications/ [Minimal Logging with INSERT…SELECT into Empty Clustered Tables]:https://sqlperformance.com/2019/05/sql-performance/minimal-logging-empty-clustered +[What Is a Cost-Based Optimizer?]:https://www.brentozar.com/archive/2021/09/what-is-a-cost-based-optimizer/ From ab0d412e9ae3ffd9db3f8a8dea26389b7c315517 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 18 Sep 2021 15:42:08 +0300 Subject: [PATCH 465/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index a08b3c2f..e4d043d6 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1462,6 +1462,7 @@ Articles types: | [Improving The Performance of RBAR Modifications] | Erik Darling | 2021-02-15 | [DBA][DEV] | | [Minimal Logging with INSERT…SELECT into Empty Clustered Tables] | Paul White | 2019-05-16 | [DBA][DEV] | | [What Is a Cost-Based Optimizer?] | Brent Ozar | 2021-09-17 | [DBA][DEV] | +| [Unusual Parameter Sniffing: Big Problems with Small Data] | Brent Ozar | 2021-02-03 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2887,3 +2888,4 @@ Articles types: [Improving The Performance of RBAR Modifications]:https://www.erikdarlingdata.com/sql-server/improving-the-performance-of-rbar-modifications/ [Minimal Logging with INSERT…SELECT into Empty Clustered Tables]:https://sqlperformance.com/2019/05/sql-performance/minimal-logging-empty-clustered [What Is a Cost-Based Optimizer?]:https://www.brentozar.com/archive/2021/09/what-is-a-cost-based-optimizer/ +[Unusual Parameter Sniffing: Big Problems with Small Data]:https://www.brentozar.com/archive/2021/02/unusual-parameter-sniffing-big-problems-with-small-data/ From c8820de3b5e2749afe0b6b588ffa888b7db726fa Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 19 Sep 2021 15:44:23 +0300 Subject: [PATCH 466/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index e4d043d6..6226ecee 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1463,6 +1463,7 @@ Articles types: | [Minimal Logging with INSERT…SELECT into Empty Clustered Tables] | Paul White | 2019-05-16 | [DBA][DEV] | | [What Is a Cost-Based Optimizer?] | Brent Ozar | 2021-09-17 | [DBA][DEV] | | [Unusual Parameter Sniffing: Big Problems with Small Data] | Brent Ozar | 2021-02-03 | [DBA][DEV] | +| [Rowcount estimates when there are no Statistics] | Matthew Mcgiffen | 2021-01-26 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2889,3 +2890,4 @@ Articles types: [Minimal Logging with INSERT…SELECT into Empty Clustered Tables]:https://sqlperformance.com/2019/05/sql-performance/minimal-logging-empty-clustered [What Is a Cost-Based Optimizer?]:https://www.brentozar.com/archive/2021/09/what-is-a-cost-based-optimizer/ [Unusual Parameter Sniffing: Big Problems with Small Data]:https://www.brentozar.com/archive/2021/02/unusual-parameter-sniffing-big-problems-with-small-data/ +[Rowcount estimates when there are no Statistics]:https://matthewmcgiffen.com/2021/01/26/rowcount-estimates-when-there-are-no-statistics/ From 9b065b39cef9175092a17d2b3c47465d615998d6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 20 Sep 2021 00:48:36 +0300 Subject: [PATCH 467/553] Add Blitz Excel UI link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8cc42a3a..d530a7ec 100644 --- a/README.md +++ b/README.md @@ -460,6 +460,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Get Your ColumnScore](https://columnscore.com) (by ColumnScore) - [SQL Assessment API rules in .csv format](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/DefaultRuleset.csv) (by Microsoft) - [SQL cheat sheet for PostgreSQL and Oracle](https://www.pcwdld.com/sql-cheat-sheet) (by Marc Wilson) + - [Bllitz Excel UI](https://1pro.bi/blitz-excel-ui/) (by Alex) **[⬆ back to top](#table-of-contents)** From 7d8fac06a0922ef131e8acc906da31f9fa7e0a3f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 20 Sep 2021 15:48:03 +0300 Subject: [PATCH 468/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 6226ecee..d908c14d 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1464,6 +1464,8 @@ Articles types: | [What Is a Cost-Based Optimizer?] | Brent Ozar | 2021-09-17 | [DBA][DEV] | | [Unusual Parameter Sniffing: Big Problems with Small Data] | Brent Ozar | 2021-02-03 | [DBA][DEV] | | [Rowcount estimates when there are no Statistics] | Matthew Mcgiffen | 2021-01-26 | [DBA][DEV] | +| [Processing Data Queues in SQL Server with READPAST and UPDLOCK] | Armando Prato | 2007-06-04 | [DBA][DEV] | +| [Can You Get Parameter Sniffing on Updates and Deletes?] | Brent Ozar | 2021-01-27 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2891,3 +2893,5 @@ Articles types: [What Is a Cost-Based Optimizer?]:https://www.brentozar.com/archive/2021/09/what-is-a-cost-based-optimizer/ [Unusual Parameter Sniffing: Big Problems with Small Data]:https://www.brentozar.com/archive/2021/02/unusual-parameter-sniffing-big-problems-with-small-data/ [Rowcount estimates when there are no Statistics]:https://matthewmcgiffen.com/2021/01/26/rowcount-estimates-when-there-are-no-statistics/ +[Processing Data Queues in SQL Server with READPAST and UPDLOCK]:https://www.mssqltips.com/sqlservertip/1257/processing-data-queues-in-sql-server-with-readpast-and-updlock/ +[Can You Get Parameter Sniffing on Updates and Deletes?]:https://www.brentozar.com/archive/2021/01/can-you-get-parameter-sniffing-on-updates-and-deletes/ From e9c80699944c67122b0a704c6131909e43b29ba1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 21 Sep 2021 15:49:58 +0300 Subject: [PATCH 469/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index d908c14d..57b3af26 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1466,6 +1466,7 @@ Articles types: | [Rowcount estimates when there are no Statistics] | Matthew Mcgiffen | 2021-01-26 | [DBA][DEV] | | [Processing Data Queues in SQL Server with READPAST and UPDLOCK] | Armando Prato | 2007-06-04 | [DBA][DEV] | | [Can You Get Parameter Sniffing on Updates and Deletes?] | Brent Ozar | 2021-01-27 | [DBA][DEV] | +| [An Empirical Look at Key Lookups] | Forrest mc Daniel | 2020-12-30 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2895,3 +2896,4 @@ Articles types: [Rowcount estimates when there are no Statistics]:https://matthewmcgiffen.com/2021/01/26/rowcount-estimates-when-there-are-no-statistics/ [Processing Data Queues in SQL Server with READPAST and UPDLOCK]:https://www.mssqltips.com/sqlservertip/1257/processing-data-queues-in-sql-server-with-readpast-and-updlock/ [Can You Get Parameter Sniffing on Updates and Deletes?]:https://www.brentozar.com/archive/2021/01/can-you-get-parameter-sniffing-on-updates-and-deletes/ +[An Empirical Look at Key Lookups]:https://forrestmcdaniel.com/2020/12/30/an-empirical-look-at-key-lookups/ From 7596cc8155ed5d55601929e9c68195451ed8b5e1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 22 Sep 2021 15:51:29 +0300 Subject: [PATCH 470/553] Add new article --- Articles/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 57b3af26..de344e4f 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1467,6 +1467,7 @@ Articles types: | [Processing Data Queues in SQL Server with READPAST and UPDLOCK] | Armando Prato | 2007-06-04 | [DBA][DEV] | | [Can You Get Parameter Sniffing on Updates and Deletes?] | Brent Ozar | 2021-01-27 | [DBA][DEV] | | [An Empirical Look at Key Lookups] | Forrest mc Daniel | 2020-12-30 | [DBA][DEV] | +| [Please stop using this UPSERT anti-pattern] | Aaron Bertrand | 2020-09-02 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2897,3 +2898,4 @@ Articles types: [Processing Data Queues in SQL Server with READPAST and UPDLOCK]:https://www.mssqltips.com/sqlservertip/1257/processing-data-queues-in-sql-server-with-readpast-and-updlock/ [Can You Get Parameter Sniffing on Updates and Deletes?]:https://www.brentozar.com/archive/2021/01/can-you-get-parameter-sniffing-on-updates-and-deletes/ [An Empirical Look at Key Lookups]:https://forrestmcdaniel.com/2020/12/30/an-empirical-look-at-key-lookups/ +[Please stop using this UPSERT anti-pattern]:https://sqlperformance.com/2020/09/locking/upsert-anti-pattern From 9a8465f8514f07f8c234a06f220bd6595c03ce28 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 23 Sep 2021 12:50:08 +0300 Subject: [PATCH 471/553] Add new awesome conferences --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d530a7ec..d66dcc65 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Microsoft SQL Server on Q&A](https://docs.microsoft.com/en-us/answers/products/sql-server) - SQL Server Conferences - [SQL Saturdays](https://sqlsaturday.com/) - - [Pass Sumit - Red Gate](https://www.red-gate.com/hub/entrypage/redgate-pass) + - [Pass Sumit - Red Gate](https://passdatacommunitysummit.com) - [SQLBits](https://sqlbits.com/) - [Microsoft Ignite](https://myignite.microsoft.com/home) - [Microsoft Build](https://mybuild.microsoft.com/home) @@ -304,6 +304,17 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [EigthKB Sql Server Internals Conference](https://eightkb.online/) - [DataWeekender](https://www.dataweekender.com/schedule) - [Dativerse](https://sessionize.com/dativerse) + - [Future Data Driven](https://datadrivencommunity.com/) + - [DataMinds Connect](https://datamindsconnect.be/) + - [New Stars of Data ](https://www.newstarsofdata.com/) + - [Data Weekender](https://www.dataweekender.com/) + - [Data Toboggan](http://www.datatoboggan.co.uk/) + - [The SQL Server & Azure SQL Conference](https://www.mssqlconf.com/#!/) + - [Microsoft Build](https://mybuild.microsoft.com/home) + - [Microsoft Ignite](https://myignite.microsoft.com/home) + - [Microsoft Inspire](https://myinspire.microsoft.com/home) + - [DataMinutes](https://datagrillen.com/dataminutes/) + - [Data & AI Summit](https://databricks.com/dataaisummit) - Open Source Projects - [SQLFluff - A SQL linter and auto-formatter for Humans](https://github.com/sqlfluff/sqlfluff) - [sp_whoisactive](http://whoisactive.com/) (documentation) and github repo for it [sp_WhoIsActive](https://github.com/amachanic/sp_whoisactive) (by Adam Machanic) From 6e025180e03893edd61280cdbb38f43e06ad388f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 23 Sep 2021 15:56:13 +0300 Subject: [PATCH 472/553] Add new articles --- Articles/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index de344e4f..17c39d13 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1468,6 +1468,9 @@ Articles types: | [Can You Get Parameter Sniffing on Updates and Deletes?] | Brent Ozar | 2021-01-27 | [DBA][DEV] | | [An Empirical Look at Key Lookups] | Forrest mc Daniel | 2020-12-30 | [DBA][DEV] | | [Please stop using this UPSERT anti-pattern] | Aaron Bertrand | 2020-09-02 | [DBA][DEV] | +| [The Curious Case of… the failing differential restore] | Paul Randal | 2021-01-18 | [DBA] | +| [Starting SQL: Compensating For Lock Waits] | Erik Darling | 2020-01-31 | [DBA][DEV] | +| [Finding & Downloading Required SQL Server Updates] | Andy Levy | 2020-07-21 | [DBA] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2899,3 +2902,6 @@ Articles types: [Can You Get Parameter Sniffing on Updates and Deletes?]:https://www.brentozar.com/archive/2021/01/can-you-get-parameter-sniffing-on-updates-and-deletes/ [An Empirical Look at Key Lookups]:https://forrestmcdaniel.com/2020/12/30/an-empirical-look-at-key-lookups/ [Please stop using this UPSERT anti-pattern]:https://sqlperformance.com/2020/09/locking/upsert-anti-pattern +[The Curious Case of… the failing differential restore]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-failing-differential-restore/ +[Starting SQL: Compensating For Lock Waits]:https://www.erikdarlingdata.com/starting-sql/starting-sql-compensating-for-lock-waits/ +[Finding & Downloading Required SQL Server Updates]:https://www.flxsql.com/downloading-latest-sql-server-updates/ From d82faa743ba3c2e8b7f1fc8636b4850ee0f47683 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 24 Sep 2021 16:02:15 +0300 Subject: [PATCH 473/553] Add new articles --- Articles/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Articles/README.md b/Articles/README.md index 17c39d13..06ebabd0 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1471,6 +1471,8 @@ Articles types: | [The Curious Case of… the failing differential restore] | Paul Randal | 2021-01-18 | [DBA] | | [Starting SQL: Compensating For Lock Waits] | Erik Darling | 2020-01-31 | [DBA][DEV] | | [Finding & Downloading Required SQL Server Updates] | Andy Levy | 2020-07-21 | [DBA] | +| [Quick SQL Server CPU Comparison Tests] | Joe Obbish | 2021-09-22 | [DBA][DEV] | +| [Using fn_dblog, fn_dump_dblog, and restoring with STOPBEFOREMARK to an LSN] | Paul Randal | 2012-05-17 | [DBA][DEV] | [Understanding how SQL Server executes a query]:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ [SQL Server Index Design Guide]:https://technet.microsoft.com/en-us/library/jj835095.aspx @@ -2905,3 +2907,5 @@ Articles types: [The Curious Case of… the failing differential restore]:https://www.sqlskills.com/blogs/paul/the-curious-case-of-the-failing-differential-restore/ [Starting SQL: Compensating For Lock Waits]:https://www.erikdarlingdata.com/starting-sql/starting-sql-compensating-for-lock-waits/ [Finding & Downloading Required SQL Server Updates]:https://www.flxsql.com/downloading-latest-sql-server-updates/ +[Quick SQL Server CPU Comparison Tests]:https://www.erikdarlingdata.com/sql-server/quick-sql-server-cpu-comparison-tests/ +[Using fn_dblog, fn_dump_dblog, and restoring with STOPBEFOREMARK to an LSN]:https://www.sqlskills.com/blogs/paul/using-fn_dblog-fn_dump_dblog-and-restoring-with-stopbeforemark-to-an-lsn/ From bf5ab00feaea5c5472f08e0c002f5ca8159d8d1b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 25 Sep 2021 16:06:05 +0300 Subject: [PATCH 474/553] Add Except and Exists update pattern --- SQL Server Name Convention and T-SQL Programming Style.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 40ba1204..16d4999b 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -475,6 +475,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. ``` sqlcmd -S MSSQLSERVER$EXPRESS -Q "dbcc checkdb ('master') with DATA_PURITY, NO_INFOMSGS;" -U maintenanceUser -P ""weirdPassword ``` + - Only update rows that changed? Try using `EXISTS` and `EXCEPT` for perfomance reasons and code readanlity.More details [here](https://chadbaldwin.net/2020/12/30/only-update-rows-that-changed). - Use `EXISTS` or `NOT EXISTS` if referencing a subquery, and `IN` or `NOT IN` when have a list of literal values. More details [here](https://www.brentozar.com/archive/2018/08/a-common-query-error/). - For concatenate unicode strings: From 4feb7a2c675c6614c06699896ea76b429b871793 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 26 Sep 2021 16:19:57 +0300 Subject: [PATCH 475/553] Add LinkedServerMonitor XE --- Extended_Events/LinkedServerMonitor.sql | 135 ++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 Extended_Events/LinkedServerMonitor.sql diff --git a/Extended_Events/LinkedServerMonitor.sql b/Extended_Events/LinkedServerMonitor.sql new file mode 100644 index 00000000..2096622b --- /dev/null +++ b/Extended_Events/LinkedServerMonitor.sql @@ -0,0 +1,135 @@ +/* +https://jasonbrimhall.info/2021/01/02/powerful-monitoring-for-your-linked-servers-with-xevents/ +by Jason Brimhall 2021-01-02 +*/ + +/* Create the Event Session */ +IF EXISTS +( + SELECT * + FROM sys.server_event_sessions + WHERE name = 'LinkedServerMonitor' +) + DROP EVENT SESSION LinkedServerMonitor ON SERVER; +GO + + +CREATE EVENT SESSION [LinkedServerMonitor] +ON SERVER + ADD EVENT sqlserver.oledb_data_read + (ACTION + ( + package0.callstack + , sqlserver.client_app_name + , sqlserver.database_name + , sqlserver.nt_username + , sqlserver.query_hash + , sqlserver.query_plan_hash + , sqlserver.session_id + , sqlserver.sql_text + , sqlserver.client_hostname + , sqlserver.tsql_stack + , package0.event_sequence + , sqlserver.context_info + , sqlserver.client_connection_id + , sqlserver.username + , sqlserver.database_id + ) + ) + , ADD EVENT sqlserver.oledb_query_interface + (ACTION + ( + package0.callstack + , sqlserver.client_app_name + , sqlserver.database_name + , sqlserver.nt_username + , sqlserver.query_hash + , sqlserver.query_plan_hash + , sqlserver.session_id + , sqlserver.sql_text + , sqlserver.client_hostname + , sqlserver.tsql_stack + , package0.event_sequence + , sqlserver.context_info + , sqlserver.client_connection_id + , sqlserver.username + , sqlserver.database_id + ) + ) + , ADD EVENT sqlserver.oledb_error + (ACTION + ( + package0.callstack + , sqlserver.client_app_name + , sqlserver.database_name + , sqlserver.nt_username + , sqlserver.query_hash + , sqlserver.query_plan_hash + , sqlserver.session_id + , sqlserver.sql_text + , sqlserver.client_hostname + , sqlserver.tsql_stack + , package0.event_sequence + , sqlserver.context_info + , sqlserver.client_connection_id + , sqlserver.username + , sqlserver.database_id + ) + ) + , ADD EVENT sqlserver.oledb_provider_information + (ACTION + ( + package0.callstack + , sqlserver.client_app_name + , sqlserver.database_name + , sqlserver.nt_username + , sqlserver.query_hash + , sqlserver.query_plan_hash + , sqlserver.session_id + , sqlserver.sql_text + , sqlserver.client_hostname + , sqlserver.tsql_stack + , package0.event_sequence + , sqlserver.context_info + , sqlserver.client_connection_id + , sqlserver.username + , sqlserver.database_id + ) + ) + , ADD EVENT sqlserver.oledb_provider_initialized + (ACTION + ( + package0.callstack + , sqlserver.client_app_name + , sqlserver.database_name + , sqlserver.nt_username + , sqlserver.query_hash + , sqlserver.query_plan_hash + , sqlserver.session_id + , sqlserver.sql_text + , sqlserver.client_hostname + , sqlserver.tsql_stack + , package0.event_sequence + , sqlserver.context_info + , sqlserver.client_connection_id + , sqlserver.username + , sqlserver.database_id + ) + ) + ADD TARGET package0.event_file + (SET filename = N'C:\XE\LinkedServerMonitor', max_file_size = (256), max_rollover_files = (2)) + , ADD TARGET package0.histogram + (SET filtering_event_name = N'sqlserver.oledb_data_read' + , slots = (10000) --modify depending on your needs + , source = N'sqlserver.tsql_stack') +WITH +( + MAX_DISPATCH_LATENCY = 5 SECONDS + , TRACK_CAUSALITY = ON + , STARTUP_STATE = ON +); +GO + + +ALTER EVENT SESSION LinkedServerMonitor ON SERVER STATE = START; +GO From 38dcd0c4d9f832cc4f5e48006b9b6718300ec61b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 27 Sep 2021 13:52:03 +0300 Subject: [PATCH 476/553] Fix missing link --- Errors/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Errors/README.md b/Errors/README.md index 4e216020..d8915ea3 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -300,7 +300,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [48]:https://blog.waynesheffield.com/wayne/archive/2020/08/availability-group-issues-fixed-with-alerts/ [49]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [50]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb -[51]: +[51]:https://www.mssqltips.com/sqlservertip/6230/memoryoptimized-tempdb-metadata-in-sql-server-2019/ [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ From 837b48a43344111cf2160a64e8a28412222966e8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 28 Sep 2021 14:05:25 +0300 Subject: [PATCH 477/553] Add SQL Server 2017 CU26 --- SQL Server Version.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index 0ce07450..fcb7fe7b 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -130,7 +130,7 @@ Profits: | Version | Latest Update | Build Number | Release Date | Lifecycle Start | Mainstream Support | Extended Support | Other Updates | |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU12 KB5004524] | 15.0.2070.41
15.0.4153.1 | 2019-11-04
2021-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | -| 2017 | [Install 2017 RTM] then [CU25 KB5003830] | 14.0.1000.169
14.0.3401.7 | 2017-10-02
2021-07-12 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | +| 2017 | [Install 2017 RTM] then [CU26 KB5005226] | 14.0.1000.169
14.0.3411.3 | 2017-10-02
2021-09-14 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | | 2016 | [Install 2016 SP2] then [CU17 KB5001092] | 13.0.5026.0
13.0.5888.11 | 2018-04-24
2021-03-29 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | | 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | @@ -143,7 +143,7 @@ Profits: | 2008 | [Install 2008] then
[SP4 2008] then
[SU KB3045316] | 10.0.1600.0
10.0.6000
10.0.6241.0 | 2008-01-19
2014-09-30
2015-07-14 | 2010-07-20 | 2014-07-08 | 2019-07-09 | [Other SQL 2008 Updates](#microsoft-sql-server-2008-builds) | [Install 2019 RTM]:https://www.microsoft.com/sql-server/sql-server-2019#Install -[CU12 KB5004524]:https://support.microsoft.com/help/5004524 +[CU12 KB5005226]:https://support.microsoft.com/help/5005226 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU25 KB5003830]:https://support.microsoft.com/help/50038307 [Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 @@ -184,7 +184,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2019 RTM] | SQLServer2019-x64-ENU.iso | 2019-11-04 | 15.0.2000.5 | 1360 | d41eb957a037add32441e2302a734268bda94709 | | [SQL Server 2019 CU12] | SQLServer2019-KB5004524-x64.exe | 2021-08-04 | 15.0.4153.1 | 669 | f145a82e48219e5bf80c7dcf57ea3c902c4d395f | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | -| [SQL Server 2017 CU25] | SQLServer2017-KB5003830-x64.exe | 2021-07-12 | 14.0.3401.7 | 533 | bcd8cf2bfa6d57fca1a6a916a3f54d11687aa97f | +| [SQL Server 2017 CU26] | SQLServer2017-KB5005226-x64.exe | 2021-09-14 | 14.0.3411.3 | 533 | e31b28ba9c4c0b63ddbb356f630e8ea631da97fe | | [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | | [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | f9a30a72026251ddb3ba4bc840135066b528a494 | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | @@ -204,7 +204,7 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2019 RTM]:https://go.microsoft.com/fwlink/?linkid=866664 [SQL Server 2019 CU12]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB5004524-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 -[SQL Server 2017 CU25]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB5003830-x64.exe +[SQL Server 2017 CU26]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB5005226-x64.exe [SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso [SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 [SQL Server 2016 SP2 CU17]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB5001092-x64.exe @@ -479,15 +479,16 @@ All SQL Server 2017 CU downloads: [Catalog Update Microsoft SQL Server 2017](htt Here is the latest output from `SELECT @@VERSION` for SQL Server 2017 Developer Edition: ``` -Microsoft SQL Server 2017 (RTM-CU25) (KB5003830) - 14.0.3401.7 (X64) - Jun 26 2021 00:48:45 +Microsoft SQL Server 2017 (RTM-CU26) (KB5005226) - 14.0.3411.3 (X64) + Aug 28 2021 21:00:00 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on … ``` | Build | File version | Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|--------|------|-----------------------------------|---------|-------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| -| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | **Latest CU** | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | 2021-06-26 | 19 | 18 | 533 | +| 14.0.3411.3 | 2017.140.3411.3 | RTM | CU | **Latest CU** | 5005226 | [Microsoft SQL Server 2017 CU26] | 2021-07-12 | 2021-09-14 | 31 | 22 | 533 | +| 14.0.3401.7 | 2017.140.3401.7 | RTM | CU | | 5003830 | [Microsoft SQL Server 2017 CU25] | 2021-07-12 | 2021-06-26 | 19 | 18 | 533 | | 14.0.3391.2 | 2017.140.3391.2 | RTM | CU | | 5001228 | [Microsoft SQL Server 2017 CU24] | 2021-05-10 | ? | 30 | 24 | 533 | | 14.0.3381.3 | 2017.140.3381.3 | RTM | CU | | 5000685 | [Microsoft SQL Server 2017 CU23] | 2021-02-24 | ? | 58 | 47 | 533 | | 14.0.3370.1 | 2017.140.3370.1 | RTM | GDR | CVE-2021-1636 | 4583457 | [Description of the security update for SQL Server 2017 CU22: January 12, 2021] | 2021-01-12 | ? | 1 | 1 | 533 | @@ -534,6 +535,8 @@ Microsoft SQL Server 2017 (RTM-CU25) (KB5003830) - 14.0.3401.7 (X64) | 14.0.100.187 | 2016.140.100.187 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1.1 (CTP1.1) | 2016-12-16 | 2016-12-11 | | | 1975 | | 14.0.1.246 | 2016.140.1.246 | CTP | CTP | | | Microsoft SQL Server vNext Community Technology Preview 1 (CTP1) | 2016-11-16 | 2016-11-02 | | | 1983 | +[Microsoft SQL Server 2017 CU26]:https://support.microsoft.com/help/5005226 +[Microsoft SQL Server 2017 CU25]:https://support.microsoft.com/help/5003830 [Microsoft SQL Server 2017 CU24]:https://support.microsoft.com/help/5001228 [Microsoft SQL Server 2017 CU23]:https://support.microsoft.com/help/5000685 [Description of the security update for SQL Server 2017 CU22: January 12, 2021]:https://support.microsoft.com/help/4583457 From ad32899b38f025ed71462fcc5d5e7fbfc3c6e5a9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 29 Sep 2021 14:32:23 +0300 Subject: [PATCH 478/553] Add Microsoft SQL Server 2016 Service Pack 3 (SP3) --- SQL Server Version.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/SQL Server Version.md b/SQL Server Version.md index fcb7fe7b..2aae3268 100644 --- a/SQL Server Version.md +++ b/SQL Server Version.md @@ -131,8 +131,8 @@ Profits: |---------|-----------------------------------------------------------------------|----------------------------------------------|------------------------------------------|-----------------|--------------------|------------------|-------------------------------------------------------------------| | 2019 | [Install 2019 RTM] then [CU12 KB5004524] | 15.0.2070.41
15.0.4153.1 | 2019-11-04
2021-08-04 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU26 KB5005226] | 14.0.1000.169
14.0.3411.3 | 2017-10-02
2021-09-14 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | -| 2016 | [Install 2016 SP2] then [CU17 KB5001092] | 13.0.5026.0
13.0.5888.11 | 2018-04-24
2021-03-29 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | -| 2014 | [Install 2014 SP3] then
[KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | +| 2016 | [Install 2016 SP2] then [SP3 2016] | 13.0.5026.0
13.0.5026.0 | 2018-04-24
2021-09-15 | 2016-01-06 | 2021-07-13 | 2026-07-14 | [Other SQL 2016 Updates](#microsoft-sql-server-2016-builds) | +| 2014 | [Install 2014 SP3] then [KB4583462] | 12.0.6024.0
12.0.6433.1 | 2018-10-30
2021-01-12 | 2016-07-14 | 2019-07-09 | 2024-07-09 | [Other SQL 2014 Updates](#microsoft-sql-server-2014-builds) | | 2012 | [Install 2012] then
[SP4 2012] then
[KB4583465] | 11.0.2100.60
11.0.7001.0
11.0.7507.2 | 2012-02-14
2017-10-05
2021-01-12 | 2015-12-01 | 2017-07-11 | 2022-07-12 | [Other SQL 2012 Updates](#microsoft-sql-server-2012-builds) | | 2019 | [Install 2019 RTM] then [CU7 KB4570012] | 15.0.2070.41
15.0.4063.15 | 2019-11-04
2020-09-02 | 2019-11-04 | 2025-01-07 | 2030-01-08 | [Other SQL 2019 Updates](#microsoft-sql-server-2019-builds) | | 2017 | [Install 2017 RTM] then [CU21 KB4557397] | 14.0.1000.169
14.0.3335.7 | 2017-10-02
2020-07-01 | 2017-09-29 | 2022-11-10 | 2027-12-10 | [Other SQL 2017 Updates](#microsoft-sql-server-2017-builds) | @@ -146,8 +146,7 @@ Profits: [CU12 KB5005226]:https://support.microsoft.com/help/5005226 [Install 2017 RTM]:https://www.microsoft.com/en-us/sql-server/sql-server-2017 [CU25 KB5003830]:https://support.microsoft.com/help/50038307 -[Install 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 -[CU17 KB5001092]:https://support.microsoft.com/help/5001092 +[Install 2016 SP3]:https://www.microsoft.com/en-us/download/details.aspx?id=103440 [Install 2014 SP3]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2014-sp3 [KB4583462]:https://support.microsoft.com/help/4583462 [Install 2012]:https://www.microsoft.com/evalcenter/evaluate-sql-server-2012 @@ -185,8 +184,8 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ | [SQL Server 2019 CU12] | SQLServer2019-KB5004524-x64.exe | 2021-08-04 | 15.0.4153.1 | 669 | f145a82e48219e5bf80c7dcf57ea3c902c4d395f | | [SQL Server 2017 RTM] | SQLServer2017-x64-ENU-Dev.iso | 2017-10-02 | 14.0.1000.169 | 1476 | 0280ff6c1447d287a6bd3b86b81e459fe252d17a | | [SQL Server 2017 CU26] | SQLServer2017-KB5005226-x64.exe | 2021-09-14 | 14.0.3411.3 | 533 | e31b28ba9c4c0b63ddbb356f630e8ea631da97fe | -| [SQL Server 2016 SP2] | SQLServer2016SP1-KB3182545-x64-ENU.exe | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | -| [SQL Server 2016 SP2 CU17] | SQLServer2016-KB5001092-x64.exe | 2021-03-29 | 13.0.5888.11 | 752 | f9a30a72026251ddb3ba4bc840135066b528a494 | +| [SQL Server 2016 SP2] | SQLServer2016SP2-FullSlipstream-x64-ENU.iso | 2018-04-24 | 13.0.5026.0 | 2832 | 6309d729a0f063d11c0bb7f840f1069483406755 | +| [SQL Server 2016 SP3] | SQLServer2016SP3-KB5003279-x64-ENU.exe | 2021-09-15 | 13.0.6300.2 | 821 | 1a97cb64a8807bde83443b911fd84616432612f3 | | [SQL Server 2014 SP3] | SQLServer2014SP3-FullSlipstream-x64-ENU.iso | 2018-10-30 | 12.0.6024.0 | 3190 | 6041e06548c46862c9f3536e28113f598bb6ae00 | | [SQL Server 2014 SP3 KB4583462] | SQLServer2014-KB4583462-x64.exe | 2021-01-12 | 12.0.6433.1 | 596 | 0dc4f56583828865365340dcb95436f1a41754b9 | | [SQL Server 2012 RTM] | SQLFULL_ENU.iso | 2012-02-14 | 11.0.2100.60 | 4300 | be00942cc56d033e2c9dce8a17a6f2654f5184a3 | @@ -205,8 +204,8 @@ Alternative download link for all English x64 distributives: https://rebrand.ly/ [SQL Server 2019 CU12]:https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB5004524-x64.exe [SQL Server 2017 RTM]:https://go.microsoft.com/fwlink/?linkid=853016 [SQL Server 2017 CU26]:https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB5005226-x64.exe -[SQL Server 2016]:http://care.dlservice.microsoft.com/dl/download/F/E/9/FE9397FA-BFAB-4ADD-8B97-91234BC774B2/SQLServer2016-x64-ENU.iso -[SQL Server 2016 SP2]:https://go.microsoft.com/fwlink/?LinkID=799011 +[SQL Server 2016 SP2]:https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016 +[SQL Server 2016 SP3]:https://download.microsoft.com/download/a/7/7/a77b5753-8fe7-4804-bfc5-591d9a626c98/SQLServer2016SP3-KB5003279-x64-ENU.exe [SQL Server 2016 SP2 CU17]:https://download.microsoft.com/download/6/0/6/606B3A2E-0EAE-4DCD-930D-178686370921/SQLServer2016-KB5001092-x64.exe [SQL Server 2014 SP3]:https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2014-sp3 [SQL Server 2014 SP3 KB4583462]:https://www.microsoft.com/en-us/download/details.aspx?id=102623 @@ -590,6 +589,7 @@ Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) | Build | File version |Branch | Type | Info | KB | Description/Link | Release Date | Build Date | Fixes | Public | Size, Mb | |---------------|-------------------|-------|------|-----------------------------------|---------|------------------------------------------------------------------------------------------------------------------------|--------------|------------|------:|-------:|---------:| +| 13.0.6300.2 | 2015.131.5300.2 | SP3 | SP | **Latest SP** | 5003279 | [Microsoft SQL Server 2016 Service Pack 3 (SP3)] | 2021-09-15 | 2021-08-07 | 43 | 43 | 821 | | 13.0.5888.11 | 2015.131.5888.11 | SP2 | CU | **Latest CU SP2** | 5001092 | [Cumulative Update 17 for SQL Server 2016 SP2] | 2021-03-29 | 2021-03-20 | 20 | 17 | 753 | | 13.0.5882.1 | 2015.131.5882.1 | SP2 | CU | | 5000645 | [Cumulative Update 16 for SQL Server 2016 SP2] | 2021-02-11 | ? | 22 | 21 | 753 | | 13.0.5865.1 | 2015.131.5865.1 | SP2 | CU | CVE-2021-1636 | 4583461 | [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021] | 2021-01-12 | 2020-10-31 | 1 | 1 | 753 | @@ -684,6 +684,7 @@ Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) | 13.0.300.44 | 2015.130.300.444 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2.1 (CTP2.1) | 2015-06-14 | 2015-06-12 | | | | | 13.0.200.172 | 2015.130.200.172 | CTP | CTP | | | Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2) | 2015-05-26 | 2015-05-21 | | | | +[Microsoft SQL Server 2016 Service Pack 3 (SP3)]:https://support.microsoft.com/help/5003279 [Cumulative Update 17 for SQL Server 2016 SP2]:https://support.microsoft.com/help/5001092 [Cumulative Update 16 for SQL Server 2016 SP2]:https://support.microsoft.com/help/5000645 [Description of the security update for SQL Server 2016 SP2 CU15: January 12, 2021]:https://support.microsoft.com/4583461 From ecc306fcd4fa73e01eccfbafe5ae61242fb11f6c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 30 Sep 2021 12:37:49 +0300 Subject: [PATCH 479/553] Add sp example anchor --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 40ba1204..9f1e7ed3 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -597,7 +597,7 @@ Recommendations from Microsoft: [Stored procedure Best practice][11] **[⬆ back to top](#table-of-contents)** -Stored Procedure Example: +
Stored Procedure Example: ```tsql IF OBJECT_ID('dbo.usp_StoredProcedure', 'P') IS NULL From 25f2e4498126f0f70792a899f8631ae870088908 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 30 Sep 2021 14:41:37 +0300 Subject: [PATCH 480/553] Add Checkpoint_XE script --- Scripts/Checkpoint_XE.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 Scripts/Checkpoint_XE.sql diff --git a/Scripts/Checkpoint_XE.sql b/Scripts/Checkpoint_XE.sql new file mode 100644 index 00000000..7a289565 --- /dev/null +++ b/Scripts/Checkpoint_XE.sql @@ -0,0 +1 @@ + No From b703f54f8b60e0584828a6afde11fb79f0a56bed Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 1 Oct 2021 14:48:43 +0300 Subject: [PATCH 481/553] Fix Checkpoint_XE script --- Scripts/Checkpoint_XE.sql | 51 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/Scripts/Checkpoint_XE.sql b/Scripts/Checkpoint_XE.sql index 7a289565..46a4fe4d 100644 --- a/Scripts/Checkpoint_XE.sql +++ b/Scripts/Checkpoint_XE.sql @@ -1 +1,50 @@ - No + + Analyze checkpoint extended events result + 1 data set: checploints info. + No + Aaron Bertrand + 2020-02-17 + 2021-09-30 by Konstantin Taranov + 1.0 + https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Checkpoint_XE.sql + https://www.mssqltips.com/sqlservertip/6319/sql-server-checkpoint-monitoring-with-extended-events/ + + +DROP TABLE IF EXISTS #xml; +GO +SELECT ev = SUBSTRING([object_name],12,5), ed = CONVERT(xml, event_data) + INTO #xml + FROM sys.fn_xe_file_target_read_file('L:\XE_Out\CheckPoint*.xel', NULL, NULL, NULL); +;WITH Events(ev,ts,db,id) AS +( + SELECT ev, + ed.value(N'(event/@timestamp)[1]', N'datetime'), + ed.value(N'(event/data[@name="database_id"]/value)[1]', N'int'), + ed.value(N'(event/action[@name="attach_activity_id"]/value)[1]', N'uniqueidentifier') + FROM #xml +), +EventPairs AS +( + SELECT db, ev, + checkpoint_ended = ts, + checkpoint_began = LAG(ts, 1) OVER (PARTITION BY id, db ORDER BY ts) + FROM Events +), +Timings AS +( + SELECT + dbname = DB_NAME(db), + checkpoint_began, + checkpoint_ended, + duration_milliseconds = DATEDIFF(MILLISECOND, checkpoint_began, checkpoint_ended) + FROM EventPairs WHERE ev = 'end' AND checkpoint_began IS NOT NULL +) +SELECT + dbname, + checkpoint_count = COUNT(*), + avg_seconds = CONVERT(decimal(18,2),AVG(1.0*duration_milliseconds)/1000), + max_seconds = CONVERT(decimal(18,2),MAX(1.0*duration_milliseconds)/1000), + total_seconds_spent = CONVERT(decimal(18,2),SUM(1.0*duration_milliseconds)/1000) +FROM Timings +GROUP BY dbname +ORDER BY total_seconds_spent DESC; From 334f9a225ffd34e1ca018aeecdccd6b4884e3854 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 28 Oct 2021 17:35:02 +0300 Subject: [PATCH 482/553] Update DbForge Index Manager and SQL Complete --- SSMS/SSMS_Addins.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 5dcd010e..f97a5d92 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -23,10 +23,10 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [dbForge Source Control](#dbforge-source-control) | [dbForge Source Control] | 2019-10-10 | 2005-2018 | Devart | No | $249 | | [dbForge Unit Test](#dbforge-unit-test) | [dbForge Unit Test] | 2019-10-10 | 2005-2018 | Devart | No | $199 | | [dbForge Data Pump](#dbforge-data-pump) | [dbForge Data Pump] | 2019-10-10 | 2008-2018 | Devart | No | $149 | -| [dbForge Index Manager](#dbforge-index-manager) | [dbForge Index Manager] | 2019-10-10 | 2008-2018 | Devart | No | $99 | +| [dbForge Index Manager](#dbforge-index-manager) | [dbForge Index Manager] | 2021-09-10 | 2008-2018 | Devart | No | $119 | | [dbForge Search](#dbforge-search) | [dbForge Search] | 2019-10-10 | 2008-2018 | Devart | Yes | No | | [dbForge Monitor](#dbforge-monitor) | [dbForge Monitor] | 2019-10-10 | 2012-2018 | Devart | Yes | No | -| [dbForge SQL Complete](#dbforge-sql-complete) | [dbForge SQL Complete] | 2019-10-10 | 2000-2018 | Devart | Yes | $149 | +| [dbForge SQL Complete](#dbforge-sql-complete) | [dbForge SQL Complete] | 2021-10-05 | 2000-2018 | Devart | Yes | $199 | | [SoftTree SQL Assistant](#softtree-sql-assistant) | [SoftTree SQL Assistant] | 2016-03-18 | 2008-2014 | SoftTree | No | $179 | | [SQL Enlight For SSMS](#sql-enlight-for-ssms) | [SQL Enlight For SSMS] | 2016-04-25 | 2008-2014 | UbitSoft | No | $195 | | [SQL Hunting Dog](#sql-hunting-dog) | [SQL Hunting Dog] | 2016-03-03 | 2008-2014 | Alex Maslyukov | Yes | No | @@ -395,11 +395,11 @@ The tool supports import and export from 10+ widely used data formats (Text, MS ## dbForge Index Manager Download page: [dbForge Index Manager]
-Release date: 2019-10-10
+Release date: 2021-09-10
Support Version: 2008-2018
Developer: Devart
Free version: No
-Price: $99 +Price: $119 dbForge Index Manager for SQL Server is a handy SSMS add-in for analyzing the status of SQL indexes and fixing issues with index fragmentation. The tool allows you to quickly collect index fragmentation statistics and detect databases that require maintenance. @@ -439,11 +439,11 @@ Price: No ## dbForge SQL Complete Download page: [dbForge SQL Complete]
-Release date: 2019-10-10
+Release date: 2021-10-05
Support Version: 2000-2018
Developer: Devart
Free version: Yes
-Price: $149 +Price: $199 dbForge SQL Complete provides a wide range of code completion features that relieve users from remembering long and complex object names, column names, SQL operators, etc., but instead allows concentrating on writing high-quality SQL code with proper formatting that is easy to understand and interpret. From f57bc29cdc12859642419a92e2ef9e2a0a895f3b Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sun, 31 Oct 2021 00:35:22 +0300 Subject: [PATCH 483/553] Add 1252 and 8670 trace flags Great thanks to @jobbish-sql --- SQL Server Trace Flag.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index e4de09d3..35aae7c7 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Trace Flags -Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**618** trace flags). +Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**620** trace flags). ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.** @@ -289,7 +289,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht ## Trace Flags List -Summary: **618 trace flags** +Summary: **620 trace flags** @@ -1295,6 +1295,19 @@ Function: Allows the `ALTER PARTITION FUNCTION` statement to honor the current u Link: https://support.microsoft.com/kb/4025261
Link: [Docs Trace Flags]
Scope: global or session or query + + + +#### Trace Flag: 1252 +**Undocumented trace flag**
+Function: It prints some kind of lock related information when [3604](#3604) is also enabled. Example: +``` +SELECT * FROM master..spt_values +OPTION (QUERYTRACEON 1252, QUERYTRACEON 3604); +``` +
+Link: https://github.com/ktaranov/sqlserver-kit/issues/196
+Scope: ? @@ -4196,6 +4209,14 @@ Link: https://sql-sasquatch.blogspot.com/2018/12/fun-with-sql-server-plan-cache- Link: [Fun with SQL Server Plan Cache, Trace Flag 8666, and Trace Flag 2388]
Scope: global or session + + +#### Trace Flag: 8670 +**Undocumented trace flag**
+Function: Skip search 2 in plan?
+Link: [Query Optimizer Deep Dive - Part 4]
+Scope: ? + #### Trace Flag: 8671 From f70e2735695783bdad0232a275408c07eaf881f8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 15 Nov 2021 15:15:13 +0300 Subject: [PATCH 484/553] Add Industry Data Models --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d66dcc65..340292c9 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Server Name Convention and T-SQL Programming Style](/SQL%20Server%20Name%20Convention%20and%20T-SQL%20Programming%20Style.md) - [SQL Server Licensing](/SQL%20Server%20Licensing.md) - [SQL Server People](/SQL%20Server%20People.md 'Most Valuable SQL Server professionals') - - [SQL Server Trace Flag](/SQL%20Server%20Trace%20Flag.md 'Complete list - 613 Trace Flags') (**Complete list - 613 trace flags**) + - [SQL Server Trace Flag](/SQL%20Server%20Trace%20Flag.md 'Complete list - 613 Trace Flags') (**Complete list - 620 trace flags**) - [SQL Server Version](/SQL%20Server%20Version.md 'List of all Microsoft SQL Sever versions') (**Complete list - from SQL Server 1.0 to SQL Server 2019**) - [Articles](/Articles) - [CLR procedures](/CLR) @@ -472,6 +472,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Assessment API rules in .csv format](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/DefaultRuleset.csv) (by Microsoft) - [SQL cheat sheet for PostgreSQL and Oracle](https://www.pcwdld.com/sql-cheat-sheet) (by Marc Wilson) - [Bllitz Excel UI](https://1pro.bi/blitz-excel-ui/) (by Alex) + - [Industry-specific Data Models - cover Subject Areas and are used to create Enterprise Data Models](http://www.databaseanswers.org/data_models/) **[⬆ back to top](#table-of-contents)** From 50e0ac12bf7dbdd4a2800d9fe1415124f89f3946 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Sat, 4 Dec 2021 15:41:10 +0300 Subject: [PATCH 485/553] Remove duplicate --- Articles/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index 06ebabd0..ec14303a 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1245,10 +1245,9 @@ Articles types: | [Find Database Connection Leaks in Your Application] | Michael J Swart | 2017-07-07 | [DBA][DEV] | | [How to Troubleshoot THREADPOOL Waits and Deadlocked Schedulers] | Eitan Blumin | 2020-10-05 | [DBA][DEV] | | [Prevent Lock Escalation On Indexed Views] | Thomas Costers | 2019-10-30 | [DBA][DEV] | -| [Concatenating Strings in SQL Server] | Guy Glantser | 2020-11-10 | [DBA][DEV] | +| [Concatenating Strings in SQL Server] | Guy Glantser | 2020-11-30 | [DBA][DEV] | | [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-07 | [DBA][DEV] | | [Migrating SSIS to Azure – an Overview] | Koen Verbeeck | 2020-11-03 | [AZ][MG] | -| [Why Full Text’s CONTAINS Queries Are So Slow] | Brent Ozar | 2020-11-12 | [DBA][DEV] | | [A Parameterization Puzzle With TOP: Part 1] | Eric Darling | 2020-10-21 | [DBA][DEV] | | [A Parameterization Puzzle With TOP: Part 2] | Eric Darling | 2020-10-22 | [DBA][DEV] | | [T-SQL: Get The Text Between Two Delimiters] | Eric Darling | 2020-10-22 | [DBA][DEV] | From e4e9a5957c39529693f40d6b1e16ecc54e64b69f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 20 Dec 2021 13:41:39 +0300 Subject: [PATCH 486/553] Add useful links --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 340292c9..52d18ac6 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [edX SQL Courses](https://www.edx.org/learn/sql) (by edX) - [SQL Murder Mystery](https://github.com/NUKnightLab/sql-mysteries) (by NUKnightLab) - [SQL Murder Mystery with answers](https://github.com/erika-e/sql-mysteries) (by Erika Pullum) + - [SQL Problems and solutions](http://www.sql-tutorial.ru/en) (by S. I. Moiseenko) - Paid - [Lynda Courses](http://www.lynda.com/SQL-Server-training-tutorials/456-0.html) - [Veeam Free Courses](https://go.veeam.com/microsoft-sql-series-webinars.html) @@ -414,7 +415,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [EFSecondLevelCache.Core - Entity Framework Core Second Level Caching Library (Redis)](https://github.com/VahidN/EFSecondLevelCache.Core) (by Vahid Nasiri) - [Dotmim.Sync - a brand new database synchronization, multi platform, multi databases, developed on top of .Net Standard 2.0](https://github.com/Mimetis/Dotmim.Sync) - [Hekaton-based shock absorber pattern for SQL Server](https://github.com/sqlsunday/shock-absorber) (by Daniel Hutmacher) - - [HammerDBBenchmark - Swarchy T101 Wilson HammerDb Benchmark Setup Scripts for SQL Server](https://github.com/swarchy/HammerDBBenchmark) (by Swarchy T101 Wilson) + - [HammerDBBenchmark - Swarchy T101 Wilson HammerDb Benchmark Setup Scripts for SQL Server](https://github.com/swarchy/HammerDBBenchmark) (by Swarchy T101 Wilson) + - [sqlblockedprocesses - SQL Server Blocked Process Report Viewer](https://github.com/mjswart/sqlblockedprocesses) (by Michael J. Swart) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 2500d09fabb4939141ddfb729bbc24825a3b4acb Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 10 Jan 2022 10:56:07 +0300 Subject: [PATCH 487/553] Add sp_CRUDGen --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52d18ac6..dd861616 100644 --- a/README.md +++ b/README.md @@ -362,7 +362,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Automatically fix high VLF counts in SQL Server 2012+](https://github.com/tboggiano/autofix-vlfs) (by Tracy Boggiano) - [splittinglargefiles - Process for splitting large files in a filegroup that has grown out of control.](https://github.com/tboggiano/splittinglargefiles) (by Tracy Boggiano) - [olamaintconfigtables - This are tables and jobs that can use to run Ola's scripts as T-SQL Jobs and run on Linux](https://github.com/tboggiano/olamaintconfigtables) (by Tracy Boggiano) - - [SQL Undercover Toolbox - A collection of cool and useful tools, procedures and scripts for the discerning DBA ](https://github.com/SQLUndercover/UndercoverToolbox) (by SQL Undercover) + - [SQL Undercover Toolbox - A collection of cool and useful tools, procedures and scripts for the discerning DBA](https://github.com/SQLUndercover/UndercoverToolbox) (by SQL Undercover) - [dba-database - Database containing DBA helper code and open source software](https://github.com/amtwo/dba-database) (by Andy Mallon) - [SQLServerSpaceAnalysis PowerBI](https://github.com/SQLJana/SQLServerSpaceAnalysis) (by Jana Sattainathan) - [SQL Server Telegram Bot](https://github.com/ionflux/mssql-telegram-bot/) @@ -417,6 +417,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Hekaton-based shock absorber pattern for SQL Server](https://github.com/sqlsunday/shock-absorber) (by Daniel Hutmacher) - [HammerDBBenchmark - Swarchy T101 Wilson HammerDb Benchmark Setup Scripts for SQL Server](https://github.com/swarchy/HammerDBBenchmark) (by Swarchy T101 Wilson) - [sqlblockedprocesses - SQL Server Blocked Process Report Viewer](https://github.com/mjswart/sqlblockedprocesses) (by Michael J. Swart) + - [sp_CRUDGen - stored procedure that generates stored procedures for you based on your tables and metadata like foreign keys and data types](https://github.com/kevinmartintech/sp_CRUDGen) (by Kevin Martin) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From af4963a2be140b9516a807c76a0898773eab9c84 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 11 Jan 2022 00:41:29 +0300 Subject: [PATCH 488/553] Add sp_Develop --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dd861616..b13e7113 100644 --- a/README.md +++ b/README.md @@ -418,6 +418,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [HammerDBBenchmark - Swarchy T101 Wilson HammerDb Benchmark Setup Scripts for SQL Server](https://github.com/swarchy/HammerDBBenchmark) (by Swarchy T101 Wilson) - [sqlblockedprocesses - SQL Server Blocked Process Report Viewer](https://github.com/mjswart/sqlblockedprocesses) (by Michael J. Swart) - [sp_CRUDGen - stored procedure that generates stored procedures for you based on your tables and metadata like foreign keys and data types](https://github.com/kevinmartintech/sp_CRUDGen) (by Kevin Martin) + - [sp_Develop - can be used by database developers, software developers and for performing database code (smell) reviews.s](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment) (by Kevin Martin) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From d4d52461458d143678c03ff0d22d25e4dde09de8 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 13 Jan 2022 23:19:42 +0300 Subject: [PATCH 489/553] Add 2542 flag info --- SQL Server Trace Flag.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 35aae7c7..21f1d217 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -2041,9 +2041,12 @@ Link: [KB917825] #### Trace Flag: 2542 **Undocumented trace flag**
-Function: Unknown, but related to controlling the contents of a memory dump
+Function: SQL Server error log still tells you about the dump. But it never gets written. +The error log still tells you about the stack text file, which still gets generated even with T2542 in place. Looks like that takes about 6 seconds rather than the dumps which were always over 1 minute. +[@sqL_handLe](https://twitter.com/sqL_handLe) used it to resolve an issue where a production environment (with > 1 TB of RAM) was experiencing unhelpful memory dumps that would take more than 100 seconds to complete. 100 seconds is the max Availability Group lease timeout threshold.
Link: [KB917825]
-Link: [Controlling SQL Server memory dumps] +Link: [Controlling SQL Server memory dumps]
+Link: [197](https://github.com/ktaranov/sqlserver-kit/issues/197) From 7aa8d9178bcb85bd391b3d6fa292f9f17e44ca45 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 27 Jan 2022 10:16:37 +0300 Subject: [PATCH 490/553] Add SQLize Online link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b13e7113..62e8191e 100644 --- a/README.md +++ b/README.md @@ -436,6 +436,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Stackoverflow SQL Anti Patterns](http://stackoverflow.com/questions/346659/what-are-the-most-common-sql-anti-patterns) - [Azure Speed](http://www.azurespeed.com/) (by Blair Chen) - [DBFiddle - test your queries online](https://dbfiddle.uk/?rdbms=sqlserver_2019) + - [SQLize Online - is a free online SQL environment for quickly running, experimenting with and sharing SQL code](https://sqlize.online/sql/mssql2019/) - [Experts-Exchange.com MS SQL Server Topics](https://www.experts-exchange.com/topics/ms-sql-server/) - [Paste The Plan - share query plans quickly and easily](https://www.brentozar.com/pastetheplan/) (by Brent Ozar Team) - [StackExchange DataExplorer Query On line](http://data.stackexchange.com/stackoverflow/query/new) From 6edaf47e654b01ab25402d01dc63a5fd276c2773 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 11 Feb 2022 10:04:53 +0300 Subject: [PATCH 491/553] Fix broken links, update info for recommended functions --- ...ver Name Convention and T-SQL Programming Style.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 9581bfe0..d8f28195 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -212,10 +212,9 @@ This is only recommendations! But it is consistent for choosing only 1 function | [`GETUTCDATE`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | | [`SYSDATETIME`] | [`SYSUTCDATETIME`] | Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. | [25] | | [`CURRENT_TIMESTAMP`] | [`SYSUTCDATETIME`] | It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called `ROWVERSION`. | [26] | -| [`DATETFROMPARTS`] | [`DATET2FROMPARTS`] | The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. | [26] | | [`DATETIMEFROMPARTS`] | [`DATETIME2FROMPARTS`] | The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. | [26] | | [`ISDATE`] | [`TRY_CONVERT`] | `ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. | [26] | -| [`BETWEEN`] | `>=` and `<=` | Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. | [27] | +| [`BETWEEN`] | [`>=`] and [`<=`] | Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. | [27] | [12]:https://docs.microsoft.com/sql/t-sql/language-elements/comparison-operators-transact-sql [13]:https://dba.stackexchange.com/a/155670/107045 @@ -242,14 +241,18 @@ This is only recommendations! But it is consistent for choosing only 1 function [24]:https://www.red-gate.com/hub/product-learning/sql-prompt/sql-prompt-code-analysis-avoid-using-isnumeric-function-e1029 [25]:https://bornsql.ca/blog/dates-times-sql-server-t-sql-functions-get-current-date-time/ [`GETDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getdate-transact-sql +[`SYSUTCDATETIME`]:https://docs.microsoft.com/en-gb/sql/t-sql/functions/sysutcdatetime-transact-sql [`GETUTCDATE`]:https://docs.microsoft.com/sql/t-sql/functions/getutcdate-transact-sql [`SYSDATETIME`]:https://docs.microsoft.com/sql/t-sql/functions/sysdatetime-transact-sql [`CURRENT_TIMESTAMP`]:https://docs.microsoft.com/sql/t-sql/functions/current-timestamp-transact-sql [26]:https://bornsql.ca/blog/dates-and-times-in-sql-server-more-functions-you-should-never-use/ [`DATETFROMPARTS`]:https://docs.microsoft.com/sql/t-sql/functions/datefromparts-transact-sql [`DATETIMEFROMPARTS`]:https://docs.microsoft.com/sql/t-sql/functions/datetimefromparts-transact-sql +[`DATETIME2FROMPARTS`]:https://docs.microsoft.com/sql/t-sql/functions/datetime2fromparts-transact-sql [`ISDATE`]:https://docs.microsoft.com/sql/t-sql/functions/isdate-transact-sql -[`BETWEEN`]:https://docs.microsoft.com/sql/t-sql/language-elements/between-transact-sql?view=sql-server-ver15 +[`BETWEEN`]:https://docs.microsoft.com/sql/t-sql/language-elements/between-transact-sql +[`>=`]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/greater-than-or-equal-to-transact-sql +[`<=`]:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/less-than-or-equal-to-transact-sql [27]:https://www.mssqltips.com/sqlservertip/5206/sql-server-datetime-best-practices/ **[⬆ back to top](#table-of-contents)** @@ -344,7 +347,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. `INFORMATION_SCHEMA` views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the `sys.objects` catalog view. - When more than one logical operator is used always use parentheses, even when they are not required. This can improve the readability of queries, and reduce the chance of making a subtle mistake because of operator precedence. - There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver15#logical-operator-precedence). + There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide#logical-operator-precedence). ```sql SELECT ProductID From 17022030b7cad8d955c3adb7a3ea7489e40ebd8f Mon Sep 17 00:00:00 2001 From: David Wiseman Date: Wed, 16 Feb 2022 21:10:03 +0000 Subject: [PATCH 492/553] Add DBA Dash Add DBA Dash to list of open source projects and utilities --- README.md | 1 + Utilities/README.md | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 62e8191e..a59fe196 100644 --- a/README.md +++ b/README.md @@ -419,6 +419,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [sqlblockedprocesses - SQL Server Blocked Process Report Viewer](https://github.com/mjswart/sqlblockedprocesses) (by Michael J. Swart) - [sp_CRUDGen - stored procedure that generates stored procedures for you based on your tables and metadata like foreign keys and data types](https://github.com/kevinmartintech/sp_CRUDGen) (by Kevin Martin) - [sp_Develop - can be used by database developers, software developers and for performing database code (smell) reviews.s](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment) (by Kevin Martin) + - [DBA Dash - Performance monitoring tool for SQL Server](https://github.com/trimble-oss/dba-dash) (by Trimble) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) diff --git a/Utilities/README.md b/Utilities/README.md index 9401db87..54e3a018 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -12,7 +12,7 @@ Utility types (main purpose), in braces `{}` current counts: - **[IDX]**: Index manager {3} - **[G]**: Data generation {4} - **[J]**: Job managers {4} -- **[M]**: Monitoring and alerting Tools {27} +- **[M]**: Monitoring and alerting Tools {28} - **[MG]**: Migration tool {31} - **[MS]**: Management Studio (alternative for SSMS) {33} - **[REC]**: Recovery tools {13} @@ -420,6 +420,7 @@ Utility types (main purpose), in braces `{}` current counts: | [dbdiagram](#dbdiagram) | No | No | [?] | [dbdiagram] | ? | holistics.io | | Yes | $9/mo | | [Beekeeper Studio](#beekeeper) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Beekeeper Studio] | 2020-11-21 | Beekeeper Studio | [MIT] | Yes | No | | [Babelfish for Aurora PostgreSQL](#babelfish) | No | Online | [?] | [Babelfish for Aurora PostgreSQL] | 2020-12-01 | Amazon | [Apache] | Open Source | No | +| [DBA Dash](#dbadash) | No | No | [M] | [DBA Dash] | - | Trimble | [MIT] | Open Source | No | ## SSMS @@ -6184,6 +6185,21 @@ Price: No Babelfish is a new translation layer for Amazon Aurora PostgreSQL that enables Aurora to understand commands from applications written for Microsoft SQL Server. +## DBA Dash + +Download page: [DBA Dash]
+Release date: 2022-01-13
+Support Version: 2005-2019
+Author: Trimble
+Free version: Yes
+Price: No + +DBA Dash is a tool for SQL Server DBAs to assist with daily checks, performance monitoring and change tracking. +- Waits, Running Queries, Performance Counters, CPU, IO, Object Execution, Extended Events, Azure DB +- Configuration, Trace Flags, Hardware, Patching, Schema +- HA/DR, Backups, Last Good DBCC, Drive Space, Agent Jobs, Corruption, Alerts + + [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio [bcp Utility]:https://docs.microsoft.com/sql/tools/bcp-utility @@ -6580,6 +6596,7 @@ Babelfish is a new translation layer for Amazon Aurora PostgreSQL that enables A [dbdiagram]:https://dbdiagram.io/home [Beekeeper Studio]:https://github.com/beekeeper-studio/beekeeper-studio [Babelfish for Aurora PostgreSQL]:https://aws.amazon.com/rds/aurora/babelfish/ +[DBA Dash]:https://github.com/trimble-oss/dba-dash [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From e850aed36af1d9a915be53e3a84f6325158ce0f7 Mon Sep 17 00:00:00 2001 From: Marcin Gminski <8288333+marcingminski@users.noreply.github.com> Date: Wed, 23 Feb 2022 21:20:27 +0000 Subject: [PATCH 493/553] Update README.md --- Utilities/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Utilities/README.md b/Utilities/README.md index 54e3a018..a293961e 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -421,6 +421,7 @@ Utility types (main purpose), in braces `{}` current counts: | [Beekeeper Studio](#beekeeper) | MySQL,PostgreSQL,Other | Linux,Mac | [MS] | [Beekeeper Studio] | 2020-11-21 | Beekeeper Studio | [MIT] | Yes | No | | [Babelfish for Aurora PostgreSQL](#babelfish) | No | Online | [?] | [Babelfish for Aurora PostgreSQL] | 2020-12-01 | Amazon | [Apache] | Open Source | No | | [DBA Dash](#dbadash) | No | No | [M] | [DBA Dash] | - | Trimble | [MIT] | Open Source | No | +| [SQLWATCH](#sqlwatch) | No | No | [M] | [SQLWATCH] | - | Marcin Gminski | [MIT] | Open Source | No | ## SSMS @@ -6199,6 +6200,20 @@ DBA Dash is a tool for SQL Server DBAs to assist with daily checks, performance - Configuration, Trace Flags, Hardware, Patching, Schema - HA/DR, Backups, Last Good DBCC, Drive Space, Agent Jobs, Corruption, Alerts +## SQLWATCH + +Download page: [SQLWATCH]
+Release date: 2018-09-16
+Support Version: 2008-2019
+Author: Marcin Gminski
+Free version: Yes
+Price: No + +SQLWATCH is an Open Source (MIT License) Real-Time monitoring solution for SQL Server +- Grafana and Power BI Dashboards +- Real Time Alerts and Actions +- Central Repository +- Infinite scalability. SQLWATCH can collect data locally on the local SQL Server or into a central repository. [SSMS]:https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms [Azure Data Studio]:https://github.com/Microsoft/azuredatastudio @@ -6597,6 +6612,7 @@ DBA Dash is a tool for SQL Server DBAs to assist with daily checks, performance [Beekeeper Studio]:https://github.com/beekeeper-studio/beekeeper-studio [Babelfish for Aurora PostgreSQL]:https://aws.amazon.com/rds/aurora/babelfish/ [DBA Dash]:https://github.com/trimble-oss/dba-dash +[SQLWATCH]:https://sqlwatch.io [LGPL-3.0]:http://www.gnu.org/licenses/lgpl-3.0.txt [MIT]:https://opensource.org/licenses/MIT From a4d48e04767eedffb6248a52b71ef5f5c47f492d Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 5 Apr 2022 15:18:33 +0300 Subject: [PATCH 494/553] Erik change own name convention rules) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a59fe196..72a81b88 100644 --- a/README.md +++ b/README.md @@ -394,7 +394,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL-Server-Permissions-Manager - a set of scripts for managing logins and permissions on SQL Server databases](https://github.com/ericcobb/SQL-Server-Permissions-Manager) (by Eric Cobb) - [AwesomeSQLServer - collection of SQL Server Queries and documentations to fix your SQL Server's bottle neck](https://github.com/SQLadmin/AwesomeSQLServer) (by SqlAdmin) - [databases_scripts - SQL Server useful scripts](https://github.com/dgavrikov/databases_scripts/tree/master/SQL%20Server) (by Dmitriy Gavrikov) - - [sp_pressure_detector - stored procedure for quickly detecting CPU and Memory pressure on a SQL Server](https://github.com/erikdarlingdata/DarlingData/blob/master/sp_pressure_detector/sp_pressure_detector.sql) (by Erik Darling) + - [sp_PressureDetector - stored procedure for quickly detecting CPU and Memory pressure on a SQL Server](https://github.com/erikdarlingdata/DarlingData/tree/main/sp_PressureDetector) (by Erik Darling) - [sp_HumanEvents - make Extended Events easier and more approachable for the average admin to troubleshoot common scenarios](https://www.erikdarlingdata.com/sp_humanevents/) (by Erik Darling) - [Export Prometheus metrics from SQL queries](https://github.com/albertodonato/query-exporter) (by Alberto Donato) - [homebrew-mssql-release - brew formulae for Microsoft ODBC Driver for SQL Server and SQL Server Command Line Utilities](https://github.com/microsoft/homebrew-mssql-release) (by Microsoft) From cd51013a3fabd6ed8f0d8e7e628411514b058245 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 29 Jun 2022 11:27:12 -0400 Subject: [PATCH 495/553] add lowlydba.sqlserver --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 72a81b88..009d8e65 100644 --- a/README.md +++ b/README.md @@ -420,6 +420,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [sp_CRUDGen - stored procedure that generates stored procedures for you based on your tables and metadata like foreign keys and data types](https://github.com/kevinmartintech/sp_CRUDGen) (by Kevin Martin) - [sp_Develop - can be used by database developers, software developers and for performing database code (smell) reviews.s](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment) (by Kevin Martin) - [DBA Dash - Performance monitoring tool for SQL Server](https://github.com/trimble-oss/dba-dash) (by Trimble) + - [lowlydba.sqlserver - A cross-platform Ansible collection using PowerShell to configure and maintain SQL Server](https://github.com/lowlydba/lowlydba.sqlserver) - (by John McCall) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 35819aa7880bf48d748f9116a733c4c873a2a41f Mon Sep 17 00:00:00 2001 From: zenzeinet Date: Thu, 28 Jul 2022 11:25:20 +0200 Subject: [PATCH 496/553] Update README.md Added SQLWatch.io - an Open Source and completely free SQL Server Monitoring project --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 009d8e65..91dbb571 100644 --- a/README.md +++ b/README.md @@ -421,6 +421,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [sp_Develop - can be used by database developers, software developers and for performing database code (smell) reviews.s](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment) (by Kevin Martin) - [DBA Dash - Performance monitoring tool for SQL Server](https://github.com/trimble-oss/dba-dash) (by Trimble) - [lowlydba.sqlserver - A cross-platform Ansible collection using PowerShell to configure and maintain SQL Server](https://github.com/lowlydba/lowlydba.sqlserver) - (by John McCall) + - [SQLWatch - SQLWATCH is an Open Source and completely free SQL Server Monitoring project](https://sqlwatch.io/) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From 182918c0819566e6a773ecb1adf380e54d502eb8 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Tue, 2 Aug 2022 23:40:40 -0700 Subject: [PATCH 497/553] Trace flags - add 6950 & 6962 Which remove SQL Server 2022's GAM/SGAM contention improvements in TempDB. --- SQL Server Trace Flag.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 21f1d217..bb6a026b 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3464,6 +3464,21 @@ Link: https://support.microsoft.com/kb/4517771
Scope: global only
SQL Server Version: >= 2019 CU1, >= 2017 CU18, >= 2016 SP1 CU10 + +#### Trace Flag: 6950 +**Undocumented trace flag**
+Function: Disable SQL Server 2022's TempDB contention improvements around GAM/SGAM access.
+Link: https://github.com/microsoft/bobsql/blob/master/demos/sqlserver2022/tempdb/disablegamsgam.cmd +Scope: global only
+SQL Server Version: >= 2022 + + +#### Trace Flag: 6962 +**Undocumented trace flag**
+Function: Disable SQL Server 2022's TempDB contention improvements around GAM/SGAM access.
+Link: https://github.com/microsoft/bobsql/blob/master/demos/sqlserver2022/tempdb/disablegamsgam.cmd +Scope: global only
+SQL Server Version: >= 2022 #### Trace Flag: 7103 From aafb7095c98dc6883eba5388cd19797bbf1c57cd Mon Sep 17 00:00:00 2001 From: Daniel Hutmacher Date: Wed, 3 Aug 2022 15:30:49 +0200 Subject: [PATCH 498/553] Updated location information for Daniel Hutmacher --- SQL Server People.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server People.md b/SQL Server People.md index b82539be..e1f9a7c5 100644 --- a/SQL Server People.md +++ b/SQL Server People.md @@ -60,7 +60,7 @@ Most valuable professionals in Microsoft SQL Server Database world | Dmitry Pilugin | [Dmitry Blog] | RUS | Moscow | [@SomewereSomehow] | pilugin@inbox.ru | 4 | [Pilugin MVP] | | Buck Woody | [Buck Blog] | | NULL | [@buckwoodymsft] | NULL | 0 | - | | Steve Stedman | [Steve Stedman Blog] | USA | Austin | [@stedman] | NULL | 0 | - | -| Daniel Hutmacher | [Daniel Hutmacher Blog] | USA | Austin | [@dhmacher] | NULL | 0 | - | +| Daniel Hutmacher | [Daniel Hutmacher Blog] | SWE | Stockholm | [@dhmacher] | NULL | 0 | - | | Niko Neugebauer | [Niko Blog] | PRT | NULL | [@NikoNeugebauer] | niko@nikoport.com | 6 | [Neugebauer MVP] | | Mike Fal | [Mike Fal Blog] | USA | Denver | [@Mike_Fal] | NULL | 0 | - | | Robert L Davis | [Robert Blog] | USA | New York | [@SQLSoldier] | NULL | 3 | [Davis MVP] | From acba2f6faf862405040c01135a1678b1ed722564 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 3 Aug 2022 16:34:27 +0300 Subject: [PATCH 499/553] Format 6950 and 6962 info --- SQL Server Trace Flag.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index bb6a026b..d097d285 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1,5 +1,5 @@ # Microsoft SQL Server Trace Flags -Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**620** trace flags). +Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**622** trace flags). ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.** @@ -289,7 +289,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht ## Trace Flags List -Summary: **620 trace flags** +Summary: **622 trace flags** @@ -3464,22 +3464,25 @@ Link: https://support.microsoft.com/kb/4517771
Scope: global only
SQL Server Version: >= 2019 CU1, >= 2017 CU18, >= 2016 SP1 CU10 + #### Trace Flag: 6950 **Undocumented trace flag**
Function: Disable SQL Server 2022's TempDB contention improvements around GAM/SGAM access.
-Link: https://github.com/microsoft/bobsql/blob/master/demos/sqlserver2022/tempdb/disablegamsgam.cmd +Link: [Github disable gamsgam]
Scope: global only
SQL Server Version: >= 2022 + #### Trace Flag: 6962 **Undocumented trace flag**
Function: Disable SQL Server 2022's TempDB contention improvements around GAM/SGAM access.
-Link: https://github.com/microsoft/bobsql/blob/master/demos/sqlserver2022/tempdb/disablegamsgam.cmd +Link: [Github disable gamsgam]
Scope: global only
SQL Server Version: >= 2022 + #### Trace Flag: 7103 **Undocumented trace flag**
@@ -5646,3 +5649,4 @@ SQL Server Version: >= 2019 CU9, >= 2017 CU21 [Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb [KB2634571]:https://web.archive.org/web/20150303213855/http://support.microsoft.com/kb/2634571 [KB4565944]:https://support.microsoft.com/kb/4565944 +[Github disable gamsgam]:https://github.com/microsoft/bobsql/blob/master/demos/sqlserver2022/tempdb/disablegamsgam.cmd From 3c9c369450861ec0a7637b2525d2e3c286cb5560 Mon Sep 17 00:00:00 2001 From: 1vishalkumar <111412597+1vishalkumar@users.noreply.github.com> Date: Thu, 18 Aug 2022 13:07:32 +0530 Subject: [PATCH 500/553] Added a useful link Added a useful link on the SQL tutorial that will be helpful for your learners. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 91dbb571..d08c4d14 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL-Articles](http://sql-articles.com/articles/) - [DallasDBAs Blog](http://dallasdbas.com/blog/) - [UpSearch Blog](https://upsearch.com/blog/) + - [SQL tutorial](https://www.scaler.com/topics/sql) - [ProData Blog](http://blogs.prodata.ie/) - [DallasDBAs.com Blog](http://dallasdbas.com/blog/) - [SQLBI Blog](http://www.sqlbi.com) From 683da9576429cd169ebeb40333365d59fadb9e85 Mon Sep 17 00:00:00 2001 From: Jeff Belina Date: Thu, 25 Aug 2022 10:56:58 -0500 Subject: [PATCH 501/553] Update SentryOne links - replace sqlsentry.com and update blog.sentryone.com links --- Articles/README.md | 24 ++++++------ Errors/README.md | 2 +- README.md | 4 +- SQL Server People.md | 4 +- SQL Server Trace Flag.md | 2 +- SSMS/README.md | 2 +- SSMS/SSMS_Addins.md | 2 +- SSMS/SSMS_Tips.md | 82 +++++++++++++++++++--------------------- 8 files changed, 58 insertions(+), 64 deletions(-) diff --git a/Articles/README.md b/Articles/README.md index ec14303a..b9f58c6e 100644 --- a/Articles/README.md +++ b/Articles/README.md @@ -1541,7 +1541,7 @@ Articles types: [How To Fix Forwarded Records]:https://www.brentozar.com/archive/2016/07/fix-forwarded-records/ [Should I Automate my Windows Updates for SQL Server?]:http://www.littlekendra.com/2016/07/28/should-i-automate-my-windows-updates-for-sql-server-dear-sql-dba-episode-10/ [Finding the Right Path]:http://jasonbrimhall.info/2016/08/24/finding-the-right-path/ -[#BackToBasics : An Updated "Kitchen Sink" Example]:https://blogs.sqlsentry.com/aaronbertrand/backtobasics-updated-kitchen-sink-example/ +[#BackToBasics : An Updated "Kitchen Sink" Example]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-updated-kitchen-sink-example [Locking and Blocking in SQL Server]:https://www.brentozar.com/sql/locking-and-blocking-in-sql-server/ [Nested Loops Prefetching]:https://www.sql.kiwi/2013/08/sql-server-internals-nested-loops-prefetching.html [Performance tuning backup and restore operations]:http://www.sqlhammer.com/performance-tuning-backup-restore-operations/ @@ -1632,7 +1632,7 @@ Articles types: [Sync Vs Async Statistics: The Old Debate]:https://sqlserverscotsman.wordpress.com/2016/12/10/sync-vs-async-statistics-the-old-debate/ [Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 with high-performance workloads]:https://support.microsoft.com/en-gb/kb/2964518 [Troubleshooting SQL Server backup and restore operations]:https://support.microsoft.com/en-us/kb/224071 -[SQL Server 2016: Getting tempdb a little more right]:https://blogs.sentryone.com/aaronbertrand/sql-server-2016-tempdb-fixes/ +[SQL Server 2016: Getting tempdb a little more right]:https://www.sentryone.com/blog/aaronbertrand/sql-server-2016-tempdb-fixes [Practical uses of binary types]:https://sqlsunday.com/2017/01/09/binary-types/ [Backing Up SQL Server Databases is Easier in PowerShell than T-SQL]:http://www.sqlservercentral.com/articles/PowerShell/151510/ [Creating, detaching, re-attaching, and fixing a SUSPECT database]:http://www.sqlskills.com/blogs/paul/creating-detaching-re-attaching-and-fixing-a-suspect-database/ @@ -1666,8 +1666,8 @@ Articles types: [New SQL Server Database Request Questionnaire and Checklist]:https://www.mssqltips.com/sqlservertip/3523/new-sql-server-database-request-questionnaire-and-checklist/ [Adding Partitions to the Lower End of a Left Based Partition Function]:https://www.littlekendra.com/2017/02/21/adding-partitions-to-the-lower-end-of-a-left-based-partition-function/ [Don't Panic Busting a File Space Myth]:http://sqlmag.com/database-administration/dont-panic-busting-file-space-myth -[#BackToBasics : Dating Responsibly]:https://blogs.sentryone.com/aaronbertrand/backtobasics-dating-responsibly/ -[#BackToBasics : Common Table Expressions (CTEs)]:https://blogs.sentryone.com/aaronbertrand/backtobasics-ctes/ +[#BackToBasics : Dating Responsibly]:https://www.sentryone.com/blog/aaronbertrand/backtobasics-dating-responsibly/ +[#BackToBasics : Common Table Expressions (CTEs)]:https://www.sentryone.com/blog/aaronbertrand//backtobasics-ctes/ [How to Establish Dedicated Admin Connection (DAC) to SQL Server]:https://www.codeproject.com/tips/1136361/how-to-establish-dedicated-admin-connection-dac-to [SQL and SQL only Best Practice]:http://strictlysql.blogspot.ru/search/label/Best%20Practices [There Is No Difference Between Table Variables, Temporary Tables, and Common Table Expressions]:https://dzone.com/articles/there-is-no-difference-between-table-variables-tem @@ -1699,7 +1699,7 @@ Articles types: [How To Forecast Database Disk Capacity If You Don’t Have A Monitoring Tool]:http://www.edwinmsarmiento.com/how-to-forecast-database-disk-capacity-if-you-dont-have-a-monitoring-tool/ [Statistical Sampling for Verifying Database Backups]:https://www.simple-talk.com/sql/database-administration/statistical-sampling-for-verifying-database-backups/ [Using dbatools for automated restore and CHECKDB]:http://www.centinosystems.com/blog/sql/using-dbatools-for-automated-restore-and-checkdb/ -[Bad Habits Revival]:https://blogs.sentryone.com/aaronbertrand/bad-habits-revival/ +[Bad Habits Revival]:https://www.sentryone.com/blog/aaronbertrand/bad-habits-revival/ [Deploying Multiple SSIS Projects via PowerShell]:https://www.simple-talk.com/sql/ssis/deploying-multiple-ssis-projects-via-powershell/ [Determining the Cost Threshold for Parallelism]:http://www.scarydba.com/2017/02/28/determining-the-cost-threshold-for-parallelism/ [Identifying a row’s physical location]:http://blog.waynesheffield.com/wayne/archive/2017/03/identifying-rows-physical-location/ @@ -1738,7 +1738,7 @@ Articles types: [Why Is This Query Sometimes Fast and Sometimes Slow]:https://www.brentozar.com/archive/2016/11/query-sometimes-fast-sometimes-slow/ [Using Plan Guides to Remove OPTIMIZE FOR UNKNOWN Hints]:https://www.brentozar.com/archive/2016/11/using-plan-guides-remove-optimize-unknown-hints/ [ETL Best Practices]:https://www.timmitchell.net/etl-best-practices/ -[Resolving Key Lookup Deadlocks with Plan Explorer]:https://blogs.sentryone.com/greggonzalez/key-lookup-deadlocks-plan-explorer/ +[Resolving Key Lookup Deadlocks with Plan Explorer]:https://www.sentryone.com/blog/greggonzalez/key-lookup-deadlocks-plan-explorer/ [Why ROWLOCK Hints Can Make Queries Slower and Blocking Worse in SQL Server]:https://www.littlekendra.com/2016/02/04/why-rowlock-hints-can-make-queries-slower-and-blocking-worse-in-sql-server/ [Does a Clustered Index really physically store the rows in key order]:http://www.sqlservercentral.com/blogs/discussionofsqlserver/2012/10/21/does-a-clustered-index-really-physically-store-the-rows-in-key-order/ [Ugly Pragmatism For The Win]:http://michaeljswart.com/2016/02/ugly-pragmatism-for-the-win/ @@ -1761,7 +1761,7 @@ Articles types: [Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back]:http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back/ [Inside the Storage Engine: Anatomy of a page]:http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-page/ [For The Better Developer: SQL Server Indexes]:https://medium.com/sql-server-for-the-better-developer/know-your-data-base-affd6241bcac -[#EntryLevel: Compression & Data Types]:https://blogs.sentryone.com/melissaconnors/entry-level-compression/ +[#EntryLevel: Compression & Data Types]:https://www.sentryone.com/blog/melissaconnors/entry-level-compression/ [Cardinality Estimation for a Predicate on a COUNT Expression]:https://sqlperformance.com/2017/04/sql-optimizer/cardinality-count [Changing SQL Server Collation After Installation]:https://www.mssqltips.com/sqlservertip/3519/changing-sql-server-collation-after-installation/ [Does a TempDB spill mean statistics are out of date?]:https://www.brentozar.com/archive/2017/04/tempdb-spill-mean-statistics-date/ @@ -1901,7 +1901,7 @@ Articles types: [Cleanly Uninstalling Stubborn SQL Server Components]:https://www.mssqltips.com/sqlservertip/4050/cleanly-uninstalling-stubborn-sql-server-components/ [Hey! What's the deal with SQL Server NOCOUNT and T-SQL WHILE loops?]:http://sql-sasquatch.blogspot.ru/2017/11/hey-whats-deal-with-nocount-and-t-sql.html [Query Store Settings]:https://www.sqlskills.com/blogs/erin/query-store-settings/ -[Using Plan Explorer with Entity Framework]:https://blogs.sentryone.com/jasonhall/using-plan-explorer-entity-framework/ +[Using Plan Explorer with Entity Framework]:https://www.sentryone.com/blog/jasonhall/using-plan-explorer-entity-framework/ [Overview of Encryption Tools in SQL Server]:https://matthewmcgiffen.com/2017/12/05/overview-of-encryption-tools-in-sql-server/ [Clustered Index Uniquifier Existence and Size]:https://sqlquantumleap.com/2017/09/18/clustered-index-uniquifier-existence-and-size/ [Understanding SQL Server Backups]:https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd822915(v=msdn.10) @@ -1998,8 +1998,8 @@ Articles types: [Optimization Thresholds – Grouping and Aggregating Data, Part 4]:https://sqlperformance.com/2018/07/sql-performance/grouping-and-aggregating-part-4 [Optimization Thresholds – Grouping and Aggregating Data, Part 5]:https://sqlperformance.com/2018/08/sql-performance/grouping-and-aggregating-part-5 [When DBCC OpenTran doesn’t list all open transactions]:https://blogs.msdn.microsoft.com/mosharaf/2013/02/17/when-dbcc-opentran-doesnt-list-all-open-transactions/ -[How I spot not-yet-documented features in SQL Server CTPs]:https://blogs.sentryone.com/aaronbertrand/fishing-for-features-in-ctps/ -[More ways to discover changes in new versions of SQL Server]:https://blogs.sentryone.com/aaronbertrand/more-changes-sql-server/ +[How I spot not-yet-documented features in SQL Server CTPs]:https://www.sentryone.com/blog/aaronbertrand/fishing-for-features-in-ctps/ +[More ways to discover changes in new versions of SQL Server]:https://www.sentryone.com/blog/aaronbertrand/more-changes-sql-server/ [Tail-Log Backup and Restore in SQL Server]:https://www.sqlshack.com/tail-log-backup-and-restore-in-sql-server/ [Database Filegroup(s) and Piecemeal restores in SQL Server]:https://www.sqlshack.com/database-filegroups-and-piecemeal-restores-in-sql-server/ [Updating Statistics with Ola Hallengren’s Script]:https://www.sqlskills.com/blogs/erin/updating-statistics-with-ola-hallengrens-script/ @@ -2043,7 +2043,7 @@ Articles types: [SQL queries to manage hierarchical or parent-child relational rows in SQL Server]:https://www.codeproject.com/Articles/818694/SQL-queries-to-manage-hierarchical-or-parent-child [Choosing Between Table Variables and Temporary Tables]:https://www.red-gate.com/hub/product-learning/sql-prompt/choosing-table-variables-temporary-tables [What's New in the First Public CTP of SQL Server 2019]:https://www.mssqltips.com/sqlservertip/5710/whats-new-in-the-first-public-ctp-of-sql-server-2019/ -[SQL Server support for TLS 1.2 – Read This First!]:https://blogs.sentryone.com/aaronbertrand/tls-1-2-support-read-first/ +[SQL Server support for TLS 1.2 – Read This First!]:https://www.sentryone.com/blog/aaronbertrand/tls-1-2-support-read-first/ [Misconceptions in SQL Server: A Trio of table variables]:https://sqlinthewild.co.za/index.php/2010/10/12/a-trio-of-table-variables/ [Using the Same Column Twice in a SQL UPDATE Statement]:https://www.sqltheater.com/blog/using-the-same-column-twice-in-an-update-statement/ [How to perform a performance test against a SQL Server instance]:https://www.sqlshack.com/how-to-perform-a-performance-test-against-a-sql-server-instance/ @@ -2135,7 +2135,7 @@ Articles types: [Difference between Identity & Sequence in SQL Server]:https://www.sqlshack.com/difference-between-identity-sequence-in-sql-server/ [Does the Rowmodctr Update for Non-Updating Updates?]:https://www.brentozar.com/archive/2019/05/does-the-rowmodctr-update-for-non-updating-updates/ [An Intro To Data Modeling]:https://donedifferent.data.blog/2019/04/12/an-intro-to-data-modeling/ -[On telemetry and other data collected by SQL Server]:https://blogs.sentryone.com/aaronbertrand/sql-server-telemetry/ +[On telemetry and other data collected by SQL Server]:https://www.sentryone.com/blog/aaronbertrand/sql-server-telemetry/ [Purging data with batched deletes]:https://am2.co/2019/04/purging-data-with-batched-deletes/ [Don’t Forget RoboCopy]:https://sqlrus.com/2019/05/dont-forget-robocopy/ [Understanding the XML description of the Deadlock Graph in SQL Server]:https://www.sqlshack.com/understanding-the-xml-description-of-the-deadlock-graph-in-sql-server/ diff --git a/Errors/README.md b/Errors/README.md index d8915ea3..1403f2c9 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -7,7 +7,7 @@ - [Integration Services Error and Message Reference](https://docs.microsoft.com/en-us/sql/integration-services/integration-services-error-and-message-reference) - [View and Read SQL Server Setup Log Files](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files) - [Troubleshoot the SQL Server Utility](https://docs.microsoft.com/en-us/sql/database-engine/troubleshoot-the-sql-server-utility) -- [Common Issues: Licensing Errors](http://blogs.sqlsentry.com/georgeboakye/common-issues-licensing-errors/) +- [Common Issues: Licensing Errors](https://www.sentryone.com/blog/georgeboakye/common-issues-licensing-errors - [SQL Server 2016 Distributed Replay Errors](https://www.sqlskills.com/blogs/jonathan/sql-server-2016-distributed-replay-errors/) - [The Instance ID MSSQLSERVER Is Already In Use](http://www.sqlservercentral.com/articles/MSSQLSERVER/161398/) - [SQL Server: Detach/Attach Gotchas!](https://sqljana.wordpress.com/2018/04/08/sql-server-detach-attach-gotchas/) diff --git a/README.md b/README.md index d08c4d14..9f20a902 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [MSSQLTips](https://www.mssqltips.com/get-free-sql-server-tips/) - [BRENT OZAR](https://www.brentozar.com/) scripts, videos and articles - [Simple-talk Articles](https://www.simple-talk.com/) - - [SQLSentry Blog](http://blogs.sqlsentry.com) + - [SentryOne Blog](https://www.sentryone.com/blog) - [Glenn Berry's SQL Server Performance](http://sqlserverperformance.wordpress.com/) - [Kenneth Fisher SQLStudies Blog](http://sqlstudies.com/) - [Best SQL Server Perfomance Blog](http://sqlperformance.com/) @@ -613,7 +613,7 @@ SQL Server: - [Syncfusion Techportal](http://syncfusion.com/resources/techportal) - [Modern Storage Strategies for SQL Server](http://www.actualtech.io/gg-modern-storage/) - [Migrating SQL Server Databases to Azure](https://blogs.msdn.microsoft.com/microsoft_press/2016/05/11/free-ebook-microsoft-azure-essentials-migrating-sql-server-databases-to-azure/) - - [SQL Sentry Free eBooks](https://www.sqlsentry.com/sql-server-books) + - [SentryOne Free eBooks](https://www.sentryone.com/resources#filter=.ebook) - [Microsoft Cloud Security for Enterprise Architects (PDF)](http://download.microsoft.com/download/6/d/f/6dfd7614-bbcf-4572-a871-e446b8cf5d79/msft_cloud_architecture_security.pdf) - [Brent Ozar SQL Server Setup Checklist eBook](http://u.brentozar.com/eBook_SQL_Server_Setup_Checklist.pdf) - [Introducing Microsoft SQL Server 2016](https://info.microsoft.com/Introducing-SQL-Server-2016-eBook.html) diff --git a/SQL Server People.md b/SQL Server People.md index e1f9a7c5..0c9cdfa2 100644 --- a/SQL Server People.md +++ b/SQL Server People.md @@ -105,7 +105,7 @@ Most valuable professionals in Microsoft SQL Server Database world [Andrea Allred Blog]:https://royalsql.com/ [Randolph West Blog]:https://rabryst.ca/ [Dave Ballantyne]:clearskysql.co.uk/ -[Lori Edwards Blog]:https://blogs.sentryone.com/author/LoriEdwards/ +[Lori Edwards Blog]:https://www.sentryone.com/blog/author/lori-edwards [Brent Ozar Blog]:http://www.brentozar.com/ [SQLBlog]:http://sqlblog.com/ [Ola Maintenance Solution]:https://ola.hallengren.com/ @@ -179,7 +179,7 @@ Most valuable professionals in Microsoft SQL Server Database world [2]:http://nedotter.com/contact/ [Joe Obbish Blog]:https://orderbyselectnull.com/ [Stephen Bennett Blog]:https://sqlnotesfromtheunderground.wordpress.com/ -[Brian Davis Articles]:https://blogs.sentryone.com/author/briandavis/ +[Brian Davis Articles]:https://www.sentryone.com/blog/author/brian-davis [Raul Gonzalez Blog]:http://www.sqldoubleg.com/ [Hugo Kornelis Blog]:https://sqlserverfast.com/ [Drew Furgiuele Blog]:https://port1433.com/ diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index d097d285..1a8291a4 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5594,7 +5594,7 @@ SQL Server Version: >= 2019 CU9, >= 2017 CU21 [Yet another X-Ray for the QP]:http://www.queryprocessor.com/tf_8628/ [How It Works: SQL Server 2012 Database Engine Task Scheduling]:https://blogs.msdn.microsoft.com/psssql/2013/08/13/how-it-works-sql-server-2012-database-engine-task-scheduling/ [What You Need to Know about the Batch Mode Window Aggregate Operator in SQL Server 2016: Part 1]:http://sqlmag.com/sql-server/what-you-need-know-about-batch-mode-window-aggregate-operator-sql-server-2016-part-1 -[SQL Server 2016 : Getting tempdb a little more right]:https://blogs.sentryone.com/aaronbertrand/sql-server-2016-tempdb-fixes/ +[SQL Server 2016 : Getting tempdb a little more right]:https://www.sentryone.com/blog/aaronbertrand/sql-server-2016-tempdb-fixes [Importance of Performing DBCC CHECKDB on all SQL Server Databases]:https://www.mssqltips.com/sqlservertip/4581/importance-of-performing-dbcc-checkdb-on-all-sql-server-databases/ [SQL Server Parallel Query Placement Decision Logic]:https://blogs.msdn.microsoft.com/psssql/2016/03/04/sql-server-parallel-query-placement-decision-logic/ [compatibility level]:https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level diff --git a/SSMS/README.md b/SSMS/README.md index 8da84520..54a9b822 100644 --- a/SSMS/README.md +++ b/SSMS/README.md @@ -18,7 +18,7 @@ It also provides tools to deploy, monitor, and upgrade the data-tier components, - [SQL Server Management Studio - Changelog (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-changelog-ssms) - [SQL Server Management Studio (SSMS) - Release Candidate](https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-ssms-release-candidate) - [Previous SQL Server Management Studio Releases](https://docs.microsoft.com/en-us/sql/ssms/previous-sql-server-management-studio-releases) -- [SQLSentry Latest Builds of Management Studio](http://blogs.sqlsentry.com/team-posts/latest-builds-management-studio/) +- [SQLSentry Latest Builds of Management Studio](https://www.sentryone.com/blog/team-posts/latest-builds-management-studio/) - [SQL Server Tools](https://docs.microsoft.com/en-us/sql/ssdt/sql-server-tools) - [SQL Server Management Studio (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-ssms) - [Microsoft Download Center SSMS](https://www.microsoft.com/en-us/download/search.aspx?q=sql%20server%20management%20studio&p=0&r=10&t=&s=Relevancy~Descending) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index f97a5d92..eb39238d 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -666,7 +666,7 @@ SSMS Lizard extends SQL Server Management Studio with a number of new features n [dbForge SQL Complete]:https://www.devart.com/dbforge/sql/sqlcomplete/ordering.html [SSMS Tools Pack]:http://www.ssmstoolspack.com/Features [SQL Pretty Printer]:http://www.excel-sql-server.com/excel-sql-server-import-export-using-excel-add-ins.htm -[SQL Sentry Plan Explorer]:https://www.sqlsentry.com/products/plan-explorer/sql-server-query-view +[SQL Sentry Plan Explorer]:https://www.sentryone.com/plan-explorer [TSQL Code Smells Finder]:https://tsqlsmells.codeplex.com/releases/view/101979 [SQLTreeo]:http://www.sqltreeo.com/ [ApexSQL Complete]:http://www.apexsql.com/sql_tools_complete.aspx diff --git a/SSMS/SSMS_Tips.md b/SSMS/SSMS_Tips.md index 99486efd..25c487fa 100644 --- a/SSMS/SSMS_Tips.md +++ b/SSMS/SSMS_Tips.md @@ -18,47 +18,41 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a - [ ] [Starting SSMS with a specific connection and script file](http://dbamastery.com/tips/ssms-cmdline-utility/) **Table of Content**: -1. [Import and Export Settings](#1) -2. [SSMS Shortcuts](#2) -3. [Keyboard Shortcuts for Favorite Stored Procedures and Scripts](#3) -4. [SSMS Scripting Option](#4) -5. [Selecting a block of text using the ALT Key](#5) -6. [Script Table and Column Names by Dragging from Object Explorer](#6) -7. [Disable Copy of Empty Text](#7) -8. [Client Statistics](#8) -9. [Configure Object Explorer to Script Compression and Partition Schemes for Indexes](#9) -10. [Using GO X to Execute a Batch or Statement Multiple Times](#10) -11. [SSMS Template Replacement](#11) -12. [Color coding of connections](#12) -13. [SQLCMD mode](#13) -14. [Script multiple objects using the Object Explorer Details Windows](#14) -15. [Registered Servers / Central Management Server](#15) -16. [Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar](#16) -17. [Moving columns in the results pane](#17) -18. [Generating Charts and Drawings in SQL Server Management Studio](#18) -19. [Additional Connection Parameters](#19) -20. [Working with tabs headers](#20) -21. [Hiding tables in SSMS Object Explorer](#21) -22. [UnDock Tabs and Windows for Multi Monitor Support](#22) -23. [RegEx-Based Finding and Replacing of Text in SSMS](#23) -24. [Changing what SSMS opens on startup](#24) -25. [Modifying New Query Template](#25) -26. [Query Execution Options](#26) -27. [SQL Server Diagnostics Extension](#27) -28. [Connect to SQL Servers in another domain using Windows Authentication](#28) -29. [SSMS Default Reports](#29) -30. [Live Query Statistics](#30) -31. [Searching in Showplan](#31) -32. [Object Explore Details](#32) -33. [Working with Azure SQL](#33) -34. [Using Extended Events and Profiler in SSMS](#34) -35. [Vulnerability Assessment in SSMS](#35) -36. [Import Flat File to SQL Wizard](#36) -37. [AutoRecover in SSMS](#37) -38. [View and query Power BI .pbix files in SSMS](#38) -39. [Using SSMS to analyze Power BI with XMLA](#39) -40. [SSMS shortcut to comment/uncomment a specific part of the query](#40) -41. [Reference](#reference) +- [SQL Server Management Studio Tips](#sql-server-management-studio-tips) + - [Road map](#road-map) + - [1. Import and Export Settings](#1-import-and-export-settings) + - [2. SSMS Shortcuts](#2-ssms-shortcuts) + - [3. Keyboard Shortcuts for Favorite Stored Procedures and Scripts](#3-keyboard-shortcuts-for-favorite-stored-procedures-and-scripts) + - [Some useful shortcuts for `sp_WhoIsActive` from Kevin Feasel](#some-useful-shortcuts-for-sp_whoisactive-from-kevin-feasel) + - [4. SSMS Scripting Option](#4-ssms-scripting-option) + - [Script any object with data](#script-any-object-with-data) + - [The Default Scripting Option](#the-default-scripting-option) + - [5. Selecting a block of text using the ALT Key](#5-selecting-a-block-of-text-using-the-alt-key) + - [6. Script Table and Column Names by Dragging from Object Explorer](#6-script-table-and-column-names-by-dragging-from-object-explorer) + - [7. Disable Copy of Empty Text](#7-disable-copy-of-empty-text) + - [8. Client Statistics](#8-client-statistics) + - [9. Configure Object Explorer to Script Compression and Partition Schemes for Indexes](#9-configure-object-explorer-to-script-compression-and-partition-schemes-for-indexes) + - [10. Using GO X to Execute a Batch or Statement Multiple Times](#10-using-go-x-to-execute-a-batch-or-statement-multiple-times) + - [11. SSMS Template Replacement](#11-ssms-template-replacement) + - [12. Color coding of connections](#12-color-coding-of-connections) + - [13. SQLCMD mode](#13-sqlcmd-mode) + - [14. Script multiple objects using the Object Explorer Details Windows](#14-script-multiple-objects-using-the-object-explorer-details-windows) + - [15. Registered Servers / Central Management Server](#15-registered-servers--central-management-server) + - [16. Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar](#16-splitting-the-query-window-and-annotations-and-map-mode-for-vertical-scroll-bar) + - [17. Moving columns in the results pane](#17-moving-columns-in-the-results-pane) + - [18. Generating Charts and Drawings in SQL Server Management Studio](#18-generating-charts-and-drawings-in-sql-server-management-studio) + - [19. Additional Connection Parameters](#19-additional-connection-parameters) + - [20. Working with tabs headers](#20-working-with-tabs-headers) + - [21. Hiding tables in SSMS Object Explorer](#21-hiding-tables-in-ssms-object-explorer) + - [22. UnDock Tabs and Windows for Multi Monitor Support](#22-undock-tabs-and-windows-for-multi-monitor-support) + - [23. RegEx-Based Finding and Replacing of Text in SSMS](#23-regex-based-finding-and-replacing-of-text-in-ssms) + - [24. Changing what SSMS opens on startup](#24-changing-what-ssms-opens-on-startup) + - [25. Modifying New Query Template](#25-modifying-new-query-template) + - [26. Query Execution Options](#26-query-execution-options) + - [27. SQL Server Diagnostics Extension](#27-sql-server-diagnostics-extension) + - [28. Connect to SQL Servers in another domain using Windows Authentication](#28-connect-to-sql-servers-in-another-domain-using-windows-authentication) + - [Solution 1: runas](#solution-1-runas) + - [40. Reference:](#40-reference) **Great thanks to**: @@ -80,7 +74,7 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a - Daniel Calbimonte ([b](https://www.sqlshack.com/author/daniel-calbimonte/) | [t](https://twitter.com/dcalbimonte)) - Ahmad Yaseen ([b](https://www.sqlshack.com/author/ahmad-yaseen/) | [t](https://twitter.com/AhmadZYaseen)) - Solomon Rutzky ([b](https://sqlquantumleap.com/) | [t](https://twitter.com/SqlQuantumLeap)) -- Bert Wagner ([b](https://blogs.sentryone.com) | [t](https://twitter.com/bertwagner)) +- Bert Wagner ([b](https://bertwagner.com/category/sql.html) | [t](https://twitter.com/bertwagner)) - Thomas LaRock ([b](https://thomaslarock.com/) | [t](https://twitter.com/SQLRockstar)) - Jen Mccown ([b](http://www.midnightdba.com/Jen/author/jen/)) - Louis Davidson ([b](https://www.red-gate.com/simple-talk/author/louis-davidson/) | [t](https://twitter.com/drsql)) @@ -99,7 +93,7 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a Default settings (if you need to compare with yours) you can find here: [SSMS settings files](https://github.com/ktaranov/sqlserver-kit/tree/master/SSMS/SSMS_vssettings) You can configure so many settings in SSMS and then export it and use on all your computers. -Below link provide detailed instruction and awesome Dark theme configuration: [Making SSMS Pretty: My Dark Theme](https://blogs.sentryone.com/aaronbertrand/making-ssms-pretty-my-dark-theme/) +Below link provide detailed instruction and awesome Dark theme configuration: [Making SSMS Pretty: My Dark Theme](https://www.sentryone.com/blog/aaronbertrand/making-ssms-pretty-my-dark-theme/) Also you can create shared team settings file and use it from network location. Detailed information you can find in this article [Symbolic Links for Sharing Template Files or "How I Broke Management Studio with Symbolic Links"](http://sqlmag.com/sql-server/symbolic-links-sharing-template-files-or-how-i-broke-management-studio-symbolic-links) @@ -943,7 +937,7 @@ More details [here](https://dba.stackexchange.com/a/147182/107045) [SQL Server Management Studio (SSMS) Tips and Tricks]:http://www.bidn.com/blogs/MMilligan/bidn-blog/3326/sql-server-management-studio-ssms-tips-and-tricks [Knowing the Options]:http://sqlrus.com/2017/05/knowing-the-options/ [SQL Server Diagnostics Extension for SSMS]:https://blogs.msdn.microsoft.com/sql_server_team/sql-server-diagnostics-preview/ -[T-SQL Tuesday #92: Lessons Learned the Hard Way]:https://blogs.sentryone.com/aaronbertrand/t-sql-tuesday-92-lessons-learned-hard-way/ +[T-SQL Tuesday #92: Lessons Learned the Hard Way]:https://www.sentryone.com/blog/aaronbertrand/t-sql-tuesday-92-lessons-learned-hard-way/ [SQL Server Diagnostics: New "Analyze Dumps" feature]:https://sqlworkbooks.com/2017/07/sql-server-diagnostics-new-analyze-dumps-feature/ [Connect to SQL Servers in another domain using Windows Authentication]:https://www.mssqltips.com/sqlservertip/3250/connect-to-sql-servers-in-another-domain-using-windows-authentication/ [New in SSMS: Searching in Showplan]:https://blogs.msdn.microsoft.com/sql_server_team/new-in-ssms-searching-in-showplan/ From 70a90dc6f1ea743a1ba40f46578479b3536cc702 Mon Sep 17 00:00:00 2001 From: Jeff Belina Date: Thu, 25 Aug 2022 11:07:42 -0500 Subject: [PATCH 502/553] close parenthesis --- Errors/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Errors/README.md b/Errors/README.md index 1403f2c9..f02a7d51 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -7,7 +7,7 @@ - [Integration Services Error and Message Reference](https://docs.microsoft.com/en-us/sql/integration-services/integration-services-error-and-message-reference) - [View and Read SQL Server Setup Log Files](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files) - [Troubleshoot the SQL Server Utility](https://docs.microsoft.com/en-us/sql/database-engine/troubleshoot-the-sql-server-utility) -- [Common Issues: Licensing Errors](https://www.sentryone.com/blog/georgeboakye/common-issues-licensing-errors +- [Common Issues: Licensing Errors](https://www.sentryone.com/blog/georgeboakye/common-issues-licensing-errors) - [SQL Server 2016 Distributed Replay Errors](https://www.sqlskills.com/blogs/jonathan/sql-server-2016-distributed-replay-errors/) - [The Instance ID MSSQLSERVER Is Already In Use](http://www.sqlservercentral.com/articles/MSSQLSERVER/161398/) - [SQL Server: Detach/Attach Gotchas!](https://sqljana.wordpress.com/2018/04/08/sql-server-detach-attach-gotchas/) From 555fe7a06a36c3f8c0c8a70a5adeeba54de4baa9 Mon Sep 17 00:00:00 2001 From: Jeff Belina Date: Thu, 25 Aug 2022 11:13:24 -0500 Subject: [PATCH 503/553] revert table of content changes made by vscode --- SSMS/SSMS_Tips.md | 76 +++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/SSMS/SSMS_Tips.md b/SSMS/SSMS_Tips.md index 25c487fa..01f6acaa 100644 --- a/SSMS/SSMS_Tips.md +++ b/SSMS/SSMS_Tips.md @@ -18,41 +18,47 @@ Most tips works for SSMS higher 2008 but some of them only works for SSMS 2016 a - [ ] [Starting SSMS with a specific connection and script file](http://dbamastery.com/tips/ssms-cmdline-utility/) **Table of Content**: -- [SQL Server Management Studio Tips](#sql-server-management-studio-tips) - - [Road map](#road-map) - - [1. Import and Export Settings](#1-import-and-export-settings) - - [2. SSMS Shortcuts](#2-ssms-shortcuts) - - [3. Keyboard Shortcuts for Favorite Stored Procedures and Scripts](#3-keyboard-shortcuts-for-favorite-stored-procedures-and-scripts) - - [Some useful shortcuts for `sp_WhoIsActive` from Kevin Feasel](#some-useful-shortcuts-for-sp_whoisactive-from-kevin-feasel) - - [4. SSMS Scripting Option](#4-ssms-scripting-option) - - [Script any object with data](#script-any-object-with-data) - - [The Default Scripting Option](#the-default-scripting-option) - - [5. Selecting a block of text using the ALT Key](#5-selecting-a-block-of-text-using-the-alt-key) - - [6. Script Table and Column Names by Dragging from Object Explorer](#6-script-table-and-column-names-by-dragging-from-object-explorer) - - [7. Disable Copy of Empty Text](#7-disable-copy-of-empty-text) - - [8. Client Statistics](#8-client-statistics) - - [9. Configure Object Explorer to Script Compression and Partition Schemes for Indexes](#9-configure-object-explorer-to-script-compression-and-partition-schemes-for-indexes) - - [10. Using GO X to Execute a Batch or Statement Multiple Times](#10-using-go-x-to-execute-a-batch-or-statement-multiple-times) - - [11. SSMS Template Replacement](#11-ssms-template-replacement) - - [12. Color coding of connections](#12-color-coding-of-connections) - - [13. SQLCMD mode](#13-sqlcmd-mode) - - [14. Script multiple objects using the Object Explorer Details Windows](#14-script-multiple-objects-using-the-object-explorer-details-windows) - - [15. Registered Servers / Central Management Server](#15-registered-servers--central-management-server) - - [16. Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar](#16-splitting-the-query-window-and-annotations-and-map-mode-for-vertical-scroll-bar) - - [17. Moving columns in the results pane](#17-moving-columns-in-the-results-pane) - - [18. Generating Charts and Drawings in SQL Server Management Studio](#18-generating-charts-and-drawings-in-sql-server-management-studio) - - [19. Additional Connection Parameters](#19-additional-connection-parameters) - - [20. Working with tabs headers](#20-working-with-tabs-headers) - - [21. Hiding tables in SSMS Object Explorer](#21-hiding-tables-in-ssms-object-explorer) - - [22. UnDock Tabs and Windows for Multi Monitor Support](#22-undock-tabs-and-windows-for-multi-monitor-support) - - [23. RegEx-Based Finding and Replacing of Text in SSMS](#23-regex-based-finding-and-replacing-of-text-in-ssms) - - [24. Changing what SSMS opens on startup](#24-changing-what-ssms-opens-on-startup) - - [25. Modifying New Query Template](#25-modifying-new-query-template) - - [26. Query Execution Options](#26-query-execution-options) - - [27. SQL Server Diagnostics Extension](#27-sql-server-diagnostics-extension) - - [28. Connect to SQL Servers in another domain using Windows Authentication](#28-connect-to-sql-servers-in-another-domain-using-windows-authentication) - - [Solution 1: runas](#solution-1-runas) - - [40. Reference:](#40-reference) +1. [Import and Export Settings](#1) +2. [SSMS Shortcuts](#2) +3. [Keyboard Shortcuts for Favorite Stored Procedures and Scripts](#3) +4. [SSMS Scripting Option](#4) +5. [Selecting a block of text using the ALT Key](#5) +6. [Script Table and Column Names by Dragging from Object Explorer](#6) +7. [Disable Copy of Empty Text](#7) +8. [Client Statistics](#8) +9. [Configure Object Explorer to Script Compression and Partition Schemes for Indexes](#9) +10. [Using GO X to Execute a Batch or Statement Multiple Times](#10) +11. [SSMS Template Replacement](#11) +12. [Color coding of connections](#12) +13. [SQLCMD mode](#13) +14. [Script multiple objects using the Object Explorer Details Windows](#14) +15. [Registered Servers / Central Management Server](#15) +16. [Splitting the Query Window and Annotations and Map Mode for Vertical Scroll Bar](#16) +17. [Moving columns in the results pane](#17) +18. [Generating Charts and Drawings in SQL Server Management Studio](#18) +19. [Additional Connection Parameters](#19) +20. [Working with tabs headers](#20) +21. [Hiding tables in SSMS Object Explorer](#21) +22. [UnDock Tabs and Windows for Multi Monitor Support](#22) +23. [RegEx-Based Finding and Replacing of Text in SSMS](#23) +24. [Changing what SSMS opens on startup](#24) +25. [Modifying New Query Template](#25) +26. [Query Execution Options](#26) +27. [SQL Server Diagnostics Extension](#27) +28. [Connect to SQL Servers in another domain using Windows Authentication](#28) +29. [SSMS Default Reports](#29) +30. [Live Query Statistics](#30) +31. [Searching in Showplan](#31) +32. [Object Explore Details](#32) +33. [Working with Azure SQL](#33) +34. [Using Extended Events and Profiler in SSMS](#34) +35. [Vulnerability Assessment in SSMS](#35) +36. [Import Flat File to SQL Wizard](#36) +37. [AutoRecover in SSMS](#37) +38. [View and query Power BI .pbix files in SSMS](#38) +39. [Using SSMS to analyze Power BI with XMLA](#39) +40. [SSMS shortcut to comment/uncomment a specific part of the query](#40) +41. [Reference](#reference) **Great thanks to**: From 2e059164102889aa504ea458a64a0484431f6d4b Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sat, 27 Aug 2022 09:19:20 -0500 Subject: [PATCH 504/553] Added script to find tables with matching columns by name --- .../Compare_Tables_With_Matching_Columns.sql | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Scripts/Compare_Tables_With_Matching_Columns.sql diff --git a/Scripts/Compare_Tables_With_Matching_Columns.sql b/Scripts/Compare_Tables_With_Matching_Columns.sql new file mode 100644 index 00000000..0d04af51 --- /dev/null +++ b/Scripts/Compare_Tables_With_Matching_Columns.sql @@ -0,0 +1,129 @@ +/* + + Find all matching column names between tables. Useful for exploring databases with implied relationships but no foreign keys. + 1 data set: temp table #results. + No + Tom Barrett + 2022-08-27 + 2022-08-27 by Tom Barrett + 1.0 + +*/ + +SET NOCOUNT ON; + +/* create staging objects */ +IF object_id('tempdb..#tablesToQuery') IS NOT NULL +BEGIN + DROP TABLE #tablesToQuery +END + +CREATE TABLE #tablesToQuery ( + DatabaseName NVARCHAR(1000) + , SchemaName NVARCHAR(1000) + , TableName NVARCHAR(1000) + , IsProcessed BIT DEFAULT 0 + ) +GO + +IF object_id('tempdb..#results') IS NOT NULL +BEGIN + DROP TABLE #results +END + +CREATE TABLE #results ( + DatabaseName NVARCHAR(1000) + , ColumnName NVARCHAR(1000) + , Table1 NVARCHAR(1000) + , Table2 NVARCHAR(1000) + ) +GO + +/* get list of tables */ +INSERT INTO #tablesToQuery ( + DatabaseName + , SchemaName + , TableName + ) +SELECT TABLE_CATALOG + , TABLE_SCHEMA + , TABLE_NAME +FROM INFORMATION_SCHEMA.TABLES +ORDER BY TABLE_CATALOG + , TABLE_SCHEMA + , TABLE_NAME +GO + +/* loop through tables and get matching columns by name */ +DECLARE @x INT = 1; +DECLARE @table NVARCHAR(1000); + +WHILE @x <= ( + SELECT count('dracula') + FROM #tablesToQuery + WHERE IsProcessed = 0 + ) +BEGIN + /* get next table*/ + SELECT TOP 1 @table = TableName + FROM #tablesToQuery + WHERE IsProcessed = 0; + + /* insert into #results any tables + columns that match */ + WITH cte + AS ( + SELECT TABLE_CATALOG + , TABLE_SCHEMA + , TABLE_NAME + , COLUMN_NAME + FROM INFORMATION_SCHEMA.COLUMNS + ) + INSERT INTO #results + SELECT cte1.TABLE_CATALOG + , cte1.COLUMN_NAME + , CONCAT ( + cte1.TABLE_SCHEMA + , '.' + , cte1.TABLE_NAME + ) + , CONCAT ( + cte2.TABLE_SCHEMA + , '.' + , cte2.TABLE_NAME + ) + FROM cte AS cte1 + JOIN cte AS cte2 ON cte1.TABLE_CATALOG = cte2.TABLE_CATALOG + AND cte1.TABLE_SCHEMA collate Latin1_general_CI_AI = cte2.TABLE_SCHEMA collate Latin1_general_CI_AI /* remove this line to search different schemas*/ + AND cte1.TABLE_NAME collate Latin1_general_CI_AI <> cte2.TABLE_NAME collate Latin1_general_CI_AI + AND cte1.COLUMN_NAME collate Latin1_general_CI_AI = cte2.COLUMN_NAME collate Latin1_general_CI_AI + WHERE cte1.TABLE_NAME = @table + /* add any other irrelevant or metadata columns to exclude */ + AND cte1.COLUMN_NAME collate Latin1_general_CI_AI NOT IN ( + 'ID' + , 'ACTIVE' + , 'CREATEDBY' + , 'ETC.' + ) + + UPDATE #tablesToQuery + SET IsProcessed = 1 + WHERE TableName = @table; +END + +/* return results */ +SELECT * +FROM #results +/* uncomment this line to search results for a specific table */ +/* WHERE Table1 = 'Schema.Table' */ +ORDER BY ColumnName + , Table1 + , Table2 +GO + +/* clean up */ +DROP TABLE #results +GO + +DROP TABLE #tablesToQuery +GO + From 138fd5665839587063efd2e4e329221bdd2001d1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 29 Aug 2022 10:34:40 +0300 Subject: [PATCH 505/553] Update INFORMATION_SCHEMA recommendation --- SQL Server Name Convention and T-SQL Programming Style.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index d8f28195..4529fe22 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -344,7 +344,6 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Avoid using [Cross-Database Queries](https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/cross-database-queries) because it increase backup/restore complexity (you restore one database, then realise you don’t have log backups to bring the other database to the same point in time). Also Azure SQL Database does not support cross-database queries and you can not migrate into in future. - Use `temp` tables to reduce network trafic, decrease query complexity and also to get better estimates for modification queries. More details [here](https://www.brentozar.com/archive/2020/04/how-to-get-better-estimates-for-modification-queries/). - `INFORMATION_SCHEMA` views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the `sys.objects` catalog view. - When more than one logical operator is used always use parentheses, even when they are not required. This can improve the readability of queries, and reduce the chance of making a subtle mistake because of operator precedence. There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide#logical-operator-precedence). @@ -468,8 +467,8 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Do not use a scalar user-defined function (UDF) in a `JOIN` condition, `WHERE` search condition, or in a `SELECT` list, unless the function is [schema-bound](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices). More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/misuse-scalar-user-defined-function-constant-pe017). - For scalar function use [`WITH SCHEMABINDING`](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices) option to get a performance boost. More details [here](https://bertwagner.com/2018/12/04/two-words-for-faster-scalar-functions/) - - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. - The only reliable way to find the schema of a object is to query the [`sys.objects`](https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-objects-transact-sql) catalog view. + - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. + The only reliable way to find the schema of a object is to query the [`sys.objects`](https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-objects-transact-sql) catalog view. [`INFORMATION_SCHEMA`] does not represent every possible state of the objects in SQL. For example, [`filtered indexes`](https://docs.microsoft.com/en-us/sql/relational-databases/indexes/create-filtered-indexes). The [`INFORMATION_SCHEMA`] are incomplete. More details [here](https://github.com/MicrosoftDocs/sql-docs/issues/4188). - Do not use explicit transactions for DML and DDL especially for reorganize index because the locking behavior of this statemnets becomes more restrictive. More details [here](https://github.com/MicrosoftDocs/sql-docs/pull/4011). From ffa4725c9292b2682e2b2dcc40be58bffbfa6c0c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 29 Aug 2022 10:36:59 +0300 Subject: [PATCH 506/553] Fix function-recommendation href --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 4529fe22..3e532ae1 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -467,7 +467,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Do not use a scalar user-defined function (UDF) in a `JOIN` condition, `WHERE` search condition, or in a `SELECT` list, unless the function is [schema-bound](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices). More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/misuse-scalar-user-defined-function-constant-pe017). - For scalar function use [`WITH SCHEMABINDING`](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices) option to get a performance boost. More details [here](https://bertwagner.com/2018/12/04/two-words-for-faster-scalar-functions/) - - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. + - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. The only reliable way to find the schema of a object is to query the [`sys.objects`](https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-objects-transact-sql) catalog view. [`INFORMATION_SCHEMA`] does not represent every possible state of the objects in SQL. For example, [`filtered indexes`](https://docs.microsoft.com/en-us/sql/relational-databases/indexes/create-filtered-indexes). The [`INFORMATION_SCHEMA`] are incomplete. More details [here](https://github.com/MicrosoftDocs/sql-docs/issues/4188). - Do not use explicit transactions for DML and DDL especially for reorganize index because the locking behavior of this statemnets becomes more restrictive. From c8279796b7d6232b26b1ce515dba2907d94a2fb6 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 29 Aug 2022 10:53:30 +0300 Subject: [PATCH 507/553] Another hyperlink fix --- SQL Server Name Convention and T-SQL Programming Style.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 3e532ae1..5f01ff49 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -467,7 +467,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. - Do not use a scalar user-defined function (UDF) in a `JOIN` condition, `WHERE` search condition, or in a `SELECT` list, unless the function is [schema-bound](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices). More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/misuse-scalar-user-defined-function-constant-pe017). - For scalar function use [`WITH SCHEMABINDING`](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices) option to get a performance boost. More details [here](https://bertwagner.com/2018/12/04/two-words-for-faster-scalar-functions/) - - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. + - Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object. The only reliable way to find the schema of a object is to query the [`sys.objects`](https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-objects-transact-sql) catalog view. [`INFORMATION_SCHEMA`] does not represent every possible state of the objects in SQL. For example, [`filtered indexes`](https://docs.microsoft.com/en-us/sql/relational-databases/indexes/create-filtered-indexes). The [`INFORMATION_SCHEMA`] are incomplete. More details [here](https://github.com/MicrosoftDocs/sql-docs/issues/4188). - Do not use explicit transactions for DML and DDL especially for reorganize index because the locking behavior of this statemnets becomes more restrictive. @@ -492,7 +492,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. SELECT @nvcmaxVariable; ``` More details [here](https://themondaymorningdba.wordpress.com/2018/09/13/them-concatenatin-blues/). - - Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`: + - Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`: ```tsql /* bad */ DECLARE @myBadVarcharVariable varchar; From 3fa02ddf040014e8496f9019eb72fc22b170a497 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 30 Aug 2022 14:55:04 +0300 Subject: [PATCH 508/553] Update TSQL Format Code tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f20a902..07e1c5ea 100644 --- a/README.md +++ b/README.md @@ -555,12 +555,12 @@ BIML Bloggers ## TSQL Format Code - [SQLinform Online](https://sqlinform.azurewebsites.net) + - [SQLinform Online](https://www.sqlinform.com) - [Instant SQL Formatter](http://www.dpriver.com/pp/sqlformat.htm) - http://poorsql.com/ - http://www.architectshack.com/PoorMansTSqlFormatter.ashx - http://www.ssmstoolspack.com/ - http://www.devart.com/dbforge/sql/sqlcomplete/ - - http://www.sql-format.com/ - http://www.apexsql.com/sql_tools_refactor.aspx - http://stackoverflow.com/questions/401928/sql-formatter-for-sql-management-studio From bdc60a9a8b715b006bce86cb72c1222432940048 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 18 Oct 2022 15:48:11 +0300 Subject: [PATCH 509/553] Update deprecated features info --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07e1c5ea..b962f4fc 100644 --- a/README.md +++ b/README.md @@ -253,9 +253,12 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Darling Data - The Best SQL Server Training On The Internet?](https://learn.erikdarlingdata.com/) (by Erik Darling) - [W3Resource SQL Exercises, Practice, Solution](https://www.w3resource.com/sql-exercises/) (by w3resource) - [LinkedIn SQL Server cources](https://www.linkedin.com/learning/search?entityType=COURSE&keywords=sql%20server) (by LinkedIn) - - SQL Server Backwards Compatibility - - [2017 Backwards Compatibility](https://docs.microsoft.com/en-us/sql/database-engine/sql-server-database-engine-backward-compatibility) - - [2016 Backwards Compatibility](https://docs.microsoft.com/en-us/sql/database-engine/sql-server-database-engine-backward-compatibility) + - SQL Server Deprecated database engine features and Backwards Compatibility + - [Deprecated Features in SQL Server Replication](https://learn.microsoft.com/en-us/sql/relational-databases/replication/deprecated-features-in-sql-server-replication?view=sql-server-ver16) + - [Deprecated database engine features in SQL Server 2022](https://learn.microsoft.com/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver16) + - [Deprecated database engine features in SQL Server 2019](https://learn.microsoft.com/sql/database-engine/deprecated-database-engine-features-in-sql-server-2019?view=sql-server-ver16) + - [Deprecated database engine features in SQL Server 2017](https://learn.microsoft.com/sql/database-engine/deprecated-database-engine-features-in-sql-server-2017?view=sql-server-ver16) + - [Deprecated database engine features in SQL Server 2016](https://learn.microsoft.com/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver16) - [2014 Backwards Compatibility](https://docs.microsoft.com/en-us/sql/getting-started/backward-compatibility?view=sql-server-2014) - [2012 Backwards Compatibility](https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2012/ms143532(v=sql.110)) - [2008 R2 Backwards Compatibility](https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/cc707787(v=sql.105)) @@ -554,8 +557,8 @@ BIML Bloggers ## TSQL Format Code - - [SQLinform Online](https://sqlinform.azurewebsites.net) - - [SQLinform Online](https://www.sqlinform.com) + - [SQLinform Online Web](https://sqlinform.azurewebsites.net) + - [SQLinform Online Utility](https://www.sqlinform.com) - [Instant SQL Formatter](http://www.dpriver.com/pp/sqlformat.htm) - http://poorsql.com/ - http://www.architectshack.com/PoorMansTSqlFormatter.ashx From c6b05b3eb18dde0caec595096be9a72ee0b47104 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 19 Oct 2022 14:45:13 +0300 Subject: [PATCH 510/553] Add sqlfacts.com --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b962f4fc..901565f8 100644 --- a/README.md +++ b/README.md @@ -485,6 +485,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL cheat sheet for PostgreSQL and Oracle](https://www.pcwdld.com/sql-cheat-sheet) (by Marc Wilson) - [Bllitz Excel UI](https://1pro.bi/blitz-excel-ui/) (by Alex) - [Industry-specific Data Models - cover Subject Areas and are used to create Enterprise Data Models](http://www.databaseanswers.org/data_models/) + - [SQLFacts - A powerful suite of FREE TSQL tools for SQL Server database professionals](https://www.sqlfacts.com) **[⬆ back to top](#table-of-contents)** From 5b779da84abb9c73ecbead245d1a5498c1578628 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 2 Dec 2022 15:56:52 +0300 Subject: [PATCH 511/553] Replace 8099 flag to 8101 Thanks Danilo Zocco https://github.com/ktaranov/sqlserver-kit/issues/211 --- SQL Server Trace Flag.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 1a8291a4..197ffdc8 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -82,6 +82,7 @@ Source links: - Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) - Wilfred van Dijk - Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) +- Danilo Zocco (https://github.com/CrazySwimmer) @@ -3988,10 +3989,10 @@ Link: https://blogs.msdn.microsoft.com/sqlreleaseservices/sql-server-2012-servic Link: [Hidden Performance & Manageability Improvements in SQL Server 2012 / 2014]
Link: [KB2964518]
Scope: global only - - - -#### Trace Flag: 8099 + + + +#### Trace Flag: 8101 Function: Enables a spinlock contention fix for high-end systems running SQL Server 2019 (15.x) serving many concurrent users.
Note: This trace flag applies to SQL Server 2019 (15.x) CU2 and higher builds.
Link: https://support.microsoft.com/kb/4538688
From e1d8a5d2a6aa21b0b1329e26d8cafb7d3575c33f Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Wed, 11 Jan 2023 18:58:39 +0300 Subject: [PATCH 512/553] Add SQL Server security best practices link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 901565f8..db3dc914 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Biggest data breaches in history](https://www.comparitech.com/blog/information-security/biggest-data-breaches-in-history/) (by Dave Albaugh) - [Microsoft SQL Server Permissions Posters](https://github.com/Microsoft/sql-server-samples/tree/master/samples/features/security/permissions-posters) - [Module Signing Info](https://modulesigning.info/) - Info and resources related to module signing (i.e. Certificates, Asymmetric Keys, `ADD SIGNATURE`, etc) in T-SQL and SQLCLR + - [SQL Server security best practices](https://learn.microsoft.com/en-us/sql/relational-databases/security/sql-server-security-best-practices) (by Microsoft) - Free Videos - [Youtube Brent Ozar](https://www.youtube.com/user/BrentOzar/videos) - [Youtube Free SQL Server Statisctics Class](https://www.youtube.com/playlist?list=PLDYqU5RH_aX05ajDAH-6sYXr4i1Mjh9lT) From b1ba27d5601815d1c086b242278fd7c3440dd0c9 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 13 Feb 2023 16:15:29 +0300 Subject: [PATCH 513/553] Add SQL training links --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index db3dc914..2b383dfe 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Murder Mystery](https://github.com/NUKnightLab/sql-mysteries) (by NUKnightLab) - [SQL Murder Mystery with answers](https://github.com/erika-e/sql-mysteries) (by Erika Pullum) - [SQL Problems and solutions](http://www.sql-tutorial.ru/en) (by S. I. Moiseenko) + - [Advanced T-SQL Puzzles](https://github.com/smpetersgithub/AdvancedSQLPuzzles) (by Scott Peters) + - [Leetcode SQL Problems](https://leetcode.com/problemset/database/) - Paid - [Lynda Courses](http://www.lynda.com/SQL-Server-training-tutorials/456-0.html) - [Veeam Free Courses](https://go.veeam.com/microsoft-sql-series-webinars.html) From fde7e96cad95e88b7bf7e13b410bfb5b9d11d1b6 Mon Sep 17 00:00:00 2001 From: Michael Salim Date: Tue, 7 Mar 2023 00:40:56 +0000 Subject: [PATCH 514/553] Update databaseanswers.org link to web archive and add dbschemalibrary --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b383dfe..06944ff1 100644 --- a/README.md +++ b/README.md @@ -487,7 +487,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [SQL Assessment API rules in .csv format](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/DefaultRuleset.csv) (by Microsoft) - [SQL cheat sheet for PostgreSQL and Oracle](https://www.pcwdld.com/sql-cheat-sheet) (by Marc Wilson) - [Bllitz Excel UI](https://1pro.bi/blitz-excel-ui/) (by Alex) - - [Industry-specific Data Models - cover Subject Areas and are used to create Enterprise Data Models](http://www.databaseanswers.org/data_models/) + - [Industry-specific Data Models - cover Subject Areas and are used to create Enterprise Data Models](https://web.archive.org/web/20220330034214/http://databaseanswers.org/data_models/) + - [Library of Database Schemas](https://dbschemalibrary.com/) - [SQLFacts - A powerful suite of FREE TSQL tools for SQL Server database professionals](https://www.sqlfacts.com) **[⬆ back to top](#table-of-contents)** From 78f4aad545ec783295dcd85ee5e36907c5b8694c Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 10 Apr 2023 18:04:25 +0300 Subject: [PATCH 515/553] Add Azure_Synapse_Toolbox --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06944ff1..77daa828 100644 --- a/README.md +++ b/README.md @@ -428,7 +428,8 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [sp_Develop - can be used by database developers, software developers and for performing database code (smell) reviews.s](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment) (by Kevin Martin) - [DBA Dash - Performance monitoring tool for SQL Server](https://github.com/trimble-oss/dba-dash) (by Trimble) - [lowlydba.sqlserver - A cross-platform Ansible collection using PowerShell to configure and maintain SQL Server](https://github.com/lowlydba/lowlydba.sqlserver) - (by John McCall) - - [SQLWatch - SQLWATCH is an Open Source and completely free SQL Server Monitoring project](https://sqlwatch.io/) + - [SQLWatch - SQLWATCH is an Open Source and completely free SQL Server Monitoring project](https://sqlwatch.io/) (by Marcin Gminski) + - [Azure_Synapse_Toolbox - Repository of tools/queries for managing and monitoring Azure Synapse](https://github.com/microsoft/Azure_Synapse_Toolbox) (by Microsoft) - Other - [SQL# SQLCLR functions](https://sqlsharp.com/) (by Sql Quantum Lift) - [SQL Server Latch Classes Library](https://www.sqlskills.com/help/latches/) (by Paul S. Randal) From cb7cc44caaa4fb4a5062880a239b0cf6099c9995 Mon Sep 17 00:00:00 2001 From: Orestes Date: Tue, 27 Jun 2023 20:53:47 +0100 Subject: [PATCH 516/553] Update dbo.sp_RestoreGene.sql --- Stored_Procedure/dbo.sp_RestoreGene.sql | 2573 +++++++++++++++-------- 1 file changed, 1650 insertions(+), 923 deletions(-) diff --git a/Stored_Procedure/dbo.sp_RestoreGene.sql b/Stored_Procedure/dbo.sp_RestoreGene.sql index 7bea9b5d..f9a3051e 100644 --- a/Stored_Procedure/dbo.sp_RestoreGene.sql +++ b/Stored_Procedure/dbo.sp_RestoreGene.sql @@ -1,26 +1,61 @@ USE [master] GO IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_RestoreGene') -EXEC ('CREATE PROC dbo.sp_RestoreGene AS SELECT 1') +EXEC ('CREATE PROC dbo.sp_RestoreGene AS SELECT ''stub version, to be replaced''') GO - + /********************************************************************************************* -Restore Generator v4.3 (2014-10-03) +Restore Generator v8.3 (2022-04-11) (C) 2012, Paul Brewer - + Feedback: paulbrewer@yahoo.co.uk -Updates: https://paulbrewer.wordpress.com/ - +User Guide: https://restoregene.com + This procedure queries msdb database backup history and database file details in master. -It builds and returns RESTORE DATABASE commands as it's result set, it does not execute the commands. - +It builds and returns RESTORE DATABASE commands as its result set, it does not execute the commands. + +---------------------------------------------------------------------------------------------- +PARAMETERS: + +@Database - Default NULL, Restore a specific database or a list of comma seperated database names, NULL which restores all user databases. +@TargetDatabase - Defaults to NULL, override restored database name, only possible if restoring one specific database, if supplied will rename database files and log file too. +@WithMoveDataFiles - Defaults to the actual data file paths, overrides WITH MOVE for data file folder +@WithMoveLogFile - Defaults to the actual log file path, overrides WITH MOVE for log file folder +@WithMoveFileStreamFile - Defaults to the actual file stream file path, overrides WITH MOVE for file stream file folder +@FromFileFullUNC - Defaults to actual backup file drive and folder, UNC path to full backup file +@FromFileDiffUNC - Defaults to actual drive and folder, UNC path to differential backup file +@FromFileLogUNC - Defaults to actual drive and folder, UNC path to log backup files +@StopAt - Defaults to current (datetime2), Stop At a specific date time +@StandbyMode - Defaults to 0, Leave database in standby mode +@IncludeSystemDBs - Defaults to 0, include master, model and msdb database restores +@WithRecovery - Defaults to 0, Recover database(s) after restore +@WithCHECKDB - Defaults to 0, Include a CHECKDB after recovery +@WithReplace - Defaults to 0, replace existing database when no tail log backup exists +@LogShippingStartTime - Only used by ps_RestoreGene +@LogShippingLastLSN - Only used by ps_RestoreGene +@BlobCredential - Defaults to NULL, SQL Credential for Azure Blog Storage Account +@RestoreScriptReplaceThis - Defaults to NULL, Restore Script String Find +@RestoreScriptWithThis - Defaults to NULL, Restore Script String Replace +@SuppressWithMove - Default 1, Exclude WITH MOVE statements from the Restore Script +@PivotWithMove - Default 0, If SuppressWithMove = 0, pivot secondary files to new rows in the result set +@RestoreScriptOnly - Default 0, Return just the RESTORE DATABASE commands +@DropDatabaseAfterRestore - Default 0, Drops the database after the restore, use with check db +@SetSingleUser - Default 0, Adds ALTER DATABASE @database SET SINGLE_USER WITH ROLLBACK IMMEDIATE +@ExcludeDiffAndLogBackups - Default 0, 0=full+diff+ log, 1=full only, 2-full+diff, 3=full+log, 4=diff+log +@IncludeDeviceType7 - Defaults to 1, Include device type 7 backups in restore script +@IncludeDeviceType102 - Defaults to 1, Include device type 102 backups in restore script +@IncludeDeviceType2 - Defaults to 1, Include device type 2 backups in restore script +@IncludeDeviceType9 - Defaults to 1, Include device type 9 backups in restore script + +---------------------------------------------------------------------------------------------- CHANGE LOG: + December 23, 2012 - V1.01 - Release -January 4,2013 - V1.02 - LSN Checks + Bug fix to STOPAT date format -January 11,2013 - V1.03 - SQL Server 2005 compatibility (backup compression problem) & @StandbyMode +January 4, 2013 - V1.02 - LSN Checks + Bug fix to STOPAT date format +January 11, 2013 - V1.03 - SQL Server 2005 compatibility (backup compression problem) & @StandbyMode January 14, 2013 - V1.04 - WITH COPY and up to 10 striped backup files January 15, 2013 - V1.05 - Format of constructed restore script, enclose database name in [ ] -February 7, 2013 - V1.06 - Modified WHERE device_type IN (7,102,2) +February 7, 2013 - V1.06 - Modified WHERE device_type IN (7,102,2,9) May 26, 2013 - V1.07 - Various changes for PoSh Driver Script compatibility October 14, 2013 - V1.08 - Rename parameters, more meaningful names October 15, 2013 - V2.00 - Add 2nd CTE for striped backup files and remove repeating calls to CTE @@ -28,11 +63,11 @@ November 5, 2013 - V2.01 - Secondary .ndf files only included if @WithMoveDat - Extended artificial LSN used for sequencing WITH RECOVERY/CHECKDB to 21 characters - Include database name in results for logging in PoSh May 23, 2014 - V3.0 - Improved logging and error handling, add 'LogShippingVariableDeclare' parameter - Default is Yes when called from query analysier, set to No when called by PoSh + Default is Yes when called from query analyser, set to No when called by PoSh May 30, 2014 - V3.1 - Restructured CTE, all predicates moved to the CTE June 6, 2014 - V3.2 - Add 'LogShippingStartTime' parameter for PowerShell script. To skip subsequent full and diff backups when restoring Logs in PoSh log shipping mode - - Add 'Target Restore Database Name' parameter, Manuj Bahl suggestion + - Add 'Target Restore Database Name' parameter If restoring a specific database, allows overriding restored name Probably used in conjunction with a @WithMove override of data and log files to a different folder. - Add LogShippingLastLSN parameter, used to filter results sent to ps_LogShippingLight @@ -45,24 +80,94 @@ August 5, 2014 - V3.4 - Remove TRY CATCH blocks from log restores and chec - Remove CTE's,use #temp tables, suggested by S.Stresser August 25, 2014 - V3.5 - goestock suggestion - Include device type 7 for AWS EC2 backups August 29th, 2014 - V3.6 - Richard found and fixed a problem with variable declare where database name has a space or full stop. -July 28, 2015 - V3.7 - Luke Sarro, modifications for case sensitivity & parameter sniffing +July 28, 2015 - V3.7 - Luke Sarro, modifications for case sensitivity & parameter sniffing, a massive amount of work done. August 28, 2015 - V3.8 - Luke Sarro modifications, recovery fork management. supports forking in recovery plans when constructing a restore script. Only tested where a single fork exists, IE a restore was done to a historic point in time, with recovery, then subsequent log backups are taken. When a fork exists the restore script will follow the new path for subsequent differential and log backups taken after the forking point. If no rbackup forks exist, the procedure works as before. -September 02 2015 - V3.9 - SQLMongo modification to replace hyphens in database name -September 04, 2015 - V4.0 - Domingo modification, check for default backup path = '' +September 02 2015 - V3.9 - SQLMongo modification to replace hyphens in database name +September 04, 2015 - V4.0 - Domingo modification, check for default backup path = '' September 29, 2015 - V4.2 - Fixes bug identifying full backups taken after a recovery fork, has introduced code duplication to be removed later but fixes problem -October 3, 2015 - V4.3 - Remove code duplication introduced in V4.2 +October 3, 2015 - V4.3 - Remove code duplication introduced in V4.2 +* +June 3rd, 2016 - V5.0 - Feedback from Brent Ozar related viewing spike: + - V5.0 - Reintroduce SQL Server 2005 compatibility - Bob McLaren - Declaring and assigning variables on same line doesn't work with SQL Server 2005. + - V5.0 - Override data and log file paths if overriding restored database name + +June 11th, 2016 - V5.1 - Azure http url restore support, mick@sqlfairy.com + - V5.1 - Restore Script find and replacement variables, mick@sqlfairy.com + +June 17th, 2016 - V5.2 - Removed TRY CATCH block in log restore commands +June 26th, 2016 - V5.3 - Include FILESTREAM files in WITH MOVE, jgkiran +July 3rd, 2016 - V5.4 - New parameter for FILESTREAM files, for WITH MOVE parameter, jgkiran +July 14rd, 2016 - V5.5 - Rename rollback files when standby = 1 to allow multiple concurrent ps_RestoreGene invocations, jgkiran + +August 8th, 2016 - V5.6 - Accepts a comma separated variable list of databases to restore, suggested Stephen T + - Got permission to reuse the 'SELECT DATABASES' code snippet from ola hallengren - https://ola.hallengren.com/ +August 8th, 2016 - V5.7 - Make restore to new database, secondary file names, more meaningful +August 9th, 2016 - V5.8 - Include the WITH MOVE statements on the same results line as the corresponding RESTORE DATABASE statement, flatten the result set to simplify the PoSh driver +August 9th, 2016 - V5.9 - New Parameter, suppress WITH MOVE statements is default, parameter allows override to include them in the script. + +August 13th, 2016 - V6.0 + - Add parameter option to pivot WITH MOVE secondary files to a new result set line. Not compatible with PoSh driver, useful with large, complex databases. + - Add a parameter option to include just the restore script in the result set. Not compatible with PoSh driver, useful as SQL Agent Job step output. + +August 14th, 2016 - V6.1 - Remove parameter @UseDefaultDatabaseBackupPath , no longer used +August 15th, 2016 - V6.2 - @TargetDatabase parameter, file rename tidy +August 17th, 2016 - V6.3 - Edge case fix to fork point LSN +August 19th, 2016 - V6.4 - Publish SQL Server Central +September 4th, 2016 - V6.41 - PoSh Driver Last LSN minor fix. - Published SQL Server Central +September 9th, 2016 - V6.42 - Fix for multiple log files with move, J.Peablles +September 9th, 2016 - V6.43 - Fix for mirrored backups, C.Richardson +September 9th, 2016 - V6.44 - Mod to log file LSN selection, include if matches diff, R.Devries +September 30th, 2016 - V6.45 - Improvements to the output generated when @RestoreScriptOnly = 1, John Lee +September 30th, 2016 - V6.5 - New 'Drop Database After Restore' parameter for use with CHECKDB and automated backup verification, John Lee + +November 5th, 2016 - V6.51 - Increase length of @Database parameter to allow for more comma seperated database names +November 5th, 2016 - V6.52 - Edge case log exclusion criteria mod, R.Devries +November 5th, 2016 - V6.53 - New parameter option to include ALTER DATABASE @database SET SINGLE_USER WITH ROLLBACK IMMEDIATE, Hakan Ekman +November 5th, 2016 - V6.54 - New parameter option to exclude differential and log backups (presumaby for development environment refreshes), Mehedi Amin + +November 19th, 2016 - V6.55 - Remove semi colon from start of T-SQL restore command strings, serves no purpose +November 19th, 2016 - V6.56 - Remove variable declare, log reference and RAISERROR, serves no purpose and generates an error in edge cases ( my_database and my-database ), Lars Rasmussen +November 19th, 2016 - V6.57 - Parameters options for device types to include, Lars Rasmussen + +December 3rd, 2016 - V6.58 - Remove TIME function from STANDBY mode file name construct, for SQL Server 2005 compatibility, Erwin Louwerse +March 26th, 2017 - V6.59 - Significant performance improvements where an instance has many databases, Simone Bizzotto + +June 24th, 2017 - V6.70 - Case Sensitive Collation Database Compatibility - M.Pollock +September 9th, 2017 - V6.71 - Device Type filter fix, LostInEurope01 +November 11th, 2017 - V6.72 - Mod to log file selection, R.Devries + - Increase @Databases variable length, Bob +Febuary 14th, 2018 - V6.73 - Add escape characters to database name in SET SINGLE_USER, Rod +Febuary 16th, 2018 - V7.0 - Increase support for stripped backup files from 10 to 15, Mehedi +Febuary 17th, 2018 - V8.0 - Extensive changes to the backup fork handling, Mike +March 30th, 2018 - V8.04 - Code refactor +May 25th, 2018 - V8.05 - Missing exclusion of copy only backups reintroduced - Andy +August 25th, 2018 - V8.10 - Enhancements to the @ExcludeDiffAndLogBackups parameters, Bob and Chris F + - Change from parameter data type from bit to int + - 0 (default) = full, diff and logs, 1 = full only, 2 = full and diff, 3 = full and logs + - Existing BIT data type functionality retained and extended by new values 2 and 3. +November 8th, 2018 - V8.11 - Bug fix to last log file - Mike +December 6th, 2018 - V8.12 - Optimisation and environment setup fix - Adam +January 12th, 2019 - V8.13 - Sequence of FROM DISK = 'Stripe' files in RESTORE command +January 3rd, 2021 - V8.14 - Restore from Azure blog storage using FROM DISK instead of FROM URL for backup stripes - Aaron +January 9rd, 2021 - V8.15 - Change parameter @ExcludeDiffAndLogBackups, new option 4 to exclude full restore, return incremental diff & log restores - Mehedi Amin +July 11th, 2021 - V8.16 - Add support for an additional 5 stripes bring the total supported to 20, Steven Dannen +April 5th, 2023 - V8.2 - Masood : Bug fix restoring striped backups +April 11th, 2023 - V8.3 - Aaron : Result Set Columns fix + + +* ********************************************************************************************/ - - -ALTER PROC dbo.sp_RestoreGene + +ALTER PROC [dbo].[sp_RestoreGene] ( - @Database SYSNAME = NULL, + @Database VARCHAR(MAX) = NULL, @TargetDatabase SYSNAME = NULL, @WithMoveDataFiles VARCHAR(2000) = NULL, @WithMoveLogFile VARCHAR(2000) = NULL, + @WithMoveFileStreamFile VARCHAR(2000) = NULL, @FromFileFullUNC VARCHAR(2000) = NULL, @FromFileDiffUNC VARCHAR(2000) = NULL, @FromFileLogUNC VARCHAR(2000) = NULL, @@ -72,934 +177,1556 @@ ALTER PROC dbo.sp_RestoreGene @WithRecovery BIT = 0, @WithCHECKDB BIT = 0, @WithReplace BIT = 0, - @UseDefaultDatabaseBackupPath BIT = 0, - @Log_Reference VARCHAR (250) = NULL, - @LogShippingVariableDeclare BIT = 1, + + -- Parameters for PowerShell script use only @LogShippingStartTime DATETIME = NULL, - @LogShippingLastLSN VARCHAR(25) = NULL + @LogShippingLastLSN VARCHAR(25) = NULL, + -- Parameters for PowerShell script use only + + @BlobCredential VARCHAR(255) = NULL, --Credential used for Azure blob access + @RestoreScriptReplaceThis NVARCHAR(255) = NULL, + @RestoreScriptWithThis NVARCHAR(255) = NULL, + @SuppressWithMove BIT = 1, + @PivotWithMove BIT = 0, + @RestoreScriptOnly BIT = 0, + @DropDatabaseAfterRestore BIT = 0, + @SetSingleUser BIT = 0, + @ExcludeDiffAndLogBackups INT = 0, + + -- Options to exclude device types + @IncludeDeviceType7 BIT = 0, --virtual device + @IncludeDeviceType102 BIT = 1, + @IncludeDeviceType2 BIT = 1, + @IncludeDeviceType9 BIT = 1 ) AS BEGIN - -SET NOCOUNT ON; - --- Avoid Parameter Sniffing Problems -DECLARE @Database_ SYSNAME = @Database, - @TargetDatabase_ SYSNAME = @TargetDatabase, - @WithMoveDataFiles_ VARCHAR(2000) = @WithMoveDataFiles, - @WithMoveLogFile_ VARCHAR(2000) = @WithMoveLogFile, - @FromFileFullUNC_ VARCHAR(2000) = @FromFileFullUNC, - @FromFileDiffUNC_ VARCHAR(2000) = @FromFileDiffUNC, - @FromFileLogUNC_ VARCHAR(2000) = @FromFileLogUNC, - @StopAt_ DATETIME = @StopAt, - @StandbyMode_ BIT = @StandbyMode, - @IncludeSystemDBs_ BIT = @IncludeSystemDBs, - @WithRecovery_ BIT = @WithRecovery, - @WithCHECKDB_ BIT = @WithCHECKDB, - @WithReplace_ BIT = @WithReplace, - @UseDefaultDatabaseBackupPath_ BIT = @UseDefaultDatabaseBackupPath, - @Log_Reference_ VARCHAR (250) = @Log_Reference, - @LogShippingVariableDeclare_ BIT = @LogShippingVariableDeclare, - @LogShippingStartTime_ DATETIME = @LogShippingStartTime, - @LogShippingLastLSN_ VARCHAR(25) = @LogShippingLastLSN - --- Defaults Recovery Point Times -IF ISNULL(@StopAt_,'') = '' - SET @StopAt_ = GETDATE(); - -IF ISNULL(@LogShippingStartTime_,'') = '' - SET @LogShippingStartTime_ = @StopAt_; - --- Default written to the SQL Server Error Log -IF ISNULL(@Log_Reference_,'') = '' - SET @Log_Reference_ = 'sp_RestoreGene - Recovery in Progress'; - --- Allow override of restored database name only if working with a specific database -IF @TargetDatabase_ IS NOT NULL AND @Database_ IS NULL - SET @TargetDatabase_ = NULL; - --- ps_LogShippingLight - Filtered Results -IF ISNULL(@LogShippingLastLSN_,'') = '' - SET @LogShippingLastLSN_ = '-1'; - --- Backup file locations defaulted to '' by ps_RestoreGene -IF @FromFileFullUNC_ = '' - SET @FromFileFullUNC_ = NULL; - -IF @FromFileDiffUNC_ = '' - SET @FromFileDiffUNC_ = NULL; - -IF @FromFileLogUNC_ = '' - SET @FromFileLogUNC_ = NULL; - --- Environment Preparation -IF OBJECT_ID('tempdb..#CTE') IS NOT NULL - DROP TABLE #CTE; - -IF OBJECT_ID('tempdb..#Stripes') IS NOT NULL - DROP TABLE #Stripes; - --- Backup forking -IF OBJECT_ID('tempdb..#BackupFork') IS NOT NULL - DROP TABLE #BackupFork; - -SELECT rf1.database_name, MAX(database_backup_lsn) database_backup_lsn, MAX(fork_point_lsn) fork_point_lsn, MAX(last_lsn) last_lsn -INTO #BackupFork -FROM msdb.dbo.backupset rf1 -INNER JOIN -( - SELECT database_name, MAX(backup_finish_date) AS backup_finish_date - FROM msdb.dbo.backupset - WHERE backup_start_date <= @LogShippingStartTime_ - AND fork_point_lsn IS NULL - GROUP BY database_name -) rf2 - ON rf1.database_name = rf2.database_name - -WHERE fork_point_lsn IS NOT NULL -AND rf1.backup_start_date <= @LogShippingStartTime_ -AND rf1.backup_finish_date > rf2.backup_finish_date -GROUP BY rf1.database_name; - -CREATE INDEX IDX_BackupFork ON #BackupFork(database_name); - - --------------------------------------------------------------- --- CTE1 Full Backup UNION Differential Backup UNION Log Backup --------------------------------------------------------------- -WITH CTE -( - database_name - ,current_compatibility_level - ,last_lsn - ,current_is_read_only - ,current_state_desc - ,current_recovery_model_desc - ,has_backup_checksums - ,backup_size - ,[type] - ,backupmediasetid - ,family_sequence_number - ,backupstartdate - ,physical_device_name - ,position -) -AS -( - --------------------------------------------------------------- --- Full backup - Most current immediately before @LogShippingStartTime_ -SELECT - bs.database_name - ,d.[compatibility_level] AS current_compatibility_level - ,bs.last_lsn - ,d.[is_read_only] AS current_is_read_only - ,d.[state_desc] AS current_state_desc - ,d.[recovery_model_desc] current_recovery_model_desc - ,bs.has_backup_checksums - ,bs.backup_size AS backup_size - ,'D' AS [type] - ,bs.media_set_id AS backupmediasetid - ,mf.family_sequence_number - ,x.backup_start_date AS backupstartdate - ,mf.physical_device_name - ,bs.position -FROM msdb.dbo.backupset bs - -INNER JOIN sys.databases d - ON bs.database_name = d.name - -INNER JOIN -( + + SET NOCOUNT ON; + + -- Avoid Parameter Sniffing Problems + DECLARE @Database_ VARCHAR(MAX); + SET @Database_ = @Database; + DECLARE @TargetDatabase_ SYSNAME; + SET @TargetDatabase_ = @TargetDatabase; + + -- Special handling for PoSh Driver + DECLARE @WithMoveDataFiles_ VARCHAR(2000); + IF @WithMoveDataFiles <> '' SET @WithMoveDataFiles_= @WithMoveDataFiles; + DECLARE @WithMoveLogFile_ VARCHAR(2000); + IF @WithMoveLogFile <> '' SET @WithMoveLogFile_= @WithMoveLogFile; + DECLARE @WithMoveFileStreamFile_ VARCHAR(2000); + IF @WithMoveFileStreamFile <> '' SET @WithMoveFileStreamFile_= @WithMoveFileStreamFile; + + DECLARE @FromFileFullUNC_ VARCHAR(2000); + SET @FromFileFullUNC_ = @FromFileFullUNC; + DECLARE @FromFileDiffUNC_ VARCHAR(2000); + SET @FromFileDiffUNC_ = @FromFileDiffUNC; + DECLARE @FromFileLogUNC_ VARCHAR(2000); + SET @FromFileLogUNC_ = @FromFileLogUNC; + DECLARE @StopAt_ DATETIME; + SET @StopAt_ = @StopAt; + DECLARE @StandbyMode_ BIT; + SET @StandbyMode_ = @StandbyMode; + DECLARE @IncludeSystemDBs_ BIT; + SET @IncludeSystemDBs_ = @IncludeSystemDBs; + DECLARE @WithRecovery_ BIT; + SET @WithRecovery_ = @WithRecovery; + DECLARE @WithCHECKDB_ BIT; + SET @WithCHECKDB_ = @WithCHECKDB; + DECLARE @WithReplace_ BIT; + SET @WithReplace_ = @WithReplace; + DECLARE @LogShippingStartTime_ DATETIME; + SET @LogShippingStartTime_ = @LogShippingStartTime; + DECLARE @LogShippingLastLSN_ VARCHAR(25); + SET @LogShippingLastLSN_ = @LogShippingLastLSN; + DECLARE @BlobCredential_ VARCHAR(255); + SET @BlobCredential_ = @BlobCredential; + DECLARE @RestoreScriptReplaceThis_ NVARCHAR(255); + SET @RestoreScriptReplaceThis_ = @RestoreScriptReplaceThis; + DECLARE @RestoreScriptWithThis_ NVARCHAR(255); + SET @RestoreScriptWithThis_ = @RestoreScriptWithThis; + DECLARE @SuppressWithMove_ BIT; + SET @SuppressWithMove_ = @SuppressWithMove; + DECLARE @PivotWithMove_ BIT + SET @PivotWithMove_ = @PivotWithMove; + DECLARE @RestoreScriptOnly_ BIT; + SET @RestoreScriptOnly_ = @RestoreScriptOnly; + DECLARE @DropDatabaseAfterRestore_ BIT; + SET @DropDatabaseAfterRestore_ = @DropDatabaseAfterRestore; + DECLARE @SetSingleUser_ BIT; + SET @SetSingleUser_ = @SetSingleUser; + DECLARE @ExcludeDiffAndLogBackups_ INT; + SET @ExcludeDiffAndLogBackups_ = @ExcludeDiffAndLogBackups; + + -- Defaults Recovery Point Times + IF ISNULL(@StopAt_,'') = '' + SET @StopAt_ = GETDATE(); + + IF ISNULL(@LogShippingStartTime_,'') = '' + SET @LogShippingStartTime_ = @StopAt_; + + -- Allow override of restored database name only if working with a specific database + IF @TargetDatabase_ IS NOT NULL AND @Database_ IS NULL + SET @TargetDatabase_ = NULL; + + IF CHARINDEX(',',@Database_, 1) > 0 + SET @TargetDatabase_ = NULL; + + -- ps_LogShippingLight - Filtered Results + IF ISNULL(@LogShippingLastLSN_,'') = '' + SET @LogShippingLastLSN_ = '-1'; + + -- Present WITH MOVE if override paths are supplied + IF ISNULL(@WithMoveDataFiles,'') <> '' OR ISNULL(@WithMoveLogFile_,'') <> '' OR ISNULL(@WithMoveFileStreamFile_,'') <> '' OR ISNULL(@TargetDatabase_,'') <> '' + SET @SuppressWithMove_ = 0 + + -- Backup file locations defaulted to '' by ps_RestoreGene + IF @FromFileFullUNC_ = '' + SET @FromFileFullUNC_ = NULL; + + IF @FromFileDiffUNC_ = '' + SET @FromFileDiffUNC_ = NULL; + + IF @FromFileLogUNC_ = '' + SET @FromFileLogUNC_ = NULL; + + -- Environment Preparation + IF OBJECT_ID('tempdb..#CTE') IS NOT NULL + DROP TABLE #CTE; + + IF OBJECT_ID('tempdb..#Stripes') IS NOT NULL + DROP TABLE #Stripes; + + IF OBJECT_ID('tempdb..#BackupFork') IS NOT NULL + DROP TABLE #BackupFork; + + IF OBJECT_ID('tempdb..#ForkPointsCount') IS NOT NULL + DROP TABLE #ForkPointsCount; + + IF OBJECT_ID('tempdb..#RestoreGeneResults') IS NOT NULL + DROP TABLE #RestoreGeneResults; + + IF OBJECT_ID('tempdb..#tmpDatabases') IS NOT NULL + DROP TABLE #tmpDatabases; + + IF OBJECT_ID('tempdb..#DeviceTypes') IS NOT NULL + DROP TABLE #DeviceTypes; + + IF OBJECT_ID('tempdb..#FullBackups') IS NOT NULL + DROP TABLE #FullBackups; + + CREATE TABLE #DeviceTypes (device_type tinyint); + IF @IncludeDeviceType7 = 1 INSERT INTO #DeviceTypes (device_type) SELECT 7; + IF @IncludeDeviceType102 = 1 INSERT INTO #DeviceTypes (device_type) SELECT 102; + IF @IncludeDeviceType2 = 1 INSERT INTO #DeviceTypes (device_type) SELECT 2; + IF @IncludeDeviceType9 = 1 INSERT INTO #DeviceTypes (device_type) SELECT 9; + + --======================================================================================================================================= + -- 'SELECT DATABASES' code snippet used below with permission from the ola hallengren - https://ola.hallengren.com/ + ----------------------------------------------------------------------------------------------------------------------------------------- + CREATE TABLE #tmpDatabases + ( + ID int IDENTITY, + DatabaseName nvarchar(450), + DatabaseNameFS nvarchar(max), + DatabaseType nvarchar(max), + Selected bit, + Completed bit + ); + CREATE CLUSTERED INDEX IDX_tmpDatabases ON #tmpDatabases(DatabaseName); + + IF CHARINDEX(',',@Database_,1) > 0 + BEGIN + + DECLARE @SelectedDatabases TABLE + ( + DatabaseName nvarchar(max), + DatabaseType nvarchar(max), + Selected bit + ); + + DECLARE @ErrorMessage nvarchar(max); + DECLARE @Error int; + + ---------------------------------------------------------------------------------------------------- + --// Select databases //-- + ---------------------------------------------------------------------------------------------------- + + SET @Database_ = REPLACE(@Database_, ', ', ','); + + WITH Databases1 (StartPosition, EndPosition, DatabaseItem) AS + ( + SELECT 1 AS StartPosition, + ISNULL(NULLIF(CHARINDEX(',', @Database_, 1), 0), LEN(@Database_) + 1) AS EndPosition, + SUBSTRING(@Database_, 1, ISNULL(NULLIF(CHARINDEX(',', @Database_, 1), 0), LEN(@Database_) + 1) - 1) AS DatabaseItem + WHERE @Database_ IS NOT NULL + UNION ALL + SELECT CAST(EndPosition AS int) + 1 AS StartPosition, + ISNULL(NULLIF(CHARINDEX(',', @Database_, EndPosition + 1), 0), LEN(@Database_) + 1) AS EndPosition, + SUBSTRING(@Database_, EndPosition + 1, ISNULL(NULLIF(CHARINDEX(',', @Database_, EndPosition + 1), 0), LEN(@Database_) + 1) - EndPosition - 1) AS DatabaseItem + FROM Databases1 + WHERE EndPosition < LEN(@Database_) + 1 + ), + Databases2 (DatabaseItem, Selected) AS + ( + SELECT CASE WHEN DatabaseItem LIKE '-%' THEN RIGHT(DatabaseItem,LEN(DatabaseItem) - 1) ELSE DatabaseItem END AS DatabaseItem, + CASE WHEN DatabaseItem LIKE '-%' THEN 0 ELSE 1 END AS Selected + FROM Databases1 + ), + Databases3 (DatabaseItem, DatabaseType, Selected) AS + ( + SELECT CASE WHEN DatabaseItem IN('ALL_DATABASES','SYSTEM_DATABASES','USER_DATABASES') THEN '%' ELSE DatabaseItem END AS DatabaseItem, + CASE WHEN DatabaseItem = 'SYSTEM_DATABASES' THEN 'S' WHEN DatabaseItem = 'USER_DATABASES' THEN 'U' ELSE NULL END AS DatabaseType, + Selected + FROM Databases2 + ), + Databases4 (DatabaseName, DatabaseType, Selected) AS + ( + SELECT CASE WHEN LEFT(DatabaseItem,1) = '[' AND RIGHT(DatabaseItem,1) = ']' THEN PARSENAME(DatabaseItem,1) ELSE DatabaseItem END AS DatabaseItem, + DatabaseType, + Selected + FROM Databases3 + ) + INSERT INTO @SelectedDatabases (DatabaseName, DatabaseType, Selected) + SELECT DatabaseName, + DatabaseType, + Selected + FROM Databases4 + OPTION (MAXRECURSION 0) + + INSERT INTO #tmpDatabases (DatabaseName, DatabaseNameFS, DatabaseType, Selected, Completed) + SELECT [name] AS DatabaseName, + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE([name],'\',''),'/',''),':',''),'*',''),'?',''),'"',''),'<',''),'>',''),'|',''),' ','') AS DatabaseNameFS, + CASE WHEN name IN('master','msdb','model') THEN 'S' ELSE 'U' END AS DatabaseType, + 0 AS Selected, + 0 AS Completed + FROM sys.databases + WHERE [name] <> 'tempdb' + AND source_database_id IS NULL + ORDER BY [name] ASC + + UPDATE tmpDatabases + SET tmpDatabases.Selected = SelectedDatabases.Selected + FROM #tmpDatabases tmpDatabases + INNER JOIN @SelectedDatabases SelectedDatabases + ON tmpDatabases.DatabaseName LIKE REPLACE(SelectedDatabases.DatabaseName,'_','[_]') + AND (tmpDatabases.DatabaseType = SelectedDatabases.DatabaseType OR SelectedDatabases.DatabaseType IS NULL) + WHERE SelectedDatabases.Selected = 1 + + UPDATE tmpDatabases + SET tmpDatabases.Selected = SelectedDatabases.Selected + FROM #tmpDatabases tmpDatabases + INNER JOIN @SelectedDatabases SelectedDatabases + ON tmpDatabases.DatabaseName LIKE REPLACE(SelectedDatabases.DatabaseName,'_','[_]') + AND (tmpDatabases.DatabaseType = SelectedDatabases.DatabaseType OR SelectedDatabases.DatabaseType IS NULL) + WHERE SelectedDatabases.Selected = 0 + + IF @Database_ IS NULL OR NOT EXISTS(SELECT * FROM @SelectedDatabases) OR EXISTS(SELECT * FROM @SelectedDatabases WHERE DatabaseName IS NULL OR DatabaseName = '') + BEGIN + SET @ErrorMessage = 'The value for the parameter @Databases is not supported.' + CHAR(13) + CHAR(10) + ' ' + RAISERROR(@ErrorMessage,16,1) WITH NOWAIT + SET @Error = @@ERROR + END + + END + + --======================================================================================================================================= + -- Full Backups - Last before stop at for each database SELECT - a.database_name - ,MAX(a.backup_start_date) backup_start_date + a.database_name + ,MAX(a.backup_finish_date) AS backup_finish_date + INTO #FullBackups FROM msdb.dbo.backupset a JOIN msdb.dbo.backupmediafamily b - ON a.media_set_id = b.media_set_id - - LEFT OUTER JOIN #BackupFork c - ON c.database_name = a.database_name - + ON a.media_set_id = b.media_set_id + WHERE a.[type] = 'D' - AND device_type IN (7,102,2) + AND (a.database_name IN (SELECT DatabaseName FROM #tmpDatabases WHERE Selected = 1) OR @Database_ IS NULL OR a.database_name = @Database_) + AND device_type IN (SELECT device_type FROM #DeviceTypes) AND a.is_copy_only = 0 + AND b.mirror = 0 AND a.backup_start_date <= @LogShippingStartTime_ - - -- Recovery Forking - AND ISNULL(c.fork_point_lsn,a.database_backup_lsn) >= a.database_backup_lsn - AND ((c.fork_point_lsn IS NOT NULL AND a.database_backup_lsn < c.database_backup_lsn) OR c.fork_point_lsn IS NULL) - - GROUP BY a.database_name - -) x - ON x.database_name = bs.database_name - AND x.backup_start_date = bs.backup_start_date - -JOIN msdb.dbo.backupmediafamily mf - ON mf.media_set_id = bs.media_set_id - AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number - -WHERE bs.type = 'D' -AND mf.physical_device_name NOT IN ('Nul', 'Nul:') - -UNION - --------------------------------------------------------------- --- Differential backup, most current immediately before @StopAt_ -SELECT - bs.database_name - ,d.[compatibility_level] AS current_compatibility_level - ,bs.last_lsn - ,d.[is_read_only] AS current_is_read_only - ,d.[state_desc] AS current_state_desc - ,d.[recovery_model_desc] current_recovery_model_desc - ,bs.has_backup_checksums - ,bs.backup_size AS backup_size - ,'I' AS [type] - ,bs.media_set_id AS backupmediasetid - ,mf.family_sequence_number - ,x.backup_start_date AS backupstartdate - ,mf.physical_device_name - ,bs.position -FROM msdb.dbo.backupset bs - -INNER JOIN sys.databases d - ON bs.database_name = d.name - + GROUP BY a.database_name; -INNER JOIN -- Last Full in recovery fork before STOPAT -( --------------------------------------------- - SELECT - a.database_name - ,MAX(a.backup_start_date) backup_start_date - FROM msdb.dbo.backupset a + CREATE INDEX IDX_FullBackups ON #FullBackups(database_name); + + --======================================================================================================================================= + -- Backup forking (suppress differential, log file select criteria) + SELECT bs.database_name, first_recovery_fork_guid, MIN(fork_point_lsn) AS fork_point_lsn + INTO #BackupFork + FROM msdb.dbo.backupset bs JOIN msdb.dbo.backupmediafamily b - ON a.media_set_id = b.media_set_id - - LEFT OUTER JOIN #BackupFork c - ON c.database_name = a.database_name - - WHERE a.[type] = 'D' - AND device_type IN (7,102,2) - AND a.is_copy_only = 0 - AND a.backup_start_date <= @LogShippingStartTime_ - - -- Recovery Forking - AND ISNULL(c.fork_point_lsn,a.database_backup_lsn) >= a.database_backup_lsn - AND ((c.fork_point_lsn IS NOT NULL AND a.database_backup_lsn < c.database_backup_lsn) OR c.fork_point_lsn IS NULL) - - GROUP BY a.database_name --------------------------------------------- -) y - ON y.database_name = bs.database_name + ON bs.media_set_id = b.media_set_id + JOIN #FullBackups fb + ON fb.database_name = bs.database_name + WHERE fb.backup_finish_date < bs.backup_start_date + AND bs.backup_finish_date < @LogShippingStartTime_ + AND bs.first_recovery_fork_guid <> bs.last_recovery_fork_guid + GROUP BY bs.database_name, first_recovery_fork_guid; + + -- Only one fork point between the selected full backup and the stop at time supported + SELECT database_name, COUNT(*) AS ForkPoints + INTO #ForkPointsCount + FROM #BackupFork rh + GROUP BY database_name; + + --======================================================================================================================================= + -------------------------------------------------------------- + -- CTE1 Full Backup + -------------------------------------------------------------- + WITH CTE + ( + database_name + ,current_compatibility_level + ,first_lsn + ,last_lsn + ,fork_point_lsn + ,current_is_read_only + ,current_state_desc + ,current_recovery_model_desc + ,has_backup_checksums + ,backup_size + ,[type] + ,backupmediasetid + ,family_sequence_number + ,backupfinishdate + ,physical_device_name + ,position + ,first_recovery_fork_guid + ,last_recovery_fork_guid + ) + AS + ( + -------------------------------------------------------------- + -- Full backup - Most recent before @LogShippingStartTime_ + SELECT + bs.database_name + ,d.[compatibility_level] AS current_compatibility_level + ,bs.first_lsn + ,bs.last_lsn + ,bs.fork_point_lsn + ,d.[is_read_only] AS current_is_read_only + ,d.[state_desc] AS current_state_desc + ,d.[recovery_model_desc] current_recovery_model_desc + ,bs.has_backup_checksums + ,bs.backup_size AS backup_size + ,'D' AS [type] + ,bs.media_set_id AS backupmediasetid + ,mf.family_sequence_number + ,bs.backup_finish_date AS backupfinishdate + ,mf.physical_device_name + ,bs.position + ,bs.first_recovery_fork_guid + ,bs.last_recovery_fork_guid + + FROM msdb.dbo.backupset bs + + INNER JOIN sys.databases d + ON bs.database_name = d.name + + INNER JOIN #FullBackups fb + ON fb.database_name = bs.database_name + AND fb.backup_finish_date = bs.backup_finish_date + + JOIN msdb.dbo.backupmediafamily mf + ON mf.media_set_id = bs.media_set_id + AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number + + WHERE bs.type = 'D' + AND mf.mirror = 0 + AND mf.physical_device_name NOT IN ('Nul', 'Nul:') + AND bs.is_copy_only = 0 + + UNION + + -------------------------------------------------------------- + -- Differential backup, most current immediately before @StopAt_, suppress if backup fork points exist + SELECT + bs.database_name + ,d.[compatibility_level] AS current_compatibility_level + ,bs.first_lsn + ,bs.last_lsn + ,bs.fork_point_lsn + ,d.[is_read_only] AS current_is_read_only + ,d.[state_desc] AS current_state_desc + ,d.[recovery_model_desc] current_recovery_model_desc + ,bs.has_backup_checksums + ,bs.backup_size AS backup_size + ,'I' AS [type] + ,bs.media_set_id AS backupmediasetid + ,mf.family_sequence_number + ,bs.backup_finish_date AS backupfinishdate + ,mf.physical_device_name + ,bs.position + ,bs.first_recovery_fork_guid + ,bs.last_recovery_fork_guid + FROM msdb.dbo.backupset bs + + INNER JOIN sys.databases d + ON bs.database_name = d.name + + INNER JOIN #FullBackups fb + ON fb.database_name = bs.database_name + AND fb.backup_finish_date < bs.backup_finish_date + + INNER JOIN -- Last Diff before STOPAT / Suppress if backup forkpoints exist + ( + SELECT + a.database_name + ,MAX(backup_start_date) backup_start_date + FROM msdb.dbo.backupset a + JOIN msdb.dbo.backupmediafamily b + ON a.media_set_id = b.media_set_id + + WHERE a.[type] = 'I' + AND (a.database_name IN (SELECT DatabaseName FROM #tmpDatabases WHERE Selected = 1) OR @Database_ IS NULL OR a.database_name = @Database_) + AND device_type IN (SELECT device_type FROM #DeviceTypes) + AND a.is_copy_only = 0 + AND b.mirror = 0 + AND a.backup_start_date <= ISNULL(@StopAt_,GETDATE()) + GROUP BY a.database_name + ) x + ON x.database_name = bs.database_name + AND x.backup_start_date = bs.backup_start_date + + INNER JOIN msdb.dbo.backupmediafamily mf + ON mf.media_set_id = bs.media_set_id + AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number + + LEFT OUTER JOIN #BackupFork bf + ON bf.database_name = bs.database_name + + WHERE bs.type = 'I' + AND mf.physical_device_name NOT IN ('Nul', 'Nul:') + AND mf.mirror = 0 + AND @StopAt_ = @LogShippingStartTime_ + AND bf.fork_point_lsn IS NULL + + UNION + + -------------------------------------------------------------- + -- Log file backups - after 1st full / before @StopAt_ + SELECT + bs.database_name + ,d.[compatibility_level] AS current_compatibility_level + ,bs.first_lsn + ,bs.last_lsn + ,bs.fork_point_lsn + ,d.[is_read_only] AS current_is_read_only + ,d.[state_desc] AS current_state_desc + ,d.[recovery_model_desc] current_recovery_model_desc + ,bs.has_backup_checksums + ,bs.backup_size AS backup_size + ,'L' AS [type] + ,bs.media_set_id AS backupmediasetid + ,mf.family_sequence_number + ,bs.backup_finish_date as backupfinishdate + ,mf.physical_device_name + ,bs.position + ,bs.first_recovery_fork_guid + ,bs.last_recovery_fork_guid + FROM msdb.dbo.backupset bs + + INNER JOIN sys.databases d + ON bs.database_name = d.name + + INNER JOIN msdb.dbo.backupmediafamily mf + ON mf.media_set_id = bs.media_set_id + AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number + + INNER JOIN #FullBackups fb + ON bs.database_name = fb.database_name + + LEFT OUTER JOIN -- Select the first log file after STOPAT + ( + SELECT DISTINCT x.database_name, CASE WHEN y.last_Log_After_StopAt IS NULL THEN CONVERT(datetime, '31 Dec 2050') ELSE y.last_Log_After_StopAt END AS last_Log_After_StopAt + FROM msdb.dbo.backupset x + LEFT JOIN + ( + SELECT + database_name + ,MIN(backup_start_date) last_Log_After_StopAt + FROM msdb.dbo.backupset a + JOIN msdb.dbo.backupmediafamily b + ON a.media_set_id = b.media_set_id + WHERE a.[type] = 'L' + AND (a.database_name IN (SELECT DatabaseName FROM #tmpDatabases WHERE Selected = 1) OR @Database_ IS NULL OR a.database_name = @Database_) + AND b.mirror = 0 + AND device_type IN (SELECT device_type FROM #DeviceTypes) + AND a.backup_start_date > ISNULL(@StopAt_,'1 Jan, 1900') + GROUP BY database_name + ) y + ON x.database_name = y.database_name + ) x + ON bs.database_name = x.database_name + + LEFT OUTER JOIN #BackupFork bf + ON bf.database_name = bs.database_name + AND bf.first_recovery_fork_guid = bs.first_recovery_fork_guid + + WHERE bs.backup_start_date <= x.last_Log_After_StopAt -- Include 1st log after stop at + AND bs.backup_start_date >= fb.backup_finish_date -- Full backup finish + --AND bs.backup_finish_date <= @StopAt_ + AND (bs.database_name IN (SELECT DatabaseName FROM #tmpDatabases WHERE Selected = 1) OR @Database_ IS NULL OR bs.database_name = @Database_) + AND mf.physical_device_name NOT IN ('Nul', 'Nul:') + AND mf.mirror = 0 + AND bs.type = 'L' + AND device_type IN (SELECT device_type FROM #DeviceTypes) + AND (bf.fork_point_lsn > bs.first_lsn OR bf.first_recovery_fork_guid IS NULL OR bs.first_recovery_fork_guid <> bs.last_recovery_fork_guid) + ) + + SELECT * INTO #CTE FROM CTE; + CREATE INDEX IDX_CTE ON #CTE(database_name); + + -------------------------------------------------------------- + -- CTE2 Optionally, striped backup file details + -------------------------------------------------------------- + WITH Stripes + ( + database_name, + backupmediasetid, + family_sequence_number, + last_lsn, + S2_pdn, + S3_pdn, + S4_pdn, + S5_pdn, + S6_pdn, + S7_pdn, + S8_pdn, + S9_pdn, + S10_pdn, + S11_pdn, + S12_pdn, + S13_pdn, + S14_pdn, + S15_pdn, + --************************ + S16_pdn, + S17_pdn, + S18_pdn, + S19_pdn, + S20_pdn + --************************ + ) + AS + ( + SELECT + Stripe1.database_name, + Stripe1.backupmediasetid, + Stripe1.family_sequence_number, + Stripe1.last_lsn, + Stripe2.physical_device_name AS S2_pdn, + Stripe3.physical_device_name AS S3_pdn, + Stripe4.physical_device_name AS S4_pdn, + Stripe5.physical_device_name AS S5_pdn, + Stripe6.physical_device_name AS S6_pdn, + Stripe7.physical_device_name AS S7_pdn, + Stripe8.physical_device_name AS S8_pdn, + Stripe9.physical_device_name AS S9_pdn, + Stripe10.physical_device_name AS S10_pdn, + Stripe11.physical_device_name AS S11_pdn, + Stripe12.physical_device_name AS S12_pdn, + Stripe13.physical_device_name AS S13_pdn, + Stripe14.physical_device_name AS S14_pdn, + Stripe15.physical_device_name AS S15_pdn + --************************ + ,Stripe16.physical_device_name AS S16_pdn + ,Stripe17.physical_device_name AS S17_pdn + ,Stripe18.physical_device_name AS S18_pdn + ,Stripe19.physical_device_name AS S19_pdn + ,Stripe20.physical_device_name AS S20_pdn + --************************ + FROM #CTE AS Stripe1 + + LEFT OUTER JOIN #CTE AS Stripe2 + ON Stripe2.database_name = Stripe1.database_name + AND Stripe2.backupmediasetid = Stripe1.backupmediasetid + AND Stripe2.family_sequence_number = 2 + + LEFT OUTER JOIN #CTE AS Stripe3 + ON Stripe3.database_name = Stripe1.database_name + AND Stripe3.backupmediasetid = Stripe1.backupmediasetid + AND Stripe3.family_sequence_number = 3 + + LEFT OUTER JOIN #CTE AS Stripe4 + ON Stripe4.database_name = Stripe1.database_name + AND Stripe4.backupmediasetid = Stripe1.backupmediasetid + AND Stripe4.family_sequence_number = 4 + + LEFT OUTER JOIN #CTE AS Stripe5 + ON Stripe5.database_name = Stripe1.database_name + AND Stripe5.backupmediasetid = Stripe1.backupmediasetid + AND Stripe5.family_sequence_number = 5 + + LEFT OUTER JOIN #CTE AS Stripe6 + ON Stripe6.database_name = Stripe1.database_name + AND Stripe6.backupmediasetid = Stripe1.backupmediasetid + AND Stripe6.family_sequence_number = 6 + + LEFT OUTER JOIN #CTE AS Stripe7 + ON Stripe7.database_name = Stripe1.database_name + AND Stripe7.backupmediasetid = Stripe1.backupmediasetid + AND Stripe7.family_sequence_number = 7 + + LEFT OUTER JOIN #CTE AS Stripe8 + ON Stripe8.database_name = Stripe1.database_name + AND Stripe8.backupmediasetid = Stripe1.backupmediasetid + AND Stripe8.family_sequence_number = 8 + + LEFT OUTER JOIN #CTE AS Stripe9 + ON Stripe9.database_name = Stripe1.database_name + AND Stripe9.backupmediasetid = Stripe1.backupmediasetid + AND Stripe9.family_sequence_number = 9 + + LEFT OUTER JOIN #CTE AS Stripe10 + ON Stripe10.database_name = Stripe1.database_name + AND Stripe10.backupmediasetid = Stripe1.backupmediasetid + AND Stripe10.family_sequence_number = 10 + + LEFT OUTER JOIN #CTE AS Stripe11 + ON Stripe11.database_name = Stripe1.database_name + AND Stripe11.backupmediasetid = Stripe1.backupmediasetid + AND Stripe11.family_sequence_number = 11 + + LEFT OUTER JOIN #CTE AS Stripe12 + ON Stripe12.database_name = Stripe1.database_name + AND Stripe12.backupmediasetid = Stripe1.backupmediasetid + AND Stripe12.family_sequence_number = 12 + + LEFT OUTER JOIN #CTE AS Stripe13 + ON Stripe13.database_name = Stripe1.database_name + AND Stripe13.backupmediasetid = Stripe1.backupmediasetid + AND Stripe13.family_sequence_number = 13 + + LEFT OUTER JOIN #CTE AS Stripe14 + ON Stripe14.database_name = Stripe1.database_name + AND Stripe14.backupmediasetid = Stripe1.backupmediasetid + AND Stripe14.family_sequence_number = 14 + + LEFT OUTER JOIN #CTE AS Stripe15 + ON Stripe15.database_name = Stripe1.database_name + AND Stripe15.backupmediasetid = Stripe1.backupmediasetid + AND Stripe15.family_sequence_number = 15 -INNER JOIN -- Last Diff before STOPAT -( + --************************ + LEFT OUTER JOIN #CTE AS Stripe16 + ON Stripe16.database_name = Stripe1.database_name + AND Stripe16.backupmediasetid = Stripe1.backupmediasetid + AND Stripe16.family_sequence_number = 16 + + LEFT OUTER JOIN #CTE AS Stripe17 + ON Stripe17.database_name = Stripe1.database_name + AND Stripe17.backupmediasetid = Stripe1.backupmediasetid + AND Stripe17.family_sequence_number = 17 + + LEFT OUTER JOIN #CTE AS Stripe18 + ON Stripe18.database_name = Stripe1.database_name + AND Stripe18.backupmediasetid = Stripe1.backupmediasetid + AND Stripe18.family_sequence_number = 18 + + LEFT OUTER JOIN #CTE AS Stripe19 + ON Stripe19.database_name = Stripe1.database_name + AND Stripe19.backupmediasetid = Stripe1.backupmediasetid + AND Stripe19.family_sequence_number = 19 + + LEFT OUTER JOIN #CTE AS Stripe20 + ON Stripe20.database_name = Stripe1.database_name + AND Stripe20.backupmediasetid = Stripe1.backupmediasetid + AND Stripe20.family_sequence_number = 20 +-- ************************ + + ) + + SELECT * INTO #Stripes FROM Stripes; + + CREATE INDEX IDX_Stripes ON #Stripes(database_name); + + -------------------------------------------------------------- + -- Results, T-SQL RESTORE commands, below are based on CTE's above + -------------------------------------------------------------- + SELECT - a.database_name - ,MAX(backup_start_date) backup_start_date - FROM msdb.dbo.backupset a - JOIN msdb.dbo.backupmediafamily b - ON a.media_set_id = b.media_set_id - - LEFT OUTER JOIN #BackupFork c - ON c.database_name = a.database_name - - WHERE a.[type] = 'I' - AND device_type IN (7,102,2) - AND a.is_copy_only = 0 - AND a.backup_start_date <= ISNULL(@StopAt_,GETDATE()) - AND a.database_backup_lsn = ISNULL(c.database_backup_lsn,a.database_backup_lsn ) - AND a.last_lsn <= ISNULL(c.fork_point_lsn, a.last_lsn) - GROUP BY a.database_name - -) x - ON x.database_name = bs.database_name - AND x.backup_start_date = bs.backup_start_date - - -INNER JOIN msdb.dbo.backupmediafamily mf - ON mf.media_set_id = bs.media_set_id - AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number - -WHERE bs.type = 'I' -AND mf.physical_device_name NOT IN ('Nul', 'Nul:') -AND x.backup_start_date > y.backup_start_date -AND @StopAt_ = @LogShippingStartTime_ - -UNION - --------------------------------------------------------------- --- Log file backups - after 1st full / before @StopAt_ -SELECT - bs.database_name - ,d.[compatibility_level] AS current_compatibility_level - ,bs.last_lsn - ,d.[is_read_only] AS current_is_read_only - ,d.[state_desc] AS current_state_desc - ,d.[recovery_model_desc] current_recovery_model_desc - ,bs.has_backup_checksums - ,bs.backup_size AS backup_size - ,'L' AS [type] - ,bs.media_set_id AS backupmediasetid - ,mf.family_sequence_number - ,bs.backup_start_date as backupstartdate - ,mf.physical_device_name - ,bs.position - -FROM msdb.dbo.backupset bs - -INNER JOIN sys.databases d - ON bs.database_name = d.name - -INNER JOIN msdb.dbo.backupmediafamily mf - ON mf.media_set_id = bs.media_set_id - AND mf.family_sequence_number Between bs.first_family_number And bs.last_family_number - -INNER JOIN -- After the selected full backup -( + CASE WHEN @RestoreScriptReplaceThis_ IS NOT NULL AND @RestoreScriptWithThis_ IS NOT NULL THEN REPLACE(a.Command, @RestoreScriptReplaceThis_, @RestoreScriptWithThis_) ELSE a.Command END AS TSQL, --Allow substitution of a path + CONVERT(nvarchar(30), a.backupfinishdate, 126) + AS BackupDate, + a.BackupDevice, + a.first_lsn, + a.last_lsn, + a.fork_point_lsn, + a.first_recovery_fork_guid, + a.last_recovery_fork_guid, + a.database_name , + ROW_NUMBER() OVER(ORDER BY database_name, Sequence, a.backupfinishdate) AS SortSequence + INTO #RestoreGeneResults + FROM + ( + + -------------------------------------------------------------- + -- Most recent full backup + -------------------------------------------------------------- + SELECT - a.database_name - ,MAX(a.backup_start_date) backup_start_date - FROM msdb.dbo.backupset a - JOIN msdb.dbo.backupmediafamily b - ON a.media_set_id = b.media_set_id - - LEFT OUTER JOIN #BackupFork c - ON c.database_name = a.database_name - - WHERE a.[type] = 'D' - AND device_type IN (7,102,2) - AND a.is_copy_only = 0 - AND a.backup_start_date <= @LogShippingStartTime_ - - -- Recovery Forking - AND ISNULL(c.fork_point_lsn,a.database_backup_lsn) >= a.database_backup_lsn - AND ((c.fork_point_lsn IS NOT NULL AND a.database_backup_lsn < c.database_backup_lsn) OR c.fork_point_lsn IS NULL) - - GROUP BY a.database_name -) y - ON bs.database_name = y.database_name - -LEFT OUTER JOIN #BackupFork r - ON r.database_name = bs.database_name + + 'RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + CHAR(13) + + + CASE WHEN #CTE.physical_device_name LIKE 'http%' THEN ' FROM URL = N' ELSE ' FROM DISK = N' END + '''' + --Support restore from blob storage in Azure + + CASE ISNULL(@FromFileFullUNC_,'Actual') + WHEN 'Actual' THEN #CTE.physical_device_name + ELSE @FromFileFullUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) + END + '''' + SPACE(1) + CHAR(13) + + + -- Striped backup files + CASE ISNULL(#Stripes.S2_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S2_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S3_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S3_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S4_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S4_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S5_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S5_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S6_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S6_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S7_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S7_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S8_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S8_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S9_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S9_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S10_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S10_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S11_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S11_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S11_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S11_pdn,LEN(#Stripes.S11_pdn) - CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S12_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S12_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S12_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S12_pdn,LEN(#Stripes.S12_pdn) - CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S13_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S13_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S13_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S13_pdn,LEN(#Stripes.S13_pdn) - CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S14_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S14_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S14_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S14_pdn,LEN(#Stripes.S14_pdn) - CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S15_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S15_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S15_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S15_pdn,LEN(#Stripes.S15_pdn) - CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 1) END + '''' + END + + + --******* + + CASE ISNULL(#Stripes.S16_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S16_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S16_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S16_pdn,LEN(#Stripes.S16_pdn) - CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S17_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S17_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S17_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S17_pdn,LEN(#Stripes.S17_pdn) - CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S18_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S18_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S18_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S18_pdn,LEN(#Stripes.S18_pdn) - CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S19_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S19_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S19_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S19_pdn,LEN(#Stripes.S19_pdn) - CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S20_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S20_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S20_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S20_pdn,LEN(#Stripes.S20_pdn) - CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 1) END + '''' + END + -LEFT OUTER JOIN -- Select the first log file after STOPAT -( - SELECT DISTINCT x.database_name, database_backup_lsn, - CASE WHEN y.last_Log_After_StopAt IS NULL THEN CONVERT(datetime, '31 Dec 2050') ELSE y.last_Log_After_StopAt END AS last_Log_After_StopAt - FROM msdb.dbo.backupset x - LEFT JOIN + --****** + + ' WITH ' + + + CASE WHEN #CTE.physical_device_name LIKE 'http%' AND @BlobCredential_ IS NOT NULL THEN ' CREDENTIAL = ''' + @BlobCredential_ + ''', ' ELSE '' END + + + CASE ISNULL(@WithReplace_,0) WHEN 1 THEN 'REPLACE, ' ELSE '' END + 'FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + ',' + + CASE #CTE.has_backup_checksums WHEN 1 THEN 'CHECKSUM, ' ELSE ' ' END + + + CASE @StandbyMode_ WHEN 0 THEN 'NORECOVERY,' ELSE 'STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_' + REPLACE(REPLACE(SUBSTRING(CONVERT(VARCHAR(24),GETDATE(),127),12,12),':',''),'.','') + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + + + 'STATS=10' + SPACE(1) + + + CASE @SuppressWithMove_ WHEN 0 THEN + + ', MOVE N' + '''' + x.LogicalName + '''' + ' TO ' + + '''' + + CASE ISNULL(@WithMoveDataFiles_,'Actual') + WHEN 'Actual' THEN x.PhysicalName + ELSE @WithMoveDataFiles_ + SUBSTRING(x.PhysicalName,LEN(x.PhysicalName) - CHARINDEX('\',REVERSE(x.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(x.PhysicalName),1) + 1) + END + '''' + SPACE(1) + + + ', MOVE N' + '''' + y.LogicalName + '''' + ' TO ' + + '''' + + CASE ISNULL(@WithMoveLogFile_ ,'Actual') + WHEN 'Actual' THEN y.PhysicalName + ELSE @WithMoveLogFile_ + SUBSTRING(y.PhysicalName,LEN(y.PhysicalName) - CHARINDEX('\',REVERSE(y.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(y.PhysicalName),1) + 1) + END + '''' + ELSE ' ' + END + + AS Command, + 1 AS Sequence, + d.name AS database_name, + #CTE.physical_device_name AS BackupDevice, + #CTE.backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + #CTE.last_lsn, + #CTE.fork_point_lsn, + #CTE.first_recovery_fork_guid, + #CTE.last_recovery_fork_guid + + FROM sys.databases d + + INNER JOIN ( SELECT - database_name - ,MIN(backup_start_date) last_Log_After_StopAt - FROM msdb.dbo.backupset a - JOIN msdb.dbo.backupmediafamily b - ON a.media_set_id = b.media_set_id - WHERE a.[type] = 'L' - AND device_type IN (7,102,2) - AND a.backup_start_date > ISNULL(@StopAt_,'1 Jan, 1900') - GROUP BY database_name + DB_NAME(mf.database_id) AS name + ,CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN mf.Physical_Name ELSE SUBSTRING(mf.Physical_Name,1,CASE CHARINDEX('.',mf.Physical_Name) WHEN 0 THEN LEN(mf.Physical_Name) ELSE CHARINDEX('.',mf.Physical_Name) - 1 END) + '_' + @TargetDatabase_ + '.mdf' END AS PhysicalName + ,mf.Name AS LogicalName + FROM sys.master_files mf + WHERE type_desc = 'ROWS' + AND mf.file_id = 1 + ) x + ON d.name = x.name + + INNER JOIN + ( + SELECT + DB_NAME(mf.database_id) AS name, type_desc + ,CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN mf.Physical_Name ELSE SUBSTRING(mf.Physical_Name,1,CASE CHARINDEX('.',mf.Physical_Name) WHEN 0 THEN LEN(mf.Physical_Name) ELSE CHARINDEX('.',mf.Physical_Name) - 1 END) + '_' + @TargetDatabase_ + '.ldf' END AS PhysicalName + ,mf.Name AS LogicalName + FROM sys.master_files mf + + -- Fix for multiple log files/with moves + INNER JOIN + ( + SELECT database_id, MIN(file_id) AS logfile_id + FROM sys.master_files + WHERE type_desc = 'LOG' + GROUP BY database_id + ) logfileid + on logfileid.database_id = mf.database_id + AND logfileid.logfile_id = mf.file_id + WHERE type_desc = 'LOG' ) y - ON x.database_name = y.database_name -) x - ON bs.database_name = x.database_name - AND bs.database_backup_lsn = ISNULL(r.database_backup_lsn,bs.database_backup_lsn) - -WHERE bs.backup_start_date <= x.last_Log_After_StopAt -- Include 1st log after stop at -AND bs.backup_start_date >= y.backup_start_date -- After last full backup start date -AND bs.database_backup_lsn = ISNULL(r.database_backup_lsn,bs.database_backup_lsn) -- Recovery Fork -AND NOT (bs.first_lsn < ISNULL(r.fork_point_lsn,'99999999999999999') AND bs.last_lsn > ISNULL(r.fork_point_lsn,'00000000000000000') AND bs.last_lsn <> ISNULL(r.last_lsn,bs.last_lsn)) - + ON d.name = y.name + + LEFT OUTER JOIN #CTE + ON #CTE.database_name = d.name + AND #CTE.family_sequence_number = 1 + + INNER JOIN #Stripes + ON #Stripes.database_name = d.name + AND #Stripes.backupmediasetid = #CTE.backupmediasetid + AND #Stripes.last_lsn = #CTE.last_lsn + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND #CTE.family_sequence_number = 1 + AND ISNULL(fpc.ForkPoints,0) < 2 + AND @ExcludeDiffAndLogBackups_ IN (0,1,2,3) + + -------------------------------------------------------------- + -- Most recent differential backup + -------------------------------------------------------------- + UNION + + SELECT + + 'RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + CHAR(13) + + CASE WHEN #CTE.physical_device_name LIKE 'http%' THEN ' FROM URL = N' ELSE ' FROM DISK = N' END + '''' + + + CASE ISNULL(@FromFileDiffUNC_,'Actual') + WHEN 'Actual' THEN #CTE.physical_device_name + ELSE @FromFileDiffUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) + END + '''' + SPACE(1) + CHAR(13) + + + -- Striped backup files + CASE ISNULL(#Stripes.S2_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S2_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S3_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S3_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S4_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S4_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S5_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S5_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S6_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S6_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S7_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S7_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S8_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S8_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S9_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S9_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S10_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S10_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S11_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S11_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S11_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S11_pdn,LEN(#Stripes.S11_pdn) - CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S12_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S12_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S12_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S12_pdn,LEN(#Stripes.S12_pdn) - CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S13_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S13_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S13_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S13_pdn,LEN(#Stripes.S13_pdn) - CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S14_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S14_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S14_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S14_pdn,LEN(#Stripes.S14_pdn) - CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S15_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S15_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S15_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S15_pdn,LEN(#Stripes.S15_pdn) - CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 1) END + '''' + END + + + --************************** + + CASE ISNULL(#Stripes.S16_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S16_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S16_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S16_pdn,LEN(#Stripes.S16_pdn) - CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 1) END + '''' + END + + + + CASE ISNULL(#Stripes.S17_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S17_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S17_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S17_pdn,LEN(#Stripes.S17_pdn) - CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 1) END + '''' + END + + + + CASE ISNULL(#Stripes.S18_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S18_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S18_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S18_pdn,LEN(#Stripes.S18_pdn) - CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 1) END + '''' + END + + + + CASE ISNULL(#Stripes.S19_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S19_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S19_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S19_pdn,LEN(#Stripes.S19_pdn) - CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 1) END + '''' + END + + + + CASE ISNULL(#Stripes.S20_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S20_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S20_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S20_pdn,LEN(#Stripes.S20_pdn) - CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 1) END + '''' + END + + + --************************** + + ' WITH FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + ',' + + CASE #CTE.has_backup_checksums WHEN 1 THEN 'CHECKSUM, ' ELSE ' ' END + + + CASE WHEN #CTE.physical_device_name LIKE 'http%' AND @BlobCredential_ IS NOT NULL THEN ' CREDENTIAL = ''' + @BlobCredential_ + ''', ' ELSE '' END + + + CASE @StandbyMode_ WHEN 0 THEN 'NORECOVERY,' ELSE 'STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_' + REPLACE(REPLACE(SUBSTRING(CONVERT(VARCHAR(24),GETDATE(),127),12,12),':',''),'.','') + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + + + 'STATS=10' + SPACE(1) + + AS Command, + 750000 AS Sequence, + d.name AS database_name, + #CTE.physical_device_name AS BackupDevice, + #CTE.backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + #CTE.last_lsn, + #CTE.fork_point_lsn, + #CTE.first_recovery_fork_guid, + #CTE.last_recovery_fork_guid + + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + AND #CTE.family_sequence_number = 1 + + LEFT OUTER JOIN #Stripes + ON #Stripes.database_name = d.name + AND #Stripes.backupmediasetid = #CTE.backupmediasetid + AND #Stripes.last_lsn = #CTE.last_lsn + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'I' + AND #CTE.family_sequence_number = 1 + AND @ExcludeDiffAndLogBackups_ IN (0,2,4) + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- Log backups taken since most recent full or diff + -------------------------------------------------------------- + + SELECT + + 'RESTORE LOG [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + CHAR(13) + + + CASE WHEN #CTE.physical_device_name LIKE 'http%' THEN ' FROM URL = N' ELSE ' FROM DISK = N' END + '''' + + + CASE ISNULL(@FromFileLogUNC_,'Actual') + WHEN 'Actual' THEN #CTE.physical_device_name + ELSE @FromFileLogUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) + END + '''' + CHAR(13) + + + -- Striped backup files + CASE ISNULL(#Stripes.S2_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S2_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S3_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S3_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S4_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S4_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S5_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S5_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S6_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S6_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S7_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S7_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S8_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S8_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S9_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S9_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S10_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S10_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S11_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S11_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S11_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S11_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S11_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S12_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S12_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S12_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S12_pdn,LEN(#Stripes.S12_pdn) - CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S12_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S13_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S13_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S13_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S13_pdn,LEN(#Stripes.S13_pdn) - CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S13_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S14_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S14_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S14_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S14_pdn,LEN(#Stripes.S14_pdn) - CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S14_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S15_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S15_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S15_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S15_pdn,LEN(#Stripes.S15_pdn) - CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S15_pdn),1) + 1) END + '''' + END + -AND mf.physical_device_name NOT IN ('Nul', 'Nul:') -AND bs.type = 'L' -AND device_type IN (7,102,2) -) - -SELECT * INTO #CTE FROM CTE; -CREATE INDEX IDX_CTE ON #CTE(database_name); - --------------------------------------------------------------- --- CTE2 Optionally, striped backup file details --------------------------------------------------------------- -WITH Stripes -( - database_name, - backupmediasetid, - family_sequence_number, - last_lsn, - S2_pdn, - S3_pdn, - S4_pdn, - S5_pdn, - S6_pdn, - S7_pdn, - S8_pdn, - S9_pdn, - S10_pdn -) -AS -( -SELECT - Stripe1.database_name, - Stripe1.backupmediasetid, - Stripe1.family_sequence_number, - Stripe1.last_lsn, - Stripe2.physical_device_name AS S2_pdn, - Stripe3.physical_device_name AS S3_pdn, - Stripe4.physical_device_name AS S4_pdn, - Stripe5.physical_device_name AS S5_pdn, - Stripe6.physical_device_name AS S6_pdn, - Stripe7.physical_device_name AS S7_pdn, - Stripe8.physical_device_name AS S8_pdn, - Stripe9.physical_device_name AS S9_pdn, - Stripe10.physical_device_name AS S10_pdn -FROM #CTE AS Stripe1 - -LEFT OUTER JOIN #CTE AS Stripe2 - ON Stripe2.database_name = Stripe1.database_name - AND Stripe2.backupmediasetid = Stripe1.backupmediasetid - AND Stripe2.family_sequence_number = 2 - -LEFT OUTER JOIN #CTE AS Stripe3 - ON Stripe3.database_name = Stripe1.database_name - AND Stripe3.backupmediasetid = Stripe1.backupmediasetid - AND Stripe3.family_sequence_number = 3 - -LEFT OUTER JOIN #CTE AS Stripe4 - ON Stripe4.database_name = Stripe1.database_name - AND Stripe4.backupmediasetid = Stripe1.backupmediasetid - AND Stripe4.family_sequence_number = 4 - -LEFT OUTER JOIN #CTE AS Stripe5 - ON Stripe5.database_name = Stripe1.database_name - AND Stripe5.backupmediasetid = Stripe1.backupmediasetid - AND Stripe5.family_sequence_number = 5 - -LEFT OUTER JOIN #CTE AS Stripe6 - ON Stripe6.database_name = Stripe1.database_name - AND Stripe6.backupmediasetid = Stripe1.backupmediasetid - AND Stripe6.family_sequence_number = 6 - -LEFT OUTER JOIN #CTE AS Stripe7 - ON Stripe7.database_name = Stripe1.database_name - AND Stripe7.backupmediasetid = Stripe1.backupmediasetid - AND Stripe7.family_sequence_number = 7 - -LEFT OUTER JOIN #CTE AS Stripe8 - ON Stripe8.database_name = Stripe1.database_name - AND Stripe8.backupmediasetid = Stripe1.backupmediasetid - AND Stripe8.family_sequence_number = 8 - -LEFT OUTER JOIN #CTE AS Stripe9 - ON Stripe9.database_name = Stripe1.database_name - AND Stripe9.backupmediasetid = Stripe1.backupmediasetid - AND Stripe9.family_sequence_number = 9 - -LEFT OUTER JOIN #CTE AS Stripe10 - ON Stripe10.database_name = Stripe1.database_name - AND Stripe10.backupmediasetid = Stripe1.backupmediasetid - AND Stripe10.family_sequence_number = 10 -) - -SELECT * INTO #Stripes FROM Stripes; + --*************** + CASE ISNULL(#Stripes.S16_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S16_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S16_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S16_pdn,LEN(#Stripes.S16_pdn) - CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S16_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S17_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S17_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S17_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S17_pdn,LEN(#Stripes.S17_pdn) - CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S17_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S18_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S18_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S18_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S18_pdn,LEN(#Stripes.S18_pdn) - CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S18_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S19_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S19_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S19_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S19_pdn,LEN(#Stripes.S19_pdn) - CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S19_pdn),1) + 1) END + '''' + END + + + CASE ISNULL(#Stripes.S20_pdn,'') + WHEN '' THEN '' + ELSE ',' + CASE WHEN #Stripes.S20_pdn LIKE 'http%' THEN ' URL = N' ELSE ' DISK = N' END + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S20_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S20_pdn,LEN(#Stripes.S20_pdn) - CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S20_pdn),1) + 1) END + '''' + END + -CREATE INDEX IDX_Stripes ON #Stripes(database_name); - --------------------------------------------------------------- --- Results, T-SQL RESTORE commands, below are based on CTE's above --------------------------------------------------------------- - -SELECT - a.Command AS TSQL, - CONVERT(nvarchar(30), a.backupstartdate, 126) - AS BackupDate, - a.BackupDevice, - a.last_lsn, - a.database_name , - --ROW_NUMBER() OVER(ORDER BY database_name, Sequence, last_lsn) AS SortSequence - ROW_NUMBER() OVER(ORDER BY database_name, Sequence, a.backupstartdate) AS SortSequence -FROM -( - --------------------------------------------------------------- --- Most recent full backup --------------------------------------------------------------- - -SELECT - ';RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + - 'FROM DISK = N' + '''' + - CASE ISNULL(@FromFileFullUNC_,'Actual') - WHEN 'Actual' THEN #CTE.physical_device_name - ELSE @FromFileFullUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) - END + '''' + SPACE(1) + - - -- Striped backup files - CASE ISNULL(#Stripes.S2_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S3_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S4_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S5_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S6_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S7_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S8_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S9_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S10_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileFullUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileFullUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' - END + - - ' WITH ' + CASE ISNULL(@WithReplace_,0) WHEN 1 THEN 'REPLACE, ' ELSE '' END + 'FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + ',' + - CASE #CTE.has_backup_checksums WHEN 1 THEN 'CHECKSUM, ' ELSE ' ' END + - - CASE @StandbyMode_ WHEN 0 THEN 'NORECOVERY,' ELSE 'STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + - - 'STATS=10,' + SPACE(1) + - 'MOVE N' + '''' + x.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveDataFiles_,'Actual') - WHEN 'Actual' THEN x.PhysicalName - ELSE @WithMoveDataFiles_ + SUBSTRING(x.PhysicalName,LEN(x.PhysicalName) - CHARINDEX('\',REVERSE(x.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(x.PhysicalName),1) + 1) - END + '''' + ',' + SPACE(1) + - - 'MOVE N' + '''' + y.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveLogFile_ ,'Actual') - WHEN 'Actual' THEN y.PhysicalName - ELSE @WithMoveLogFile_ + SUBSTRING(y.PhysicalName,LEN(y.PhysicalName) - CHARINDEX('\',REVERSE(y.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(y.PhysicalName),1) + 1) - END + '''' AS Command, - 1 AS Sequence, - d.name AS database_name, - #CTE.physical_device_name AS BackupDevice, - #CTE.backupstartdate, - #CTE.backup_size, - #CTE.last_lsn - -FROM sys.databases d - -JOIN -( + --***************** + + CASE @StandbyMode_ WHEN 0 THEN ' WITH NORECOVERY,' ELSE ' WITH STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_' + REPLACE(REPLACE(SUBSTRING(CONVERT(VARCHAR(24),GETDATE(),127),12,12),':',''),'.','') + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + + + CASE WHEN #CTE.physical_device_name LIKE 'http%' AND @BlobCredential_ IS NOT NULL THEN ' CREDENTIAL = ''' + @BlobCredential_ + ''', ' ELSE '' END + + + CASE #CTE.has_backup_checksums WHEN 1 THEN ' CHECKSUM, ' ELSE ' ' END + + + + 'FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + + ' ,STOPAT = ' + '''' + CONVERT(VARCHAR(21),@StopAt_,120) + '''' + + AS Command, + 1000000 AS Sequence, + d.name AS database_name, + #CTE.physical_device_name AS BackupDevice, + #CTE.backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + #CTE.last_lsn, + #CTE.fork_point_lsn, + #CTE.first_recovery_fork_guid, + #CTE.last_recovery_fork_guid + + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + AND #CTE.family_sequence_number = 1 + + LEFT OUTER JOIN #Stripes + ON #Stripes.database_name = d.name + AND #Stripes.backupmediasetid = #CTE.backupmediasetid + AND #Stripes.last_lsn = #CTE.last_lsn + + LEFT OUTER JOIN + ( + SELECT database_name, MAX(last_lsn) last_lsn + FROM #CTE + WHERE [type] = 'I' + + GROUP BY database_name + ) after_diff + ON after_diff.database_name = #CTE.database_name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'L' + AND #CTE.family_sequence_number = 1 + AND #CTE.last_lsn >= CASE WHEN @ExcludeDiffAndLogBackups_ IN(0,4) THEN ISNULL(after_diff.last_lsn,'0') ELSE 0 END + AND @ExcludeDiffAndLogBackups_ IN (0,3,4) + + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- SET SINGLE USER WITH ROLLBACK IMMEDIATE + -------------------------------------------------------------- SELECT - DB_NAME(mf.database_id) AS name - ,mf.Physical_Name AS PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'ROWS' - AND mf.file_id = 1 -) x - ON d.name = x.name - -JOIN -( + + 'BEGIN TRY ALTER DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE END TRY BEGIN CATCH PRINT' + '''' + 'SET SINGLE USER FAILED' + '''' + ' END CATCH' AS Command, + 0 AS Sequence, + d.name AS database_name, + '' AS BackupDevice, + GETDATE() AS backupfinishdate, + #CTE.backup_size, + '0' AS first_lsn, + '0' AS last_lsn, + '0' AS fork_point_lsn , + '00000000-0000-0000-0000-000000000000' AS first_recovery_fork_guid, + '00000000-0000-0000-0000-000000000000' AS last_recovery_fork_guid + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND @SetSingleUser_ = 1 + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- Restore WITH RECOVERY + -------------------------------------------------------------- SELECT - DB_NAME(mf.database_id) AS name, type_desc - ,mf.Physical_Name PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'LOG' -) y - ON d.name = y.name - -LEFT OUTER JOIN #CTE - ON #CTE.database_name = d.name - AND #CTE.family_sequence_number = 1 - -JOIN #Stripes - ON #Stripes.database_name = d.name - AND #Stripes.backupmediasetid = #CTE.backupmediasetid - AND #Stripes.last_lsn = #CTE.last_lsn - -WHERE #CTE.[type] = 'D' -AND #CTE.family_sequence_number = 1 - --------------------------------------------------------------- --- Most recent differential backup --------------------------------------------------------------- -UNION - -SELECT - ';RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + - 'FROM DISK = N' + '''' + - CASE ISNULL(@FromFileDiffUNC_,'Actual') - WHEN 'Actual' THEN #CTE.physical_device_name - ELSE @FromFileDiffUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) - END + '''' + SPACE(1) + - - -- Striped backup files - CASE ISNULL(#Stripes.S2_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S3_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S4_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S5_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S6_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S7_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S8_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S9_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S10_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileDiffUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileDiffUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' - END + - - ' WITH FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + ',' + - CASE #CTE.has_backup_checksums WHEN 1 THEN 'CHECKSUM, ' ELSE ' ' END + - - CASE @StandbyMode_ WHEN 0 THEN 'NORECOVERY,' ELSE 'STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + - - 'STATS=10,' + SPACE(1) + - 'MOVE N' + '''' + x.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveDataFiles_,'Actual') - WHEN 'Actual' THEN x.PhysicalName - ELSE @WithMoveDataFiles_ + SUBSTRING(x.PhysicalName,LEN(x.PhysicalName) - CHARINDEX('\',REVERSE(x.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(x.PhysicalName),1) + 1) - END + '''' + ',' + SPACE(1) + - - 'MOVE N' + '''' + y.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveLogFile_ ,'Actual') - WHEN 'Actual' THEN y.PhysicalName - ELSE @WithMoveLogFile_ + SUBSTRING(y.PhysicalName,LEN(y.PhysicalName) - CHARINDEX('\',REVERSE(y.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(y.PhysicalName),1) + 1) - END + '''' AS Command, - 32769/2 AS Sequence, - d.name AS database_name, - #CTE.physical_device_name AS BackupDevice, - #CTE.backupstartdate, - #CTE.backup_size, - #CTE.last_lsn - -FROM sys.databases d - -JOIN #CTE -ON #CTE.database_name = d.name -AND #CTE.family_sequence_number = 1 - -LEFT OUTER JOIN #Stripes -ON #Stripes.database_name = d.name -AND #Stripes.backupmediasetid = #CTE.backupmediasetid -AND #Stripes.last_lsn = #CTE.last_lsn - -INNER JOIN -( + + 'RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + 'WITH RECOVERY' AS Command, + 1000001 AS Sequence, + d.name AS database_name, + '' AS BackupDevice, + GETDATE() AS backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + '999999999999999999997' AS last_lsn, + #CTE.fork_point_lsn , + '00000000-0000-0000-0000-000000000000' AS first_recovery_fork_guid, + '00000000-0000-0000-0000-000000000000' AS last_recovery_fork_guid + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND @WithRecovery_ = 1 + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- CHECKDB + -------------------------------------------------------------- SELECT - DB_NAME(mf.database_id) AS name - ,mf.Physical_Name AS PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'ROWS' - AND mf.file_id = 1 -) x - ON d.name = x.name - -JOIN -( + + 'DBCC CHECKDB(' + '''' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + '''' + ') WITH NO_INFOMSGS, ALL_ERRORMSGS' AS Command, + 1000002 AS Sequence, + d.name AS database_name, + '' AS BackupDevice, + DATEADD(minute,1,GETDATE()) AS backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + '999999999999999999998' AS last_lsn, + #CTE.fork_point_lsn, + '00000000-0000-0000-0000-000000000000' AS first_recovery_fork_guid, + '00000000-0000-0000-0000-000000000000' AS last_recovery_fork_guid + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND @WithCHECKDB_ = 1 + AND @WithRecovery_ = 1 + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- Drop database after restore + -------------------------------------------------------------- SELECT - DB_NAME(mf.database_id) AS name, type_desc - ,mf.Physical_Name PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'LOG' -) y - ON d.name = y.name - -WHERE #CTE.[type] = 'I' -AND #CTE.family_sequence_number = 1 - --------------------------------------------------------------- -UNION -- Log backups taken since most recent full or diff --------------------------------------------------------------- - -SELECT - ';BEGIN TRY RESTORE LOG [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + - 'FROM DISK = N' + '''' + --#CTE.physical_device_name + '''' + SPACE(1) + - CASE ISNULL(@FromFileLogUNC_,'Actual') - WHEN 'Actual' THEN #CTE.physical_device_name - ELSE @FromFileLogUNC_ + SUBSTRING(#CTE.physical_device_name,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 2,CHARINDEX('\',REVERSE(#CTE.physical_device_name),1) + 1) - END + '''' + - - -- Striped backup files - CASE ISNULL(#Stripes.S2_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S2_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S2_pdn,LEN(#Stripes.S2_pdn) - CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S2_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S3_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S3_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S3_pdn,LEN(#Stripes.S3_pdn) - CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S3_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S4_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S4_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S4_pdn,LEN(#Stripes.S4_pdn) - CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S4_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S5_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S5_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S5_pdn,LEN(#Stripes.S5_pdn) - CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S5_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S6_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S6_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S6_pdn,LEN(#Stripes.S6_pdn) - CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S6_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S7_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S7_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S7_pdn,LEN(#Stripes.S7_pdn) - CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S7_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S8_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S8_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S8_pdn,LEN(#Stripes.S8_pdn) - CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S8_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S9_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S9_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S9_pdn,LEN(#Stripes.S9_pdn) - CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S9_pdn),1) + 1) END + '''' - END + - - CASE ISNULL(#Stripes.S10_pdn,'') - WHEN '' THEN '' - ELSE ', DISK = N' + '''' + CASE ISNULL(@FromFileLogUNC_,'Actual') WHEN 'Actual' THEN #Stripes.S10_pdn ELSE @FromFileLogUNC_ + SUBSTRING(#Stripes.S10_pdn,LEN(#Stripes.S10_pdn) - CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 2,CHARINDEX('\',REVERSE(#Stripes.S10_pdn),1) + 1) END + '''' - END + - - CASE @StandbyMode_ WHEN 0 THEN ' WITH NORECOVERY,' ELSE ' WITH STANDBY =N' + '''' + ISNULL(@FromFileFullUNC_,SUBSTRING(#CTE.physical_device_name,1,LEN(#CTE.physical_device_name) - CHARINDEX('\',REVERSE(#CTE.physical_device_name)))) + '\' + d.name + '_ROLLBACK_UNDO.bak ' + '''' + ',' END + SPACE(1) + - - CASE #CTE.has_backup_checksums WHEN 1 THEN ' CHECKSUM, ' ELSE ' ' END + - - + 'FILE = ' + CAST(#CTE.position AS VARCHAR(5)) + - ' ,STOPAT = ' + '''' + CONVERT(VARCHAR(21),@StopAt_,120) + '''' + - ' ,MOVE N' + '''' + x2.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveDataFiles_,'Actual') - WHEN 'Actual' THEN x2.PhysicalName - ELSE @WithMoveDataFiles_ + SUBSTRING(x2.PhysicalName,LEN(x2.PhysicalName) - CHARINDEX('\',REVERSE(x2.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(x2.PhysicalName),1) + 1) - END + '''' + ',' + SPACE(1) + - - ' MOVE N' + '''' + y1.LogicalName + '''' + ' TO ' + - '''' + - CASE ISNULL(@WithMoveLogFile_ ,'Actual') - WHEN 'Actual' THEN y1.PhysicalName - ELSE @WithMoveLogFile_ + SUBSTRING(y1.PhysicalName,LEN(y1.PhysicalName) - CHARINDEX('\',REVERSE(y1.PhysicalName),1) + 2,CHARINDEX('\',REVERSE(y1.PhysicalName),1) + 1) - END + '''' + 'END TRY BEGIN CATCH PRINT ' + '''' + 'Transaction Log File Restore Exclusion - Check Recovery Sequence.' + '''' + ' END CATCH;' AS Command, - 32769 AS Sequence, - d.name AS database_name, - #CTE.physical_device_name AS BackupDevice, - #CTE.backupstartdate, - #CTE.backup_size, - #CTE.last_lsn - -FROM sys.databases d - -INNER JOIN -( + + -- Comment out all commands if multiple forking points exist + --CASE WHEN @CommentOut = 1 THEN ' -- Multipe backup fork points detected, command suppressed -- ' ELSE '' END + + + 'DROP DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) AS Command, + 1000003 AS Sequence, + d.name AS database_name, + '' AS BackupDevice, + GETDATE() AS backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + '999999999999999999999' AS last_lsn, + #CTE.fork_point_lsn, + '00000000-0000-0000-0000-000000000000' AS first_recovery_fork_guid, + '00000000-0000-0000-0000-000000000000' AS last_recovery_fork_guid + + + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND @DropDatabaseAfterRestore_ = 1 + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + UNION -- RAISERROR suppress restore when multiple forkpoints exist + -------------------------------------------------------------- SELECT - DB_NAME(mf.database_id) AS name - ,mf.Physical_Name AS PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'ROWS' - AND mf.file_id = 1 -) x2 -ON d.name = x2.name - -INNER JOIN -( + + 'RAISERROR (' + '''' + 'Multiple restores per performed between the selected full backup and stop at time for database ' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ' - Restore Gene processing aborted.' + '''' + ',0,0);' + + SPACE(1) AS Command, + 1 AS Sequence, + d.name AS database_name, + '' AS BackupDevice, + GETDATE() AS backupfinishdate, + #CTE.backup_size, + '000000000000000000000' AS first_lsn, + '999999999999999999999' AS last_lsn, + #CTE.fork_point_lsn, + '00000000-0000-0000-0000-000000000000' AS first_recovery_fork_guid, + '00000000-0000-0000-0000-000000000000' AS last_recovery_fork_guid + + FROM sys.databases d + + INNER JOIN #CTE + ON #CTE.database_name = d.name + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND ISNULL(fpc.ForkPoints,0) > 1 + + -------------------------------------------------------------- + UNION -- WITH MOVE secondary data files, allows for up to 32769/2 file groups + -------------------------------------------------------------- + SELECT - DB_NAME(mf.database_id) AS name, type_desc - ,mf.Physical_Name PhysicalName - ,mf.Name AS LogicalName - FROM sys.master_files mf - WHERE type_desc = 'LOG' -) y1 - ON d.name = y1.name - -INNER JOIN #CTE - ON #CTE.database_name = d.name - AND #CTE.family_sequence_number = 1 - -LEFT OUTER JOIN #Stripes - ON #Stripes.database_name = d.name - AND #Stripes.backupmediasetid = #CTE.backupmediasetid - AND #Stripes.last_lsn = #CTE.last_lsn - -LEFT OUTER JOIN -( - SELECT database_name, MAX(last_lsn) last_lsn - FROM #CTE - WHERE [type] = 'I' - GROUP BY database_name -) after_diff - ON after_diff.database_name = #CTE.database_name - -WHERE #CTE.[type] = 'L' -AND #CTE.family_sequence_number = 1 -AND #CTE.last_lsn > ISNULL(after_diff.last_lsn,'0') - --------------------------------------------------------------- -UNION -- Declare @msg_ variable --------------------------------------------------------------- -SELECT --- '; DECLARE @msg_' + d.name + ' VARCHAR(1000)' AS Command, - ';DECLARE @msg_' + REPLACE(REPLACE(REPLACE(d.name,' ','_'),'.','_'),'-','_') + ' VARCHAR(1000)' AS Command, - 0 AS Sequence, - d.name AS database_name, - '' AS BackupDevice, - GETDATE() AS backupstartdate, - #CTE.backup_size, - '0' AS last_lsn - -FROM sys.databases d - -JOIN #CTE -ON #CTE.database_name = d.name - -WHERE #CTE.[type] = 'D' -AND @LogShippingVariableDeclare_ = 1 - --------------------------------------------------------------- -UNION -- Restore WITH RECOVERY --------------------------------------------------------------- -SELECT - ';SET @msg_' + REPLACE(REPLACE(REPLACE(d.name,' ','_'),'.','_'),'-','_') + ' = ' + '''' + @Log_Reference_ + '''' + '; RAISERROR (@msg_' + REPLACE(REPLACE(REPLACE(d.name,' ','_'),'.','_'),'-','_') + ',0,0) WITH LOG' + ';RESTORE DATABASE [' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + ']' + SPACE(1) + 'WITH RECOVERY' AS Command, - 32771 AS Sequence, - d.name AS database_name, - '' AS BackupDevice, - GETDATE() AS backupstartdate, - #CTE.backup_size, - '999999999999999999998' AS last_lsn - -FROM sys.databases d - -JOIN #CTE -ON #CTE.database_name = d.name - -WHERE #CTE.[type] = 'D' -AND @WithRecovery_ = 1 - --------------------------------------------------------------- -UNION -- CHECKDB --------------------------------------------------------------- -SELECT - ';SET @msg_' + REPLACE(REPLACE(REPLACE(d.name,' ','_'),'.','_'),'-','_') + ' = ' + '''' + @Log_Reference_ + '''' + '; RAISERROR (@msg_' + REPLACE(REPLACE(REPLACE(d.name,' ','_'),'.','_'),'-','_') + ',0,0) WITH LOG' + ';DBCC CHECKDB(' + '''' + CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN d.[name] ELSE @TargetDatabase_ END + '''' + ') WITH NO_INFOMSGS, ALL_ERRORMSGS' AS Command, - 32772 AS Sequence, - d.name AS database_name, - '' AS BackupDevice, - DATEADD(minute,1,GETDATE()) AS backupstartdate, - #CTE.backup_size, - '999999999999999999999' AS last_lsn - -FROM sys.databases d - -JOIN #CTE -ON #CTE.database_name = d.name - -WHERE #CTE.[type] = 'D' -AND @WithCHECKDB_ = 1 -AND @WithRecovery_ = 1 - --------------------------------------------------------------- -UNION -- WITH MOVE secondary data files, allows for up to 32769/2 file groups --------------------------------------------------------------- -SELECT - ', MOVE N' + '''' + b.name + '''' + ' TO N' + '''' + - CASE ISNULL(@WithMoveDataFiles_,'Actual') - WHEN 'Actual' THEN b.physical_name - ELSE @WithMoveDataFiles_ + SUBSTRING(b.Physical_Name,LEN(b.Physical_Name) - CHARINDEX('\',REVERSE(b.Physical_Name),1) + 2,CHARINDEX('\',REVERSE(b.Physical_Name),1) + 1) - END + '''', - b.file_id AS Sequence, - DB_NAME(b.database_id) AS database_name, - 'SECONDARY FULL' AS BackupDevice, - #CTE.backupstartdate, - #CTE.backup_size, - #CTE.last_lsn - -FROM sys.master_files b -INNER JOIN #CTE -ON #CTE.database_name = DB_NAME(b.database_id) - -WHERE #CTE.[type] = 'D' -AND b.type_desc = 'ROWS' -AND b.file_id > 2 -AND @WithMoveDataFiles_ IS NOT NULL --------------------------------------------------------------- -) a --------------------------------------------------------------- - -WHERE a.database_name = ISNULL(@Database_,a.database_name) -AND (@IncludeSystemDBs_ = 1 OR a.database_name NOT IN('master','model','msdb')) -AND a.last_lsn > @LogShippingLastLSN_ - -ORDER BY - database_name, - Sequence, - --last_lsn - backupstartdate - -END; + -- Comment out all commands if multiple forking points exist + --CASE WHEN @CommentOut = 1 THEN ' -- Multipe backup fork points detected, command suppressed -- ' ELSE '' END + + + ' ,MOVE N' + '''' + b.name + '''' + ' TO N' + '''' + + + CASE b.type_desc + + WHEN 'ROWS' THEN + CASE ISNULL(@WithMoveDataFiles_,'Actual') + WHEN 'Actual' THEN CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN b.Physical_Name ELSE SUBSTRING(b.Physical_Name,1,CASE CHARINDEX('.',b.Physical_Name) WHEN 0 THEN LEN(b.Physical_Name) ELSE CHARINDEX('.',b.Physical_Name) - 1 END) + '_' + @TargetDatabase_ + '.ndf' END + ELSE CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN @WithMoveDataFiles_ + SUBSTRING(b.Physical_Name,LEN(b.Physical_Name) - CHARINDEX('\',REVERSE(b.Physical_Name),1) + 2,CHARINDEX('\',REVERSE(b.Physical_Name),1) + 1) + ELSE @WithMoveDataFiles_ + SUBSTRING (b.Physical_Name, (LEN(b.Physical_Name)-CHARINDEX('\',REVERSE(b.Physical_Name)) + 2),CHARINDEX('\',REVERSE(b.Physical_Name)) - 1 - CHARINDEX('.',REVERSE(b.Physical_Name))) + '_' + @TargetDatabase_ + '.ndf' END + END + + WHEN 'FILESTREAM' THEN + CASE ISNULL(@WithMoveFileStreamFile_,'Actual') + WHEN 'Actual' THEN CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN b.Physical_Name ELSE SUBSTRING(b.Physical_Name,1,CASE CHARINDEX('.',b.Physical_Name) WHEN 0 THEN LEN(b.Physical_Name) ELSE CHARINDEX('.',b.Physical_Name) - 1 END) + '_' + @TargetDatabase_ END + ELSE CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN @WithMoveFileStreamFile_ + SUBSTRING(b.Physical_Name,LEN(b.Physical_Name) - CHARINDEX('\',REVERSE(b.Physical_Name),1) + 2,CHARINDEX('\',REVERSE(b.Physical_Name),1) + 1) + ELSE @WithMoveFileStreamFile_ + SUBSTRING (b.Physical_Name, (LEN(b.Physical_Name)-CHARINDEX('\',REVERSE(b.Physical_Name)) + 2),CHARINDEX('\',REVERSE(b.Physical_Name)) - 1 - CHARINDEX('.',REVERSE(b.Physical_Name))) + '_' + @TargetDatabase_ END + END + + WHEN 'LOG' THEN + CASE ISNULL(@WithMoveLogFile_,'Actual') + WHEN 'Actual' THEN CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN b.Physical_Name ELSE SUBSTRING(b.Physical_Name,1,CASE CHARINDEX('.',b.Physical_Name) WHEN 0 THEN LEN(b.Physical_Name) ELSE CHARINDEX('.',b.Physical_Name) - 1 END) + '_' + @TargetDatabase_ + '.ldf' END + ELSE CASE ISNULL(@TargetDatabase_,'') WHEN '' THEN @WithMoveLogFile_ + SUBSTRING(b.Physical_Name,LEN(b.Physical_Name) - CHARINDEX('\',REVERSE(b.Physical_Name),1) + 2,CHARINDEX('\',REVERSE(b.Physical_Name),1) + 1) + ELSE @WithMoveLogFile_ + SUBSTRING (b.Physical_Name, (LEN(b.Physical_Name)-CHARINDEX('\',REVERSE(b.Physical_Name)) + 2),CHARINDEX('\',REVERSE(b.Physical_Name)) - 1 - CHARINDEX('.',REVERSE(b.Physical_Name))) + '_' + @TargetDatabase_ + '.ldf' END + + END + + END + + + '''', + b.file_id AS Sequence, + DB_NAME(b.database_id) AS database_name, + 'SECONDARY FULL' AS BackupDevice, + #CTE.backupfinishdate, + #CTE.backup_size, + #CTE.first_lsn, + #CTE.last_lsn, + #CTE.fork_point_lsn, + #CTE.first_recovery_fork_guid, + #CTE.last_recovery_fork_guid + + FROM sys.master_files b + INNER JOIN #CTE + ON #CTE.database_name = DB_NAME(b.database_id) + + LEFT OUTER JOIN #ForkPointsCount fpc + ON fpc.database_name = #CTE.database_name + + WHERE #CTE.[type] = 'D' + AND b.type_desc IN ('ROWS','FILESTREAM','LOG') + AND b.file_id > 2 + AND ISNULL(fpc.ForkPoints,0) < 2 + + -------------------------------------------------------------- + ) a + LEFT OUTER JOIN #tmpDatabases b + ON a.database_name = b.DatabaseName + -------------------------------------------------------------- + + WHERE (@Database_ IS NULL OR b.Selected = 1 OR @Database_ = a.database_name) + AND (@IncludeSystemDBs_ = 1 OR a.database_name NOT IN('master','model','msdb')) + AND a.last_lsn >= @LogShippingLastLSN_; + + CREATE INDEX IDX_RestoreGeneResults ON #RestoreGeneResults (database_name,SortSequence,BackupDate); + + -------------------------------------------------------------- + -- Result Set + IF @SuppressWithMove_ = 1 + BEGIN + IF @RestoreScriptOnly_ = 0 + BEGIN + + SELECT x4.TSQL, x4.BackupDate, x4.BackupDevice, x4.first_lsn, x4.last_lsn, x4.fork_point_lsn, x4.first_recovery_fork_guid, x4.last_recovery_fork_guid, x4.database_name, x4.SortSequence + FROM #RestoreGeneResults x4 + WHERE ISNULL(x4.BackupDevice,'') <> 'SECONDARY FULL' + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + ELSE + BEGIN + SELECT x4.TSQL AS [--TSQL] + FROM #RestoreGeneResults x4 + WHERE ISNULL(x4.BackupDevice,'') <> 'SECONDARY FULL' + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + END + ELSE + BEGIN + IF @PivotWithMove_ = 1 + BEGIN + + IF @RestoreScriptOnly_ = 0 + BEGIN + SELECT + x4.TSQL, x4.BackupDate, x4.BackupDevice, x4.first_lsn, x4.last_lsn, x4.fork_point_lsn, x4.first_recovery_fork_guid, x4.last_recovery_fork_guid, x4.database_name, x4.SortSequence + FROM #RestoreGeneResults x4 + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + ELSE + BEGIN + SELECT + x4.TSQL AS [--TSQL] + FROM #RestoreGeneResults x4 + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + + END + ELSE + BEGIN + IF @RestoreScriptOnly_ = 0 + BEGIN + WITH WithMoves AS + ( + SELECT + last_lsn, + STUFF((SELECT ' ' + TSQL FROM #RestoreGeneResults x3 WHERE x3.last_lsn = x2.last_lsn AND ISNULL(x3.BackupDevice,'') = 'SECONDARY FULL' ORDER BY x3.SortSequence FOR XML PATH, TYPE).value('.[1]', 'nvarchar(max)'), 1,1,'') AS WithoveCmds + FROM #RestoreGeneResults x2 + GROUP BY last_lsn + ) + + SELECT + CASE @SuppressWithMove_ WHEN 0 THEN CASE ISNULL(x5.WithoveCmds,'') WHEN '' THEN x4.TSQL ELSE x4.TSQL + ' ' + x5.WithoveCmds END + ELSE x4.TSQL + END AS TSQL, + x4.BackupDate, x4.BackupDevice, x4.first_lsn, x4.last_lsn, x4.fork_point_lsn, x4.first_recovery_fork_guid, x4.last_recovery_fork_guid, x4.database_name, x4.SortSequence + FROM #RestoreGeneResults x4 + LEFT OUTER JOIN WithMoves x5 + ON x4.last_lsn = x5.last_lsn + WHERE ISNULL(x4.BackupDevice,'') <> 'SECONDARY FULL' + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + ELSE + BEGIN + WITH WithMoves AS + ( + SELECT + last_lsn, + STUFF((SELECT ' ' + TSQL FROM #RestoreGeneResults x3 WHERE x3.last_lsn = x2.last_lsn AND ISNULL(x3.BackupDevice,'') = 'SECONDARY FULL' ORDER BY x3.SortSequence FOR XML PATH, TYPE).value('.[1]', 'nvarchar(max)'), 1,1,'') AS WithoveCmds + FROM #RestoreGeneResults x2 + GROUP BY last_lsn + ) + + SELECT + CASE @SuppressWithMove_ WHEN 0 THEN CASE ISNULL(x5.WithoveCmds,'') WHEN '' THEN x4.TSQL ELSE x4.TSQL + ' ' + x5.WithoveCmds END + ELSE x4.TSQL + END AS [--TSQL] + FROM #RestoreGeneResults x4 + LEFT OUTER JOIN WithMoves x5 + ON x4.last_lsn = x5.last_lsn + WHERE ISNULL(x4.BackupDevice,'') <> 'SECONDARY FULL' + ORDER BY + x4.database_name, + x4.SortSequence, + x4.BackupDate + END + END + END +END GO From 6bb99b2a260e66f2b689204fbf9b80e040f70309 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Tue, 11 Jul 2023 16:50:44 +0300 Subject: [PATCH 517/553] Add SSMS Object Explorer Menu addin --- SSMS/SSMS_Addins.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index eb39238d..4d2ae8aa 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -1,5 +1,5 @@ # SQL Server Management Studio add-ins -Complete list of useful and must have add-ins for SQL Server Management Studio - **36** SSMS add-ins +Complete list of useful and must have add-ins for SQL Server Management Studio - **37** SSMS add-ins | Name | Download page | Release Date | Support SSMS Version | Developer | Free version | Price | |-------------------------------------------------------|-------------------------------|--------------|:---------------------|----------------------|--------------|------:| @@ -40,6 +40,8 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [SSMS Schema Folders](#ssms-schema-folders) | [SSMS Schema Folders] | 2018-10-06 | 2012-2018 | Nicholas Ross | Yes | No | | [Statistics Reporter](#statistics-reporter) | [Statistics Reporter] | 2019-04-17 | 2014-2018 | Analytics Bar | Yes | No | | [SSMS Lizard](#ssms-lizard) | [SSMS Lizard] | 2020-06-15 | 2018-2018 | Lizard Labs Software | Yes | No | +| [SSMS Object Explorer Menu](#ssms-lizard) | [SSMS Object Explorer Menu] | 2023-07-10 | 2018-2022 | +Daniel Brink | Yes | No | @@ -656,6 +658,18 @@ SSMS Lizard extends SQL Server Management Studio with a number of new features n - Quickly attach the query results to an e-mail, FTP or even Google Drive with a single click of a button; and more. + +## SSMS Object Explorer Menu +Download page: [SSMS Object Explorer Menu]
+Release date: 2023-07-10
+Support Version: 2018-2023
+Developer: Daniel Brink
+Free version: Yes
+Price: No + +SSMS extension for adding custom menu items to the Object Explorer's right-click context menu. + + [SSMSBoost]:http://www.ssmsboost.com/ [SqlSmash]:http://www.sqlsmash.com/ [Red Gate SQL Code Guard]:https://www.red-gate.com/products/sql-development/sql-code-guard/ @@ -694,6 +708,7 @@ SSMS Lizard extends SQL Server Management Studio with a number of new features n [Michel Max - SSMS Tools]:https://sourceforge.net/projects/michelmaxssmstools2017/ [SSMS Schema Folders]:https://github.com/nicholas-ross/SSMS-Schema-Folders [Statistics Reporter]:https://analyticsbar.com/blog/statistics-reporter-ssms-extension/ +[SSMS Object Explorer Menu]:https://github.com/brink-daniel/ssms-object-explorer-menu [SQL_Search Download]:https://download.red-gate.com/SQL_Search.exe [Apex SQL Search Download]:https://www.apexsql.com/zips/ApexSQLSearch.exe From 5ea3f8628ad57f64a909201cb4dd1f2f39816a72 Mon Sep 17 00:00:00 2001 From: denver-ua <143743067+denver-ua@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:53:03 +0300 Subject: [PATCH 518/553] Update SQL Server Trace Flag.md Added info on TF 9265 --- SQL Server Trace Flag.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 197ffdc8..bebf58d5 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -4787,6 +4787,15 @@ Link: [New Undocumented Trace Flags]
Scope: ? + +#### Trace Flag: 9265 +**Undocumented trace flag**
+Function: MS engineering team has decided to generate a DUMP from SQL 2019+ every time a “PLAN cannot be generated”. Once a Dump freezes connections during the generation, the cluster will probably lost the connectivity to the cluster and the AG can be down/failover if it has automatic failover configured. The mitigation for this issue (avoid DUMP generation) is to enable TF Trace Flag 9265 on Startup. +Once TF 9265 is enabled, SQL Server stops generating DUMP on the “PLAN cannot be generated” error but only writes a message to ERRORLOG file (Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services). +
+Link: None + + #### Trace Flag: 9268 Function: SQL 8 - When SQL Server runs a parameterized query that contains several IN clauses, each with a large number of values, SQL Server may return the following error message after a minute or more of high CPU utilization: KB 325658. Server: Msg 8623, Level 16, State 1. Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.
From e0a6cc9e50349c18c7ff3c03ed9c687c16be1c0a Mon Sep 17 00:00:00 2001 From: Michael <9100146+MikeTV@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:04:18 -0500 Subject: [PATCH 519/553] feat: Add SQL Shades Added SQL Shades, a true dark mode add-in. Also updated VersionSQL's company name and price, which has changed, and fixed another add-in's anchor tag. --- SSMS/SSMS_Addins.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 4d2ae8aa..0912328d 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -34,14 +34,14 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [Tabs Studio](#tabs-studio) | [Tabs Studio] | 2017-08-24 | 2012-2017 | Vlasov Studio | No | $49 | | [Workload Addin](#workload-addin) | [Workload Addin] | 2017-02-07 | 2008-2012 | Tomáš Bauer | Yes | No | | [SQL Server Diagnostics](#sql-server-diagnostics) | [SQL Server Diagnostics] | 2017-06-22 | 2016-2017 | Microsoft | Yes | No | -| [VersionSQL](#versionsql) | [VersionSQL] | 2017-02-16 | 2012-2017 | VersionSQL | Yes | $149 | +| [VersionSQL](#versionsql) | [VersionSQL] | 2017-02-16 | 2012-2017 | Wrism Innovations | Yes | $199 | | [Spotlight Tuning Pack](#spotlight-tuning-pack) | [Spotlight Tuning Pack] | 2018-06-01 | 2012-2017 | Quest Software Inc | Yes | $180 | | [Michel Max - SSMS Tools](#michel-max) | [Michel Max - SSMS Tools] | 2018-11-16 | 2012-2018 | Michel Max | Yes | No | | [SSMS Schema Folders](#ssms-schema-folders) | [SSMS Schema Folders] | 2018-10-06 | 2012-2018 | Nicholas Ross | Yes | No | | [Statistics Reporter](#statistics-reporter) | [Statistics Reporter] | 2019-04-17 | 2014-2018 | Analytics Bar | Yes | No | | [SSMS Lizard](#ssms-lizard) | [SSMS Lizard] | 2020-06-15 | 2018-2018 | Lizard Labs Software | Yes | No | -| [SSMS Object Explorer Menu](#ssms-lizard) | [SSMS Object Explorer Menu] | 2023-07-10 | 2018-2022 | -Daniel Brink | Yes | No | +| [SSMS Object Explorer Menu](#ssms-menu) | [SSMS Object Explorer Menu] | 2023-07-10 | 2018-2022 | Daniel Brink | Yes | No | +| [SQL Shades dark mode](#sql-shades) | [SQL Shades] | 2022-08-03 | 2018-2022 | Wrism Innovations | Yes | No | @@ -669,6 +669,17 @@ Price: No SSMS extension for adding custom menu items to the Object Explorer's right-click context menu. + +## SQL Shades +Download page: [SQL Shades]
+Release date: 2022-08-03
+Support Version: 18+
+Developer: Wrism Innovations
+Free version: Yes
+Price: No + +Adds a true dark theme to SSMS. + [SSMSBoost]:http://www.ssmsboost.com/ [SqlSmash]:http://www.sqlsmash.com/ @@ -714,3 +725,4 @@ SSMS extension for adding custom menu items to the Object Explorer's right-click [Apex SQL Search Download]:https://www.apexsql.com/zips/ApexSQLSearch.exe [DbForge Search Download]:https://www.devart.com/dbforge/sql/search/searchsql22std.exe [SSMS Lizard]:https://www.lizard-labs.com/sql_server_management_studio_ssms_extesnsion_lizard.aspx +[SQL Shades]:https://www.sqlshades.com/ From d0153c424fcc868c3d1ed00f999bdd2640e3bd00 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 16 Oct 2023 13:24:11 +0300 Subject: [PATCH 520/553] Add SQL Reserved Words link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 77daa828..5b6a6c04 100644 --- a/README.md +++ b/README.md @@ -506,6 +506,7 @@ BIML Resources - [Stairway to Biml](http://www.sqlservercentral.com/stairway/100550/) - [Biml User Group at LinkedIn](https://www.linkedin.com/groups/4640985) - [Building Blocks of Biml (Pluralsight course by Stacia Misner Varga)](https://app.pluralsight.com/library/courses/building-blocks-biml/table-of-contents) +- [SQL Reserved Words](https://modern-sql.com/reserved-words-empirical-list) (by Markus Winand) BIML Bloggers - [Ben Weissman](https://www.solisyon.de/biml-blog-de/) From a8a6cbacade09bac66f2f8917adbdfa303836907 Mon Sep 17 00:00:00 2001 From: hanucodes <128587603+hanucodes@users.noreply.github.com> Date: Sat, 25 Nov 2023 12:21:07 +0530 Subject: [PATCH 521/553] Added SQL Queries Cheat Sheet Link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5b6a6c04..ff26d6f5 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Idera SQL Server Blog](https://community.idera.com/tags/SQL%2bServer) - [SQL Server Science Blog](https://www.sqlserverscience.com/) (by Max Vernon) - [Kohera SQL Server Blog](https://kohera.be/blog/category/sql-server/) + - [SQL Queries Cheat Sheet](https://helpercodes.com/sql-query-cheatsheet-tutorial/) - Security (great thanks to [Troy Hunt](https://www.troyhunt.com/troys-ultimate-list-of-security-links/)) - SQL injection - [sqlmap - The tool for mounting SQL injection attacks tests against a running site](http://sqlmap.org/) From a1078fa9a4724fd0826baf024aa58f956710b9eb Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Sat, 25 Nov 2023 04:21:08 -0800 Subject: [PATCH 522/553] Trace flags - add 12606 Query Store on readable secondaries. --- SQL Server Trace Flag.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index bebf58d5..3624561d 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5574,6 +5574,14 @@ Scope: global or session
SQL Server Version: >= 2019 CU9, >= 2017 CU21 + +#### Trace Flag: 12606 +Function: Enables Query Store for secondary replicas.
+Link: https://learn.microsoft.com/en-us/sql/relational-databases/performance/query-store-for-secondary-replicas?view=sql-server-ver16
+Scope: global
+SQL Server Version: >= 2022 + + [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql [Query Store Trace Flags]:https://www.sqlskills.com/blogs/erin/query-store-trace-flags/ [DBCC TRACEON]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-transact-sql From af12b6f75f7729bf348ae62d5b642f50ec98dfc3 Mon Sep 17 00:00:00 2001 From: abyxez <114577156+abyxez@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:38:44 +0300 Subject: [PATCH 523/553] Update SSMS_Addins.md --- SSMS/SSMS_Addins.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 0912328d..d268a254 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -1,9 +1,10 @@ # SQL Server Management Studio add-ins -Complete list of useful and must have add-ins for SQL Server Management Studio - **37** SSMS add-ins +Complete list of useful and must have add-ins for SQL Server Management Studio - **38** SSMS add-ins | Name | Download page | Release Date | Support SSMS Version | Developer | Free version | Price | |-------------------------------------------------------|-------------------------------|--------------|:---------------------|----------------------|--------------|------:| | [SSMSBoost](#ssmsboost) | [SSMSBoost] | 2019-08-19 | 2008-2018 | Solutions Crew GmbH | Yes | $150 | +| [Statistics Reporter SSMS](#sr-ssms-extension) | [Statistics Reporter SSMS] | 2019-04-17 | 2014, 2016-2019 | Era Apps | Yes | $9 | | [SqlSmash](#sqlsmash) | [SqlSmash] | 2017-06-10 | 2008-2017 | Smashing Jedis LLC | Yes | $99 | | [SQL Search](#sql-search) | [SQL Search] | 2017-02-27 | 2008-2017 | Red Gate | Yes | No | | [Red Gate SQL Test](#red-gate-sql-test) | [Red Gate SQL Test] | 2017-03-21 | 2008-2017 | Red Gate | No | $369 | @@ -72,6 +73,34 @@ Licensing options: after 30 day trial period register and get free community lic [Features list / SSMSBoost version comparison](http://www.ssmsboost.com/VersionCompare) + +## Statistics Reporter SSMS Extension +Download page: [Statistics Reporter SSMS Extension]
+Release date: 2019-04-17
+Support Version: 2014, 2016-2019
+Developer: Era Apps
+Free version: Yes
+Price: $9 + +SSMSBoost add-in adds missing features and improves your productivity when working with Microsoft SQL Server in SQL Server Management Studio. + - SQL Code formatting + - GoTo Definition + - Run current statement + - Restore last session + - Export data to Excel + - Prohibit execution of UPDATE/DELETE without WHERE + - Connections manager + - Save/Visualize files stored in BLOB/TEXT fields + - Regions + - Code highlighting within INSERT/VALUES statement + - Connection coloring + - and even more... + +Licensing options: after 30 day trial period register and get free community license or buy the professional version. + +[Features list / SSMSBoost version comparison](http://www.ssmsboost.com/VersionCompare) + + ## SqlSmash Download page: [SqlSmash]
From 1182a4e3590c0397fde14b16a1bb9fdcaea10eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=9C=D0=B0=D0=BA=D0=B1?= =?UTF-8?q?=D1=83=D0=BA=D0=BE=D0=B2?= Date: Tue, 12 Dec 2023 15:56:57 +0300 Subject: [PATCH 524/553] Added S-R-SSMS-Extension --- SSMS/SSMS_Addins.md | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index d268a254..8723973d 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -4,7 +4,7 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | Name | Download page | Release Date | Support SSMS Version | Developer | Free version | Price | |-------------------------------------------------------|-------------------------------|--------------|:---------------------|----------------------|--------------|------:| | [SSMSBoost](#ssmsboost) | [SSMSBoost] | 2019-08-19 | 2008-2018 | Solutions Crew GmbH | Yes | $150 | -| [Statistics Reporter SSMS](#sr-ssms-extension) | [Statistics Reporter SSMS] | 2019-04-17 | 2014, 2016-2019 | Era Apps | Yes | $9 | +| [Statistics Reporter SSMS Extension](#statistics-reporter-ssms-extension) | [Statistics Reporter SSMS Extension] | 2019-04-17 | 2014, 2016-2019 | Era Apps | Yes | $9 | | [SqlSmash](#sqlsmash) | [SqlSmash] | 2017-06-10 | 2008-2017 | Smashing Jedis LLC | Yes | $99 | | [SQL Search](#sql-search) | [SQL Search] | 2017-02-27 | 2008-2017 | Red Gate | Yes | No | | [Red Gate SQL Test](#red-gate-sql-test) | [Red Gate SQL Test] | 2017-03-21 | 2008-2017 | Red Gate | No | $369 | @@ -73,7 +73,7 @@ Licensing options: after 30 day trial period register and get free community lic [Features list / SSMSBoost version comparison](http://www.ssmsboost.com/VersionCompare) - + ## Statistics Reporter SSMS Extension Download page: [Statistics Reporter SSMS Extension]
Release date: 2019-04-17
@@ -82,23 +82,7 @@ Developer: Era Apps
Free version: Yes
Price: $9 -SSMSBoost add-in adds missing features and improves your productivity when working with Microsoft SQL Server in SQL Server Management Studio. - - SQL Code formatting - - GoTo Definition - - Run current statement - - Restore last session - - Export data to Excel - - Prohibit execution of UPDATE/DELETE without WHERE - - Connections manager - - Save/Visualize files stored in BLOB/TEXT fields - - Regions - - Code highlighting within INSERT/VALUES statement - - Connection coloring - - and even more... - -Licensing options: after 30 day trial period register and get free community license or buy the professional version. - -[Features list / SSMSBoost version comparison](http://www.ssmsboost.com/VersionCompare) +Statistics Reporter SSMS Extension is a SQL Server Management Studio Add-in for parsing SET STATISTICS IO, TIME ON into a beautiful report. @@ -711,6 +695,7 @@ Adds a true dark theme to SSMS. [SSMSBoost]:http://www.ssmsboost.com/ +[Statistics Reporter SSMS Extension]:https://analyticsbar.com/blog/statistics-reporter-ssms-extension/ [SqlSmash]:http://www.sqlsmash.com/ [Red Gate SQL Code Guard]:https://www.red-gate.com/products/sql-development/sql-code-guard/ [SQL Search]:http://www.red-gate.com/products/sql-development/sql-search/ From 051bcf48b1cece7eaf9f5548f04c95fe6d3dec69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=9C=D0=B0=D0=BA=D0=B1?= =?UTF-8?q?=D1=83=D0=BA=D0=BE=D0=B2?= Date: Tue, 12 Dec 2023 17:45:10 +0300 Subject: [PATCH 525/553] SQL Refactor Studio addin --- SSMS/SSMS_Addins.md | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 8723973d..4544c8bd 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -4,7 +4,7 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | Name | Download page | Release Date | Support SSMS Version | Developer | Free version | Price | |-------------------------------------------------------|-------------------------------|--------------|:---------------------|----------------------|--------------|------:| | [SSMSBoost](#ssmsboost) | [SSMSBoost] | 2019-08-19 | 2008-2018 | Solutions Crew GmbH | Yes | $150 | -| [Statistics Reporter SSMS Extension](#statistics-reporter-ssms-extension) | [Statistics Reporter SSMS Extension] | 2019-04-17 | 2014, 2016-2019 | Era Apps | Yes | $9 | +| [SQL Refactor Studio](#sql-refactor-studio) | [SQL Refactor Studio] | 2013-09-01 | 2013-2016 | SQL Refactor Studio Team | Yes | $17-25 | | [SqlSmash](#sqlsmash) | [SqlSmash] | 2017-06-10 | 2008-2017 | Smashing Jedis LLC | Yes | $99 | | [SQL Search](#sql-search) | [SQL Search] | 2017-02-27 | 2008-2017 | Red Gate | Yes | No | | [Red Gate SQL Test](#red-gate-sql-test) | [Red Gate SQL Test] | 2017-03-21 | 2008-2017 | Red Gate | No | $369 | @@ -73,16 +73,37 @@ Licensing options: after 30 day trial period register and get free community lic [Features list / SSMSBoost version comparison](http://www.ssmsboost.com/VersionCompare) - -## Statistics Reporter SSMS Extension -Download page: [Statistics Reporter SSMS Extension]
-Release date: 2019-04-17
-Support Version: 2014, 2016-2019
-Developer: Era Apps
+ +## SQL Refactor Studio +Download page: [SQL Refactor Studio]
+Release date: 2013-09-01
+Support Version: 2013-2016
+Developer: SQL Refactor Studio Team
Free version: Yes
-Price: $9 - -Statistics Reporter SSMS Extension is a SQL Server Management Studio Add-in for parsing SET STATISTICS IO, TIME ON into a beautiful report. +Price: $17-25 + +SQL Refactor Studio is a SQL Server Management Studio addin. It contains a lot of useful tools that help SQL Server developers to perform their daily routines. + +Key features of SQL Refactor Studio: +- Group Databases and Database Objects _New!_ +- SQL Query History _New!_ +- Generate C# classes _New!_ +- Refactoring «Rename» +- View Dependencies +- Find Code +- Displaying calculations on the SSMS status bar +- Refactoring «Add CRUD Methods» +- Refactoring «Introduce Trigger for History» +- Refactoring «Add Lookup Table» +- Refactoring «Move Columns» +- Find Data +- Generate Select Statement +- Script Table Data +- Change collation of table columns +- Highlight all occurrences of selected word +- Scripting an object as ALTER +- Get row count +- Get Top(N) rows @@ -695,7 +716,7 @@ Adds a true dark theme to SSMS. [SSMSBoost]:http://www.ssmsboost.com/ -[Statistics Reporter SSMS Extension]:https://analyticsbar.com/blog/statistics-reporter-ssms-extension/ +[SQL Refactor Studio]: https://sqlrefactorstudio.com/ [SqlSmash]:http://www.sqlsmash.com/ [Red Gate SQL Code Guard]:https://www.red-gate.com/products/sql-development/sql-code-guard/ [SQL Search]:http://www.red-gate.com/products/sql-development/sql-search/ From 434934c88a113ad6e0b75e6a5896a60ec81522dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=9C=D0=B0=D0=BA=D0=B1?= =?UTF-8?q?=D1=83=D0=BA=D0=BE=D0=B2?= Date: Tue, 12 Dec 2023 17:48:14 +0300 Subject: [PATCH 526/553] SQL Refactor Studio md look fixed --- SSMS/SSMS_Addins.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 4544c8bd..5c0db34f 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -85,9 +85,9 @@ Price: $17-25 SQL Refactor Studio is a SQL Server Management Studio addin. It contains a lot of useful tools that help SQL Server developers to perform their daily routines. Key features of SQL Refactor Studio: -- Group Databases and Database Objects _New!_ -- SQL Query History _New!_ -- Generate C# classes _New!_ +- Group Databases and Database Objects +- SQL Query History +- Generate C# classes - Refactoring «Rename» - View Dependencies - Find Code From a7395d36681718f68077addea2ec4ef3049c7038 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 22 Jan 2024 12:45:37 +0300 Subject: [PATCH 527/553] Add 665 and 1450 errors --- Errors/README.md | 78 +++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/Errors/README.md b/Errors/README.md index f02a7d51..8c01d4f0 100644 --- a/Errors/README.md +++ b/Errors/README.md @@ -23,42 +23,42 @@ SELECT message_id, severity, text Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.com/en-us/sql/relational-databases/system-compatibility-views/sys-syslanguages-transact-sql) system view, column `msglangid`: -| langid | dateformat | datefirst | upgrade | name | alias | months | shortmonths | days | lcid | msglangid -|--------|------------|-----------|---------|--------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|------|---------- -| 0 | mdy | 7 | 0 | us_english | English | January,February,March,April,May,June,July,August,September,October,November,December | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 1033 | 1033 -| 1 | dmy | 1 | 0 | Deutsch | German | Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember | Jan,Feb,Mär,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez | Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag | 1031 | 1031 -| 2 | dmy | 1 | 0 | Français | French | janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre | janv,févr,mars,avr,mai,juin,juil,août,sept,oct,nov,déc | lundi,mardi,mercredi,jeudi,vendredi,samedi,dimanche | 1036 | 1036 -| 3 | ymd | 7 | 0 | 日本語 | Japanese | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 月曜日,火曜日,水曜日,木曜日,金曜日,土曜日,日曜日 | 1041 | 1041 -| 4 | dmy | 1 | 0 | Dansk | Danish | januar,februar,marts,april,maj,juni,juli,august,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 1030 | 1030 -| 5 | dmy | 1 | 0 | Español | Spanish | Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre | Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic | Lunes,Martes,Miércoles,Jueves,Viernes,Sábado,Domingo | 3082 | 3082 -| 6 | dmy | 1 | 0 | Italiano | Italian | gennaio,febbraio,marzo,aprile,maggio,giugno,luglio,agosto,settembre,ottobre,novembre,dicembre | gen,feb,mar,apr,mag,giu,lug,ago,set,ott,nov,dic | lunedì,martedì,mercoledì,giovedì,venerdì,sabato,domenica | 1040 | 1040 -| 7 | dmy | 1 | 0 | Nederlands | Dutch | januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december | jan,feb,mrt,apr,mei,jun,jul,aug,sep,okt,nov,dec | maandag,dinsdag,woensdag,donderdag,vrijdag,zaterdag,zondag | 1043 | 1043 -| 8 | dmy | 1 | 0 | Norsk | Norwegian | januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember | jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 2068 | 2068 -| 9 | dmy | 7 | 0 | Português | Portuguese | janeiro,fevereiro,março,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro | jan,fev,mar,abr,mai,jun,jul,ago,set,out,nov,dez | segunda-feira,terça-feira,quarta-feira,quinta-feira,sexta-feira,sábado,domingo | 2070 | 2070 -| 10 | dmy | 1 | 0 | Suomi | Finnish | tammikuuta,helmikuuta,maaliskuuta,huhtikuuta,toukokuuta,kesäkuuta,heinäkuuta,elokuuta,syyskuuta,lokakuuta,marraskuuta,joulukuuta | tammi,helmi,maalis,huhti,touko,kesä,heinä,elo,syys,loka,marras,joulu | maanantai,tiistai,keskiviikko,torstai,perjantai,lauantai,sunnuntai | 1035 | 1035 -| 11 | ymd | 1 | 0 | Svenska | Swedish | januari,februari,mars,april,maj,juni,juli,augusti,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec | måndag,tisdag,onsdag,torsdag,fredag,lördag,söndag | 1053 | 1053 -| 12 | dmy | 1 | 0 | čeština | Czech | leden,únor,březen,duben,květen,červen,červenec,srpen,září,říjen,listopad,prosinec | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | pondělí,úterý,středa,čtvrtek,pátek,sobota,neděle | 1029 | 1029 -| 13 | ymd | 1 | 0 | magyar | Hungarian | január,február,március,április,május,június,július,augusztus,szeptember,október,november,december | jan,febr,márc,ápr,máj,jún,júl,aug,szept,okt,nov,dec | hétfő,kedd,szerda,csütörtök,péntek,szombat,vasárnap | 1038 | 1038 -| 14 | dmy | 1 | 0 | polski | Polish | styczeń,luty,marzec,kwiecień,maj,czerwiec,lipiec,sierpień,wrzesień,październik,listopad,grudzień | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | poniedziałek,wtorek,środa,czwartek,piątek,sobota,niedziela | 1045 | 1045 -| 15 | dmy | 1 | 0 | română | Romanian | ianuarie,februarie,martie,aprilie,mai,iunie,iulie,august,septembrie,octombrie,noiembrie,decembrie | Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Nov,Dec | luni,marţi,miercuri,joi,vineri,sîmbătă,duminică | 1048 | 1048 -| 16 | ymd | 1 | 0 | hrvatski | Croatian | siječanj,veljača,ožujak,travanj,svibanj,lipanj,srpanj,kolovoz,rujan,listopad,studeni,prosinac | sij,vel,ožu,tra,svi,lip,srp,kol,ruj,lis,stu,pro | ponedjeljak,utorak,srijeda,četvrtak,petak,subota,nedjelja | 1050 | 1050 -| 17 | dmy | 1 | 0 | slovenčina | Slovak | január,február,marec,apríl,máj,jún,júl,august,september,október,november,december | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | pondelok,utorok,streda,štvrtok,piatok,sobota,nedeľa | 1051 | 1051 -| 18 | dmy | 1 | 0 | slovenski | Slovenian | januar,februar,marec,april,maj,junij,julij,avgust,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,avg,sept,okt,nov,dec | ponedeljek,torek,sreda,četrtek,petek,sobota,nedelja | 1060 | 1060 -| 19 | dmy | 1 | 0 | ελληνικά | Greek | Ιανουαρίου,Φεβρουαρίου,Μαρτίου,Απριλίου,Μα_ου,Ιουνίου,Ιουλίου,Αυγούστου,Σεπτεμβρίου,Οκτωβρίου,Νοεμβρίου,Δεκεμβρίου | Ιαν,Φεβ,Μαρ,Απρ,Μαϊ,Ιουν,Ιουλ,Αυγ,Σεπ,Οκτ,Νοε,Δεκ | Δευτέρα,Τρίτη,Τετάρτη,Πέμπτη,Παρασκευή,Σάββατο,Κυριακή | 1032 | 1032 -| 20 | dmy | 1 | 0 | български | Bulgarian | януари,февруари,март,април,май,юни,юли,август,септември,октомври,ноември,декември | януари,февруари,март,април,май,юни,юли,август,септември,октомври,ноември,декември | понеделник,вторник,сряда,четвъртък,петък,събота,неделя | 1026 | 1026 -| 21 | dmy | 1 | 0 | русский | Russian | Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь | янв,фев,мар,апр,май,июн,июл,авг,сен,окт,ноя,дек | понедельник,вторник,среда,четверг,пятница,суббота,воскресенье | 1049 | 1049 -| 22 | dmy | 1 | 0 | Türkçe | Turkish | Ocak,Şubat,Mart,Nisan,Mayıs,Haziran,Temmuz,Ağustos,Eylül,Ekim,Kasım,Aralık | Oca,Şub,Mar,Nis,May,Haz,Tem,Ağu,Eyl,Eki,Kas,Ara | Pazartesi,Salı,Çarşamba,Perşembe,Cuma,Cumartesi,Pazar | 1055 | 1055 -| 23 | dmy | 1 | 0 | British | British English | January,February,March,April,May,June,July,August,September,October,November,December | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 2057 | 1033 -| 24 | dmy | 1 | 0 | eesti | Estonian | jaanuar,veebruar,märts,aprill,mai,juuni,juuli,august,september,oktoober,november,detsember | jaan,veebr,märts,apr,mai,juuni,juuli,aug,sept,okt,nov,dets | esmaspäev,teisipäev,kolmapäev,neljapäev,reede,laupäev,pühapäev | 1061 | 1061 -| 25 | ymd | 1 | 0 | latviešu | Latvian | janvāris,februāris,marts,aprīlis,maijs,jūnijs,jūlijs,augusts,septembris,oktobris,novembris,decembris | jan,feb,mar,apr,mai,jūn,jūl,aug,sep,okt,nov,dec | pirmdiena,otrdiena,trešdiena,ceturtdiena,piektdiena,sestdiena,svētdiena | 1062 | 1062 -| 26 | ymd | 1 | 0 | lietuvių | Lithuanian | sausis,vasaris,kovas,balandis,gegužė,birželis,liepa,rugpjūtis,rugsėjis,spalis,lapkritis,gruodis | sau,vas,kov,bal,geg,bir,lie,rgp,rgs,spl,lap,grd | pirmadienis,antradienis,trečiadienis,ketvirtadienis,penktadienis,šeštadienis,sekmadienis | 1063 | 1063 -| 27 | dmy | 7 | 0 | Português (Brasil) | Brazilian | Janeiro,Fevereiro,Março,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro | Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez | Segunda-Feira,Terça-Feira,Quarta-Feira,Quinta-Feira,Sexta-Feira,Sábado,Domingo | 1046 | 1046 -| 28 | ymd | 7 | 0 | 繁體中文 | Traditional Chinese | 一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月 | 01,02,03,04,05,06,07,08,09,10,11,12 | 星期一,星期二,星期三,星期四,星期五,星期六,星期日 | 1028 | 1028 -| 29 | ymd | 7 | 0 | 한국어 | Korean | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 월요일,화요일,수요일,목요일,금요일,토요일,일요일 | 1042 | 1042 -| 30 | ymd | 7 | 0 | 简体中文 | Simplified Chinese | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 星期一,星期二,星期三,星期四,星期五,星期六,星期日 | 2052 | 2052 -| 31 | dmy | 1 | 0 | Arabic | Arabic | Muharram,Safar,Rabie I,Rabie II,Jumada I,Jumada II,Rajab,Shaaban,Ramadan,Shawwal,Thou Alqadah,Thou Alhajja | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 1025 | 1025 -| 32 | dmy | 7 | 0 | ไทย | Thai | มกราคม,กุมภาพันธ์,มีนาคม,เมษายน,พฤษภาคม,มิถุนายน,กรกฎาคม,สิงหาคม,กันยายน,ตุลาคม,พฤศจิกายน,ธันวาคม | ม.ค.,ก.พ.,มี.ค.,เม.ย.,พ.ค.,มิ.ย.,ก.ค.,ส.ค.,ก.ย.,ต.ค.,พ.ย.,ธ.ค. | จันทร์,อังคาร,พุธ,พฤหัสบดี,ศุกร์,เสาร์,อาทิตย์ | 1054 | 1054 -| 33 | dmy | 1 | 0 | norsk (bokmål) | Bokmål | januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember | jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 1044 | 1044 +| langid | dateformat | datefirst | upgrade | name | alias | months | shortmonths | days | lcid | msglangid | +|--------|------------|-----------|---------|--------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|------|-----------| +| 0 | mdy | 7 | 0 | us_english | English | January,February,March,April,May,June,July,August,September,October,November,December | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 1033 | 1033 | +| 1 | dmy | 1 | 0 | Deutsch | German | Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember | Jan,Feb,Mär,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez | Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag | 1031 | 1031 | +| 2 | dmy | 1 | 0 | Français | French | janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre | janv,févr,mars,avr,mai,juin,juil,août,sept,oct,nov,déc | lundi,mardi,mercredi,jeudi,vendredi,samedi,dimanche | 1036 | 1036 | +| 3 | ymd | 7 | 0 | 日本語 | Japanese | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 月曜日,火曜日,水曜日,木曜日,金曜日,土曜日,日曜日 | 1041 | 1041 | +| 4 | dmy | 1 | 0 | Dansk | Danish | januar,februar,marts,april,maj,juni,juli,august,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 1030 | 1030 | +| 5 | dmy | 1 | 0 | Español | Spanish | Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre | Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic | Lunes,Martes,Miércoles,Jueves,Viernes,Sábado,Domingo | 3082 | 3082 | +| 6 | dmy | 1 | 0 | Italiano | Italian | gennaio,febbraio,marzo,aprile,maggio,giugno,luglio,agosto,settembre,ottobre,novembre,dicembre | gen,feb,mar,apr,mag,giu,lug,ago,set,ott,nov,dic | lunedì,martedì,mercoledì,giovedì,venerdì,sabato,domenica | 1040 | 1040 | +| 7 | dmy | 1 | 0 | Nederlands | Dutch | januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december | jan,feb,mrt,apr,mei,jun,jul,aug,sep,okt,nov,dec | maandag,dinsdag,woensdag,donderdag,vrijdag,zaterdag,zondag | 1043 | 1043 | +| 8 | dmy | 1 | 0 | Norsk | Norwegian | januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember | jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 2068 | 2068 | +| 9 | dmy | 7 | 0 | Português | Portuguese | janeiro,fevereiro,março,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro | jan,fev,mar,abr,mai,jun,jul,ago,set,out,nov,dez | segunda-feira,terça-feira,quarta-feira,quinta-feira,sexta-feira,sábado,domingo | 2070 | 2070 | +| 10 | dmy | 1 | 0 | Suomi | Finnish | tammikuuta,helmikuuta,maaliskuuta,huhtikuuta,toukokuuta,kesäkuuta,heinäkuuta,elokuuta,syyskuuta,lokakuuta,marraskuuta,joulukuuta | tammi,helmi,maalis,huhti,touko,kesä,heinä,elo,syys,loka,marras,joulu | maanantai,tiistai,keskiviikko,torstai,perjantai,lauantai,sunnuntai | 1035 | 1035 | +| 11 | ymd | 1 | 0 | Svenska | Swedish | januari,februari,mars,april,maj,juni,juli,augusti,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec | måndag,tisdag,onsdag,torsdag,fredag,lördag,söndag | 1053 | 1053 | +| 12 | dmy | 1 | 0 | čeština | Czech | leden,únor,březen,duben,květen,červen,červenec,srpen,září,říjen,listopad,prosinec | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | pondělí,úterý,středa,čtvrtek,pátek,sobota,neděle | 1029 | 1029 | +| 13 | ymd | 1 | 0 | magyar | Hungarian | január,február,március,április,május,június,július,augusztus,szeptember,október,november,december | jan,febr,márc,ápr,máj,jún,júl,aug,szept,okt,nov,dec | hétfő,kedd,szerda,csütörtök,péntek,szombat,vasárnap | 1038 | 1038 | +| 14 | dmy | 1 | 0 | polski | Polish | styczeń,luty,marzec,kwiecień,maj,czerwiec,lipiec,sierpień,wrzesień,październik,listopad,grudzień | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | poniedziałek,wtorek,środa,czwartek,piątek,sobota,niedziela | 1045 | 1045 | +| 15 | dmy | 1 | 0 | română | Romanian | ianuarie,februarie,martie,aprilie,mai,iunie,iulie,august,septembrie,octombrie,noiembrie,decembrie | Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Nov,Dec | luni,marţi,miercuri,joi,vineri,sîmbătă,duminică | 1048 | 1048 | +| 16 | ymd | 1 | 0 | hrvatski | Croatian | siječanj,veljača,ožujak,travanj,svibanj,lipanj,srpanj,kolovoz,rujan,listopad,studeni,prosinac | sij,vel,ožu,tra,svi,lip,srp,kol,ruj,lis,stu,pro | ponedjeljak,utorak,srijeda,četvrtak,petak,subota,nedjelja | 1050 | 1050 | +| 17 | dmy | 1 | 0 | slovenčina | Slovak | január,február,marec,apríl,máj,jún,júl,august,september,október,november,december | I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII | pondelok,utorok,streda,štvrtok,piatok,sobota,nedeľa | 1051 | 1051 | +| 18 | dmy | 1 | 0 | slovenski | Slovenian | januar,februar,marec,april,maj,junij,julij,avgust,september,oktober,november,december | jan,feb,mar,apr,maj,jun,jul,avg,sept,okt,nov,dec | ponedeljek,torek,sreda,četrtek,petek,sobota,nedelja | 1060 | 1060 | +| 19 | dmy | 1 | 0 | ελληνικά | Greek | Ιανουαρίου,Φεβρουαρίου,Μαρτίου,Απριλίου,Μα_ου,Ιουνίου,Ιουλίου,Αυγούστου,Σεπτεμβρίου,Οκτωβρίου,Νοεμβρίου,Δεκεμβρίου | Ιαν,Φεβ,Μαρ,Απρ,Μαϊ,Ιουν,Ιουλ,Αυγ,Σεπ,Οκτ,Νοε,Δεκ | Δευτέρα,Τρίτη,Τετάρτη,Πέμπτη,Παρασκευή,Σάββατο,Κυριακή | 1032 | 1032 | +| 20 | dmy | 1 | 0 | български | Bulgarian | януари,февруари,март,април,май,юни,юли,август,септември,октомври,ноември,декември | януари,февруари,март,април,май,юни,юли,август,септември,октомври,ноември,декември | понеделник,вторник,сряда,четвъртък,петък,събота,неделя | 1026 | 1026 | +| 21 | dmy | 1 | 0 | русский | Russian | Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь | янв,фев,мар,апр,май,июн,июл,авг,сен,окт,ноя,дек | понедельник,вторник,среда,четверг,пятница,суббота,воскресенье | 1049 | 1049 | +| 22 | dmy | 1 | 0 | Türkçe | Turkish | Ocak,Şubat,Mart,Nisan,Mayıs,Haziran,Temmuz,Ağustos,Eylül,Ekim,Kasım,Aralık | Oca,Şub,Mar,Nis,May,Haz,Tem,Ağu,Eyl,Eki,Kas,Ara | Pazartesi,Salı,Çarşamba,Perşembe,Cuma,Cumartesi,Pazar | 1055 | 1055 | +| 23 | dmy | 1 | 0 | British | British English | January,February,March,April,May,June,July,August,September,October,November,December | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 2057 | 1033 | +| 24 | dmy | 1 | 0 | eesti | Estonian | jaanuar,veebruar,märts,aprill,mai,juuni,juuli,august,september,oktoober,november,detsember | jaan,veebr,märts,apr,mai,juuni,juuli,aug,sept,okt,nov,dets | esmaspäev,teisipäev,kolmapäev,neljapäev,reede,laupäev,pühapäev | 1061 | 1061 | +| 25 | ymd | 1 | 0 | latviešu | Latvian | janvāris,februāris,marts,aprīlis,maijs,jūnijs,jūlijs,augusts,septembris,oktobris,novembris,decembris | jan,feb,mar,apr,mai,jūn,jūl,aug,sep,okt,nov,dec | pirmdiena,otrdiena,trešdiena,ceturtdiena,piektdiena,sestdiena,svētdiena | 1062 | 1062 | +| 26 | ymd | 1 | 0 | lietuvių | Lithuanian | sausis,vasaris,kovas,balandis,gegužė,birželis,liepa,rugpjūtis,rugsėjis,spalis,lapkritis,gruodis | sau,vas,kov,bal,geg,bir,lie,rgp,rgs,spl,lap,grd | pirmadienis,antradienis,trečiadienis,ketvirtadienis,penktadienis,šeštadienis,sekmadienis | 1063 | 1063 | +| 27 | dmy | 7 | 0 | Português (Brasil) | Brazilian | Janeiro,Fevereiro,Março,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro | Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez | Segunda-Feira,Terça-Feira,Quarta-Feira,Quinta-Feira,Sexta-Feira,Sábado,Domingo | 1046 | 1046 | +| 28 | ymd | 7 | 0 | 繁體中文 | Traditional Chinese | 一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月 | 01,02,03,04,05,06,07,08,09,10,11,12 | 星期一,星期二,星期三,星期四,星期五,星期六,星期日 | 1028 | 1028 | +| 29 | ymd | 7 | 0 | 한국어 | Korean | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 월요일,화요일,수요일,목요일,금요일,토요일,일요일 | 1042 | 1042 | +| 30 | ymd | 7 | 0 | 简体中文 | Simplified Chinese | 01,02,03,04,05,06,07,08,09,10,11,12 | 01,02,03,04,05,06,07,08,09,10,11,12 | 星期一,星期二,星期三,星期四,星期五,星期六,星期日 | 2052 | 2052 | +| 31 | dmy | 1 | 0 | Arabic | Arabic | Muharram,Safar,Rabie I,Rabie II,Jumada I,Jumada II,Rajab,Shaaban,Ramadan,Shawwal,Thou Alqadah,Thou Alhajja | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 1025 | 1025 | +| 32 | dmy | 7 | 0 | ไทย | Thai | มกราคม,กุมภาพันธ์,มีนาคม,เมษายน,พฤษภาคม,มิถุนายน,กรกฎาคม,สิงหาคม,กันยายน,ตุลาคม,พฤศจิกายน,ธันวาคม | ม.ค.,ก.พ.,มี.ค.,เม.ย.,พ.ค.,มิ.ย.,ก.ค.,ส.ค.,ก.ย.,ต.ค.,พ.ย.,ธ.ค. | จันทร์,อังคาร,พุธ,พฤหัสบดี,ศุกร์,เสาร์,อาทิตย์ | 1054 | 1054 | +| 33 | dmy | 1 | 0 | norsk (bokmål) | Bokmål | januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember | jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des | mandag,tirsdag,onsdag,torsdag,fredag,lørdag,søndag | 1044 | 1044 | ## Levels of Severity @@ -115,6 +115,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 596 | Cannot continue execution because the session is in the kill state. | [596_link1],[596_link2][31],[596_link3][32] | | 650 | You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels. | [650_link1] | | 657 | Could not disable support for increased partitions in database … | [657_link1] | +| 665 | The operating system returned error 665(The requested operation could not be completed due to a file … | [665_link1],[665_link2][52] | | 666 | The maximum system-generated unique value for a duplicate group was exceeded for index with … | [666_link1] | | 701 | There is insufficient system memory in resource pool '%ls' to run this query. … | [701_link1],[701_link2][11] | | 824 | SQL Server detected a logical consistency-based I/O error … | [824_link1],[824_link2],[KB2152734],[824_link3][42] | @@ -129,6 +130,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c | 1205 | Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen … | [1205_link1][46] | | 1222 | Lock request time out period exceeded. | [1222_link1][46] | | 1219 | Your session has been disconnected because of a high priority DDL operation. | [1219_link1][32] | +| 1450 | The operating system returned error 1450 (Insufficient system resources exist to complete the … | [52] | | 1480 | The %S_MSG database "%.*ls" is changing roles from "%ls" to "%ls" because the mirroring session or … | [1480_link1][48] | | 1701 | Creating or altering table %ls failed because the minimum row size would be 8061, including 10 b … | [1701_link1] | | 1807 | Could not obtain exclusive lock on database ‘model’. Retry the operation later. … | [1807_link1] | @@ -301,6 +303,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [49]:https://www.red-gate.com/simple-talk/sql/t-sql-programming/row-versioning-concurrency-in-sql-server/ [50]:https://sqlblog.org/2020/11/05/navigating-dbcc-checkdb-for-vldb [51]:https://www.mssqltips.com/sqlservertip/6230/memoryoptimized-tempdb-metadata-in-sql-server-2019/ +[52]:https://learn.microsoft.com/troubleshoot/sql/database-engine/database-file-operations/1450-and-665-errors-running-dbcc-checkdb [Who owns your availability groups?]:http://www.cjsommer.com/2016-10-20-who-owns-your-availability-groups/ [Cannot Connect to SQL Server]:https://dallasdbas.com/irl-cannot-connect-to-sql-server/ @@ -314,6 +317,7 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [596_link1]:http://sql-sasquatch.blogspot.ru/2017/09/sqlserver-just-how-minimal-can-that.html [650_link1]:https://sqlundercover.com/2019/02/07/alter-table-fails-on-replicated-tables-with-isolation-level-serializable-or-read-uncommitted-on-sql2012-and-earlier/ [657_link1]:https://blog.sqlauthority.com/2016/05/20/sql-server-disabling-15000-15k-partitions/ +[665_link1]:https://dba.stackexchange.com/a/334820 [666_link1]:https://blogs.msdn.microsoft.com/psssql/2018/02/16/uniqueifier-considerations-and-error-666/ [701_link1]:https://blogs.msdn.microsoft.com/psssql/2017/02/22/be-aware-of-701-error-if-you-use-memory-optimized-table-variable-in-a-loop/ [824_link1]:http://www.sqlservercentral.com/blogs/sql-server-citation-sql-blog-by-hemantgiri-s-goswami-sql-mvp/2016/08/23/resolve-microsoft-sql-server-error-code-824/ @@ -383,6 +387,6 @@ Your `language_id` you can find in [`sys.syslanguages`](https://docs.microsoft.c [25713_link2]:https://sqlquantumleap.com/2018/01/30/server-audit-mystery-filtering-action_id-gets-error-msg-25713/ [33111_link1]:https://sqlundercover.com/2018/04/04/encrypting-sql-server-database-backups/ [35250_link1]:https://blog.sqlauthority.com/2017/05/18/sql-server-fix-msg-35250-level-16-state-7-connection-primary-replica-not-active-command-cannot-processed/ -[35217_link1] :https://www.seangallardy.com/error-35217-and-availability-groups-smh/ +[35217_link1]:https://www.seangallardy.com/error-35217-and-availability-groups-smh/ [41121_link1]:https://joshthecoder.com/2020/06/22/a-bug-with-ag-health-checks.html [41922_link1]:http://timradney.com/2020/05/23/updated-default-settings-for-azure-sql-managed-instance-databases/ From 796bc091336431e27377e0c95714ca9e9e4cfdc4 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 8 Apr 2024 12:59:15 +0300 Subject: [PATCH 528/553] Add sql-log-shipping-service --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ff26d6f5..49364d6f 100644 --- a/README.md +++ b/README.md @@ -492,6 +492,7 @@ Useful links, scripts, tools and best practice for Microsoft SQL Server Database - [Industry-specific Data Models - cover Subject Areas and are used to create Enterprise Data Models](https://web.archive.org/web/20220330034214/http://databaseanswers.org/data_models/) - [Library of Database Schemas](https://dbschemalibrary.com/) - [SQLFacts - A powerful suite of FREE TSQL tools for SQL Server database professionals](https://www.sqlfacts.com) + - [sql-log-shipping-service - provides a solution for automatically restoring SQL Server transaction log backups](https://github.com/trimble-oss/sql-log-shipping-service) (by Trimble Online Source Store) **[⬆ back to top](#table-of-contents)** From 62ff596d23bf34707554aa02e3f76191169f1962 Mon Sep 17 00:00:00 2001 From: Dan Carollo Date: Wed, 3 Jul 2024 14:48:05 -0700 Subject: [PATCH 529/553] Update SQL Server Trace Flag.md I added clarifying message about using Trace Flag 3895. You should NEVER enable this manually as a Startup Trace flag! It puts the Configuration into an inconsistent state if you later try to disable it! If you add the trace flag, the only way to disable TempDB Memory Optimized MetaData is to first remove the trace flag from the startup parameters and then use either sp_configure or ALTER SERVER CONFIGURATION to set the feature OFF --- SQL Server Trace Flag.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 3624561d..27751ff6 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -2819,9 +2819,9 @@ Link: https://support.microsoft.com/kb/3003760 #### Trace Flag: 3895 **Undocumented trace flag**
-Function: In SQL Server 2019, when you enable the [Memory-Optimized TempDB Metadata](https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database) feature, this trace flag is automatically enabled after the next restart. -When you disable that feature, the trace flag is automatically removed after the next restart. -Also if you add race flag 3895 to startup parameters after restarting SQL Server option `IsTempdbMetadataMemoryOptimized` will be enabled.
+Function: In SQL Server 2019, when you enable the [Memory-Optimized TempDB Metadata](https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database) feature, this trace flag is automatically enabled as a global session flag after the next restart. +When you disable that feature, the trace flag is automatically removed as a global session flag after the next restart. +Also, if you add trace flag 3895 to startup parameters after restarting SQL Server option `IsTempdbMetadataMemoryOptimized` will be enabled. NOTE: It is NOT recommended to add trace flag 3895 as a startup trace flag to enable TempDB Memory-Optimized Metadata. Although this technically enables the option, you will no longer be able to disable it using sp_configure or ALTER SERVER CONFIGURATION. The only way you'll be able to disable this feature is to manually remove this trace flag from startup parameters in the SQL Server Configuration Manager startup properties
Link: https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Trace_Flag/Trace_Flag_3895.sql
Scope: global only From 6bbed4558a870fe7ddc853238a859d781c938a53 Mon Sep 17 00:00:00 2001 From: Imran Imtiaz Date: Sat, 6 Jul 2024 19:49:24 +0400 Subject: [PATCH 530/553] Refactor SQL script for clarity. Changes made: 1. Added descriptive comments for better understanding. 2. Improved formatting for readability. 3. Simplified certain SQL constructs for clarity. 4. Used PRINT instead of RAISERROR for debug output to make it less intimidating for beginners. 5. Kept the logic intact to ensure the script functions as originally intended. --- ...ding_Trace_Flags_To_Startup_Parameters.sql | 160 +++++++----------- 1 file changed, 65 insertions(+), 95 deletions(-) diff --git a/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql b/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql index b3f5af8d..18ac45be 100644 --- a/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql +++ b/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql @@ -2,152 +2,122 @@ Source link: https://blog.waynesheffield.com/wayne/archive/2017/09/registry-sql-server-startup-parameters/ Author: Wayne Sheffield -Globally enable / disable the specified trace flags. -Use DBCC TRACEON/TRACEOFF to enable disable globally trace flags, then adjust -the SQL Server instance startup parameters for these trace flags. - +Description: Globally enable or disable the specified trace flags. +Use DBCC TRACEON/TRACEOFF to enable or disable trace flags globally, +then adjust the SQL Server instance startup parameters for these trace flags. + SQL Server startup parameters are stored in the registry at: -HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL12.SQL2014\MSSQLServer\Parameters - +HKLM\Software\Microsoft\MSSQLSERVER\MSSQLServer\Parameters + To use the xp_instance_reg... XPs, use: HKLM\Software\Microsoft\MSSQLSERVER\MSSQLServer\Parameters. - -To use: + +Usage: 1. Add the Trace Flags that you want modified to the @TraceFlags table variable. 2. Set the @DebugLevel variable to 1 to see what will happen on your system first. -3. When satisified what will happen, set @DebugLevel to 0 to actually execute the statements. +3. When satisfied with the output, set @DebugLevel to 0 to actually execute the statements. ******************************************************************************** - MODIFICATION LOG +MODIFICATION LOG ******************************************************************************** 2016-08-03 WGS Initial Creation. *******************************************************************************/ SET NOCOUNT ON; + -- Declare and initialize variables. --- To use with SQL 2005, cannot set the variables in the declare statement. -DECLARE @MaxValue INTEGER, +DECLARE @MaxValue INT, @SQLCMD VARCHAR(MAX), @RegHive VARCHAR(50), @RegKey VARCHAR(100), @DebugLevel TINYINT; - + +-- Registry hive and key for SQL Server startup parameters SET @RegHive = 'HKEY_LOCAL_MACHINE'; SET @RegKey = 'Software\Microsoft\MSSQLSERVER\MSSQLServer\Parameters'; -SET @DebugLevel = 0; -- only makes changes if set to zero! - --- Add the trace flags that you want changed here. --- If enable = 1, DBCC TRACEON will be run; if enable = 0 then DBCC TRACEOFF will be run. --- If enable_on_startup = 1, then this TF will be added to start up on service restart; --- If enable_on_startup - 0, then this TF will be removed from starting up service restart +-- Set debug level: 0 to execute changes, 1 to only show what will happen +SET @DebugLevel = 1; + +-- Add the trace flags that you want to modify here. DECLARE @TraceFlags TABLE ( - TF INTEGER, + TF INT, enable BIT, enable_on_startup BIT, TF2 AS '-T' + CONVERT(VARCHAR(15), TF) ); INSERT INTO @TraceFlags (TF, enable, enable_on_startup) --- To work with SQL 2005, cannot use a table value constructor. --- So, use SELECT statements with UNION ALL for each TF to modify. SELECT 1117, 1, 1 UNION ALL SELECT 1118, 1, 1 UNION ALL SELECT 1204, 0, 0 UNION ALL SELECT 1222, 0, 0; - --- Get all of the arguments / parameters when starting up the service. +-- Get all arguments/parameters when starting up the service. DECLARE @SQLArgs TABLE ( Value VARCHAR(50), Data VARCHAR(500), - ArgNum AS CONVERT(INTEGER, REPLACE(Value, 'SQLArg', ''))); + ArgNum AS CONVERT(INT, REPLACE(Value, 'SQLArg', '')) +); INSERT INTO @SQLArgs - EXECUTE master.sys.xp_instance_regenumvalues @RegHive, @RegKey; - +EXEC master.sys.xp_instance_regenumvalues @RegHive, @RegKey; -- Get the highest argument number that is currently set -SELECT @MaxValue = MAX(ArgNum) -FROM @SQLArgs; -RAISERROR('MaxValue: %i', 10, 1, @MaxValue) WITH NOWAIT; - --- Disable specified trace flags -SELECT @SQLCMD = 'DBCC TRACEOFF(' + - STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) - FROM @TraceFlags - WHERE enable = 0 - ORDER BY TF - FOR XML PATH(''), TYPE).value('.','varchar(max)') - ,1,1,'') + ', -1);' +SELECT @MaxValue = MAX(ArgNum) FROM @SQLArgs; +PRINT 'MaxValue: ' + CAST(@MaxValue AS VARCHAR); -IF @DebugLevel = 0 EXECUTE (@SQLCMD); -RAISERROR('Disable TFs Command: "%s"', 10, 1, @SQLCMD) WITH NOWAIT; +-- Disable specified trace flags +SELECT @SQLCMD = 'DBCC TRACEOFF(' + + STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) + FROM @TraceFlags + WHERE enable = 0 + ORDER BY TF + FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);' +IF @DebugLevel = 0 EXEC (@SQLCMD); +PRINT 'Disable TFs Command: "' + @SQLCMD + '"'; -- Enable specified trace flags -SELECT @SQLCMD = 'DBCC TRACEON(' + - STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) - FROM @TraceFlags - WHERE enable = 1 - ORDER BY TF - FOR XML PATH(''), TYPE).value('.','varchar(max)') - ,1,1,'') + ', -1);' - -IF @DebugLevel = 0 EXECUTE (@SQLCMD); -RAISERROR('Enable TFs Command: "%s"', 10, 1, @SQLCMD) WITH NOWAIT; +SELECT @SQLCMD = 'DBCC TRACEON(' + + STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) + FROM @TraceFlags + WHERE enable = 1 + ORDER BY TF + FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);' +IF @DebugLevel = 0 EXEC (@SQLCMD); +PRINT 'Enable TFs Command: "' + @SQLCMD + '"'; +-- Prepare to update the registry with new trace flags DECLARE cSQLParams CURSOR LOCAL FAST_FORWARD FOR -WITH cte AS -( - -- Current arguments, with new TFs added at the end. Get a row number to sort by. - SELECT *, - ROW_NUMBER() OVER (ORDER BY ISNULL(ArgNum, 999999999), TF) - 1 AS RN - FROM @SQLArgs arg +WITH cte AS ( + SELECT *, + ROW_NUMBER() OVER (ORDER BY ISNULL(ArgNum, 999999999), TF) - 1 AS RN + FROM @SQLArgs arg FULL OUTER JOIN @TraceFlags tf ON arg.Data = tf.TF2 -), cte2 AS -( - -- Use the row number to calc the SQLArg# for new TFs. - -- Use the original Value (SQLArg#) and Data for all rows if possible, - -- Otherwise use the calculated SQLArg# and the calculated TF2 column. - -- Only get the original non-TF-matched parameters, and the TFs set to be enabled - -- (existing startup TFs not in @TraceFlags are left alone). - SELECT ca.Value, - ca.Data - -- in case any TFs are removed, calculate new row numbers in order - -- to renumber the SQLArg values - , ROW_NUMBER() OVER (ORDER BY RN) - 1 AS RN2 - FROM cte - -- Again, for SQL 2005, use SELECT statement instead of VALUES. - CROSS APPLY (SELECT ISNULL(Value, 'SQLArg' + CONVERT(VARCHAR(15), RN)), - ISNULL(Data, TF2) ) ca(Value, Data) - WHERE ISNULL(enable_on_startup, 1) = 1 -- ISNULL handles non-TF parameters +), cte2 AS ( + SELECT ca.Value, ca.Data, + ROW_NUMBER() OVER (ORDER BY RN) - 1 AS RN2 + FROM cte + CROSS APPLY (SELECT ISNULL(Value, 'SQLArg' + CONVERT(VARCHAR(15), RN)), ISNULL(Data, TF2)) ca(Value, Data) + WHERE ISNULL(enable_on_startup, 1) = 1 ) --- The first three parameters are the location of the errorlog directory, --- and the master database file locations. Ignore these. --- This returns the remaining parameters that should be set. --- Also return the highest number of parameters, so can determine if any need to be deleted. -SELECT 'SQLArg' + CONVERT(VARCHAR(15), RN2) AS Value, - Data, - MAX(RN2) OVER () AS MaxRN2 -FROM cte2 -WHERE RN2 > 2 +SELECT 'SQLArg' + CONVERT(VARCHAR(15), RN2) AS Value, Data, MAX(RN2) OVER () AS MaxRN2 +FROM cte2 +WHERE RN2 > 2 ORDER BY RN2; - -DECLARE @Value VARCHAR(50), - @Data VARCHAR(500), - @MaxRN2 INTEGER; + +DECLARE @Value VARCHAR(50), @Data VARCHAR(500), @MaxRN2 INT; OPEN cSQLParams; FETCH NEXT FROM cSQLParams INTO @Value, @Data, @MaxRN2; WHILE @@FETCH_STATUS = 0 BEGIN - IF @DebugLevel = 0 EXECUTE master.sys.xp_instance_regwrite @RegHive, @RegKey, @Value, 'REG_SZ', @Data; - RAISERROR('EXECUTE master.sys.xp_instance_regwrite ''%s'', ''%s'', ''%s'', ''REG_SZ'', ''%s''', 10, 1, @RegHive, @RegKey, @Value, @Data) WITH NOWAIT; + IF @DebugLevel = 0 EXEC master.sys.xp_instance_regwrite @RegHive, @RegKey, @Value, 'REG_SZ', @Data; + PRINT 'EXEC master.sys.xp_instance_regwrite ''' + @RegHive + ''', ''' + @RegKey + ''', ''' + @Value + ''', ''REG_SZ'', ''' + @Data + ''''; FETCH NEXT FROM cSQLParams INTO @Value, @Data, @MaxRN2; END; CLOSE cSQLParams; DEALLOCATE cSQLParams; --- In case deleting more TFs than added, there may be extra SQLArg values left behind. --- Need to delete the extras now. +-- Delete extra SQLArg values if more trace flags were removed than added WHILE @MaxValue > @MaxRN2 BEGIN - SET @Value = 'SQLArg' + CONVERT(VARCHAR(15), @MaxValue); - IF @DebugLevel = 0 EXECUTE master.sys.xp_instance_regdeletevalue @RegHive, @RegKey, @Value; - RAISERROR('EXECUTE master.sys.xp_instance_regdeletevalue ''%s'', ''%s'', ''%s''', 10, 1, @RegHive, @RegKey, @Value) WITH NOWAIT; - SET @MaxValue = @MaxValue - 1; + SET @Value = 'SQLArg' + CONVERT(VARCHAR(15), @MaxValue); + IF @DebugLevel = 0 EXEC master.sys.xp_instance_regdeletevalue @RegHive, @RegKey, @Value; + PRINT 'EXEC master.sys.xp_instance_regdeletevalue ''' + @RegHive + ''', ''' + @RegKey + ''', ''' + @Value + ''''; + SET @MaxValue = @MaxValue - 1; END; From 1ea0afce75c40109d35b5e8b9f84dad897d0cc45 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Fri, 23 Aug 2024 11:10:48 +0300 Subject: [PATCH 531/553] Update trace flag 7412 info Thanks to ReeceGoding https://github.com/ktaranov/sqlserver-kit/issues/227 --- SQL Server Trace Flag.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 27751ff6..3086e20c 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -234,7 +234,7 @@ If you know behavior some of them please open an issue or contact me (taranov.pr - [Trace Flag 3427](#3427) (for SQL Server 2016) - [Trace Flag 3449](#3449) (for versions SQL Server 2012 SP3 CU3 or later or SQL Server 2014 SP1 CU7 or later) - [Trace Flag 6534](#6534) (for versions SQL Server 2012, 2014, 2016) (if use [spatial data types](https://docs.microsoft.com/sql/relational-databases/spatial/spatial-data-sql-server)) - - [Trace Flag 7412](#7412) (for versions >= SQL Server 2016) + - [Trace Flag 7412](#7412) (for versions >= SQL Server 2016 and < SQl Server 2019) - [Trace Flag 7745](#7745) (for versions >= SQL Server 2016 and Query Store enabled) - [Trace Flag 7752](#7752) (for versions >= SQL Server 2016 and < 2019 and Query Store enabled) - [Trace Flag 7806](#7806) (for SQL Server Express Edition) @@ -3575,7 +3575,8 @@ Scope: global or session or query Function: Enables the lightweight query execution statistics profiling infrastructure. unless your server is already CPU bound, like you’re running all the time with 95% CPU, unless you are at that point, turn on this trace flag at any server you have. This would be my advice here because this enables that lightweight profiling infrastructure there and then you’ll see in a few minutes what it unleashes here. -So one thing that happens when I enable the lightweight profiling is that the sys.dm_exec_query_profiles DMV, which is something that actually populates the live query stats ability or feature of SSMS, now also is also populated with this lightweight profiling, which means that for all essence, we are now able to run a live query stats on all fashions at any given point in time, and this is extremely useful for let’s say a production DBA that someone calls and says, “Hey, you have a problem. To tap into running system and look at what it’s doing.”
+So one thing that happens when I enable the lightweight profiling is that the sys.dm_exec_query_profiles DMV, which is something that actually populates the live query stats ability or feature of SSMS, now also is also populated with this lightweight profiling, which means that for all essence, we are now able to run a live query stats on all fashions at any given point in time, and this is extremely useful for let’s say a production DBA that someone calls and says, “Hey, you have a problem. To tap into running system and look at what it’s doing.” +**Applies to: SQL Server 2016 (13.x) Service Pack 1 and later versions. Starting with SQL Server 2019 (15.x), this trace flag has no effect because lightweight profiling is enabled by default.**
Link: [Docs Trace Flags]
Link: https://support.microsoft.com/kb/3170113
Link: https://www.brentozar.com/archive/2017/10/get-live-query-plans-sp_blitzwho/
From 944805fcfcae36d021141bda8d7e26ada4fc5336 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Sat, 7 Sep 2024 04:11:48 -0700 Subject: [PATCH 532/553] #232 trace flags Added 12618 and 12656. Closes #232. --- SQL Server Trace Flag.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 3086e20c..92e215e5 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -45,7 +45,7 @@ Source links: **Great thanks to:** - Aaron Morelli ([b](https://sqlcrossjoin.wordpress.com) | [@sqlcrossjoin](https://twitter.com/sqlcrossjoin)) - Steinar Andersen ([b](http://www.sqlservice.se/) | [@SQLSteinar](https://twitter.com/SQLSteinar)) -- Brent Ozar ([b](https://www.brentozar.com/) | [@BrentO](https://twitter.com/BrentO)) +- Brent Ozar ([b](https://www.brentozar.com/)) - Yusuf Anis - Lars Utterström - Martin Höglund @@ -5583,6 +5583,23 @@ Scope: global
SQL Server Version: >= 2022 + +#### Trace Flag: 12618 +Function: Introduces a new plan regression detection model for Automatic Plan Correction that includes multiple consecutive checks.
+Link: [SQL Server 2022 CU4 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate4#2344871)
+Scope: global
+SQL Server Version: >= 2022 CU4 + + + +#### Trace Flag: 12656 +Function: For Automatic Plan Correction, introduces the ability to use a time-based plan regression check that will occur five minutes after a plan change is discovered, which avoids biasing the regression checks by queries that execute quickly.
+Link: [SQL Server 2022 CU4 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate4#2344871)
+Scope: global
+SQL Server Version: >= 2022 CU4 + + + [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql [Query Store Trace Flags]:https://www.sqlskills.com/blogs/erin/query-store-trace-flags/ [DBCC TRACEON]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-transact-sql From 9420b415038f266bedc5d47e88fb94023a83d856 Mon Sep 17 00:00:00 2001 From: abairmj Date: Sun, 20 Oct 2024 11:39:39 -0400 Subject: [PATCH 533/553] Update SQL Server Trace Flag.md Clarity on applicability of TF 8099 --- SQL Server Trace Flag.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 92e215e5..f6225770 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -234,11 +234,11 @@ If you know behavior some of them please open an issue or contact me (taranov.pr - [Trace Flag 3427](#3427) (for SQL Server 2016) - [Trace Flag 3449](#3449) (for versions SQL Server 2012 SP3 CU3 or later or SQL Server 2014 SP1 CU7 or later) - [Trace Flag 6534](#6534) (for versions SQL Server 2012, 2014, 2016) (if use [spatial data types](https://docs.microsoft.com/sql/relational-databases/spatial/spatial-data-sql-server)) - - [Trace Flag 7412](#7412) (for versions >= SQL Server 2016 and < SQl Server 2019) + - [Trace Flag 7412](#7412) (for versions >= SQL Server 2016 and < SQL Server 2019) - [Trace Flag 7745](#7745) (for versions >= SQL Server 2016 and Query Store enabled) - [Trace Flag 7752](#7752) (for versions >= SQL Server 2016 and < 2019 and Query Store enabled) - [Trace Flag 7806](#7806) (for SQL Server Express Edition) - - [Trace Flag 8099](#8099) (for versions >= 2019 CU2) + - [Trace Flag 8099](#8099) (for versions 2019 CU2 and 2019 CU3 only) **Trace Flag 272** prevents identity gap after restarting SQL Server 2012 instance, critical for columns with identity and `tinyint` and `smallint` data types. (Demo for repeating this issue [here](https://github.com/ktaranov/sqlserver-kit/Errors/Identity_gap_sql_server_2012.sql)) @@ -285,7 +285,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht **Trace Flag: 7806** enables a dedicated administrator connection ([DAC]) on SQL Server Express. -**Trace Flag: 8099** enables a spinlock contention fix for high-end systems running SQL Server 2019 (15.x) serving many concurrent users. +**Trace Flag: 8099** enables a spinlock contention fix for high-end systems running SQL Server 2019 (15.x) serving many concurrent users. Starting with SQL 2019 CU 4 this fix is enabled by default. From 0734add64cecf99ff1945f8496ee1bbf6d2cac44 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Thu, 31 Oct 2024 15:44:55 -0700 Subject: [PATCH 534/553] Update SQL Server Trace Flag.md SQL Server 2019 CU29 added a handful! --- SQL Server Trace Flag.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index f6225770..e20e43b2 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3484,6 +3484,13 @@ Scope: global only
SQL Server Version: >= 2022 + +#### Trace Flag: 6981 +Function: Handle large objects (LOBs) when rebuilding the index that has an assertion issue (Location: blobbase.cpp:345; Expression: IS_ON (BLB_TI_END, m_status)). After turning on this trace flag and rebuilding the affected index, the assertion dump shouldn't be generated again. Added in SQL Server 2019 CU29.
+Link: [SQL Server 2019 CU29 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29#3370476)
+SQL Server Version: >= 2019 CU29 + + #### Trace Flag: 7103 **Undocumented trace flag**
@@ -3668,6 +3675,12 @@ Function: SQL 9 - Full-text index population for the indexed view is very slow +#### Trace Flag: 7617 +Function: Skip dropping full-text index fragments marked as deletion during a database recovery process. Added in SQL Server 2019 CU29.
+Link: [SQL Server 2019 CU29 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29#3540450) + + #### Trace Flag: 7646 Function: SQL 10 - Avoids blocking when using full text indexing. @@ -4065,6 +4078,12 @@ Function: Writes detailed information about Ms-DTC context & state changes to th Link: None + +#### Trace Flag: 8531 +Function: Fixes a contention issue with high KTM_RECOVERY_MANAGER wait times that you might encounter when running XA distributed transactions. Note: You need to turn on trace flag 8531 as a startup trace flag.
+Link: [SQL Server 2019 CU29 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29#3417392) + + #### Trace Flag: 8599 Function: Allows you to use a save-point within a distributed transaction
@@ -5598,6 +5617,12 @@ Link: [SQL Server 2022 CU4 Documentation](https://learn.microsoft.com/en-us/trou Scope: global
SQL Server Version: >= 2022 CU4 + +#### Trace Flag: 15915 +Function: Fixes a performance issue that you might encounter only when sp_lock is called frequently from multiple connections, which might cause a memory leak. The memory isn't cleaned up until you restart the SQL Server service. Added in SQL Server 2019 CU29.
+Link: [SQL Server 2019 CU29 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29#3180085)
+SQL Server Version: >= 2019 CU29 + [Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql From 7b9838273a2c2ebd6562b576f43c1ef288572d30 Mon Sep 17 00:00:00 2001 From: SachinAkash01 Date: Tue, 10 Dec 2024 17:39:59 +0530 Subject: [PATCH 535/553] Add ballerina mssql connector to the SQL server drivers list --- SQL Server Drivers.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SQL Server Drivers.md b/SQL Server Drivers.md index 72b2f906..43dec2e7 100644 --- a/SQL Server Drivers.md +++ b/SQL Server Drivers.md @@ -26,6 +26,12 @@ This driver is developed, tested, and supported by Microsoft. [Microsoft ADO.NET for SQL Server](https://docs.microsoft.com/en-us/sql/connect/ado-net/microsoft-ado-net-for-sql-server) | [Download .Net Driver](http://www.microsoft.com/net/download/) +### Ballerina +The Ballerina MSSQL Connector provides seamless integration with Microsoft SQL Server, allowing developers to work with databases efficiently in cloud-native and REST-based applications. This connector is an open-source project which is actively developed, tested, and supported by the Ballerina team. + +[ballerinax/mssql connector for SQL Server](https://central.ballerina.io/ballerinax/mssql/latest) | [GitHub](https://github.com/ballerina-platform/module-ballerinax-mssql) + + ### JDBC The JDBC SQL driver is a Java implementation of the TDS protocol, which is supported by all modern versions of SQL Server. This driver is developed, tested, and supported by Microsoft. From f0f80845d3c45763d043a17301f62a42becbc6be Mon Sep 17 00:00:00 2001 From: Imran Imtiaz Date: Sun, 15 Dec 2024 06:28:38 +0400 Subject: [PATCH 536/553] Update Adding_Trace_Flags_To_Startup_Parameters.sql --- ...ding_Trace_Flags_To_Startup_Parameters.sql | 54 +++++++------------ 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql b/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql index 18ac45be..9872dd1a 100644 --- a/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql +++ b/Scripts/Adding_Trace_Flags_To_Startup_Parameters.sql @@ -23,74 +23,61 @@ MODIFICATION LOG *******************************************************************************/ SET NOCOUNT ON; --- Declare and initialize variables. -DECLARE @MaxValue INT, - @SQLCMD VARCHAR(MAX), - @RegHive VARCHAR(50), - @RegKey VARCHAR(100), - @DebugLevel TINYINT; +DECLARE @MaxValue INT, + @SQLCMD VARCHAR(MAX), + @RegHive VARCHAR(50) = 'HKEY_LOCAL_MACHINE', + @RegKey VARCHAR(100) = 'Software\Microsoft\MSSQLSERVER\MSSQLServer\Parameters', + @DebugLevel TINYINT = 1; --- Registry hive and key for SQL Server startup parameters -SET @RegHive = 'HKEY_LOCAL_MACHINE'; -SET @RegKey = 'Software\Microsoft\MSSQLSERVER\MSSQLServer\Parameters'; --- Set debug level: 0 to execute changes, 1 to only show what will happen -SET @DebugLevel = 1; - --- Add the trace flags that you want to modify here. DECLARE @TraceFlags TABLE ( - TF INT, - enable BIT, - enable_on_startup BIT, - TF2 AS '-T' + CONVERT(VARCHAR(15), TF) + TF INT, + enable BIT, + enable_on_startup BIT, + TF2 AS '-T' + CONVERT(VARCHAR(15), TF) ); INSERT INTO @TraceFlags (TF, enable, enable_on_startup) -SELECT 1117, 1, 1 UNION ALL -SELECT 1118, 1, 1 UNION ALL -SELECT 1204, 0, 0 UNION ALL -SELECT 1222, 0, 0; +VALUES (1117, 1, 1), + (1118, 1, 1), + (1204, 0, 0), + (1222, 0, 0); --- Get all arguments/parameters when starting up the service. DECLARE @SQLArgs TABLE ( - Value VARCHAR(50), - Data VARCHAR(500), - ArgNum AS CONVERT(INT, REPLACE(Value, 'SQLArg', '')) + Value VARCHAR(50), + Data VARCHAR(500), + ArgNum AS CONVERT(INT, REPLACE(Value, 'SQLArg', '')) ); INSERT INTO @SQLArgs EXEC master.sys.xp_instance_regenumvalues @RegHive, @RegKey; --- Get the highest argument number that is currently set SELECT @MaxValue = MAX(ArgNum) FROM @SQLArgs; PRINT 'MaxValue: ' + CAST(@MaxValue AS VARCHAR); --- Disable specified trace flags SELECT @SQLCMD = 'DBCC TRACEOFF(' + STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) FROM @TraceFlags WHERE enable = 0 ORDER BY TF - FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);' + FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);'; IF @DebugLevel = 0 EXEC (@SQLCMD); PRINT 'Disable TFs Command: "' + @SQLCMD + '"'; --- Enable specified trace flags SELECT @SQLCMD = 'DBCC TRACEON(' + STUFF((SELECT ',' + CONVERT(VARCHAR(15), TF) FROM @TraceFlags WHERE enable = 1 ORDER BY TF - FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);' + FOR XML PATH(''), TYPE).value('.','varchar(max)'), 1, 1, '') + ', -1);'; IF @DebugLevel = 0 EXEC (@SQLCMD); PRINT 'Enable TFs Command: "' + @SQLCMD + '"'; --- Prepare to update the registry with new trace flags DECLARE cSQLParams CURSOR LOCAL FAST_FORWARD FOR WITH cte AS ( - SELECT *, + SELECT * , ROW_NUMBER() OVER (ORDER BY ISNULL(ArgNum, 999999999), TF) - 1 AS RN FROM @SQLArgs arg FULL OUTER JOIN @TraceFlags tf ON arg.Data = tf.TF2 ), cte2 AS ( - SELECT ca.Value, ca.Data, + SELECT ca.Value, ca.Data, ROW_NUMBER() OVER (ORDER BY RN) - 1 AS RN2 FROM cte CROSS APPLY (SELECT ISNULL(Value, 'SQLArg' + CONVERT(VARCHAR(15), RN)), ISNULL(Data, TF2)) ca(Value, Data) @@ -113,7 +100,6 @@ END; CLOSE cSQLParams; DEALLOCATE cSQLParams; --- Delete extra SQLArg values if more trace flags were removed than added WHILE @MaxValue > @MaxRN2 BEGIN SET @Value = 'SQLArg' + CONVERT(VARCHAR(15), @MaxValue); From 384311f0e4beb507386aee3bad19d0ea611c8a15 Mon Sep 17 00:00:00 2001 From: Imran Imtiaz Date: Sun, 15 Dec 2024 06:29:53 +0400 Subject: [PATCH 537/553] Update dbo.sp_PrintString.sql Changes Made: 1. Improved Formatting: Enhanced readability by aligning declarations and simplifying inline comments. 2. Default Initializations: Added default initializations to avoid implicit NULL values. 3. Consistent Variable Naming: Ensured variables are consistently formatted and appropriately scoped. 4. Simplified Logic: Removed redundant checks and restructured for clarity. 5. Enhanced Line Splitting: Introduced better segmentation logic for PRINT operations. This procedure is robust for handling strings that exceed PRINT's 4,000-character limit, while respecting line breaks and special characters. --- Stored_Procedure/dbo.sp_PrintString.sql | 86 +++++++++---------------- 1 file changed, 31 insertions(+), 55 deletions(-) diff --git a/Stored_Procedure/dbo.sp_PrintString.sql b/Stored_Procedure/dbo.sp_PrintString.sql index 7fe8ccae..6633031c 100644 --- a/Stored_Procedure/dbo.sp_PrintString.sql +++ b/Stored_Procedure/dbo.sp_PrintString.sql @@ -2,93 +2,69 @@ IF OBJECT_ID('dbo.sp_PrintString', 'P') IS NULL EXEC ('CREATE PROCEDURE dbo.sp_PrintString AS SELECT 1'); GO -ALTER PROCEDURE dbo.sp_PrintString( - @str NVARCHAR(MAX) +ALTER PROCEDURE dbo.sp_PrintString ( + @str NVARCHAR(MAX) ) AS -/* -DECLARE @longStr NVARCHAR(MAX) = REPLICATE(N'R', 5000) + CAST(CHAR(13) AS NVARCHAR(MAX)) + REPLICATE(N'Я', 5000) + CAST(CHAR(13) + N'ё' AS NVARCHAR(MAX)); -PRINT('Microsoft PRINT with string truncating:'); -PRINT(@longStr); -PRINT('Right PRINT using dbo.sp_PrintString without string truncating:'); -EXEC dbo.sp_PrintString @str = @longStr; -*/ BEGIN - DECLARE @line NVARCHAR(MAX) - , @startLocation INT - , @length INT - , @totalLength INT - , @current INT; - - SELECT @startLocation = 1 - ,@totalLength = DATALENGTH(@str) - ,@current = 1 - ,@length = 0 + DECLARE @line NVARCHAR(MAX), + @startLocation INT = 1, + @length INT = 0, + @totalLength INT = DATALENGTH(@str), + @current INT = 1; DECLARE @PrintLine NVARCHAR(MAX) = - N'DECLARE @pos int = 1 - WHILE @pos <= LEN(@line) - BEGIN - PRINT SUBSTRING(@line, @pos, 4000); - SET @pos = @pos + 4000; - END;' + N' + DECLARE @pos INT = 1 + WHILE @pos <= LEN(@line) + BEGIN + PRINT SUBSTRING(@line, @pos, 4000); + SET @pos = @pos + 4000; + END;'; WHILE @current <= @totalLength BEGIN - IF ( - SUBSTRING(@str, @current, 2) IN ( - CHAR(0x0D) + CHAR(0x0A) - ,CHAR(0x0A) + CHAR(0x0D) - ) - ) + IF SUBSTRING(@str, @current, 2) IN ( + CHAR(0x0D) + CHAR(0x0A), + CHAR(0x0A) + CHAR(0x0D) + ) BEGIN IF @length <= 0 PRINT ''; ELSE - BEGIN -- line + BEGIN SELECT @line = SUBSTRING(@str, @startLocation, @length); - - EXEC sp_executesql @PrintLine - ,N'@line NVARCHAR(max)' - ,@line; + EXEC sp_executesql @PrintLine, N'@line NVARCHAR(MAX)', @line; END - SELECT @startLocation = @current + 2 - , @current = @current + 2 - , @length = 0; + SELECT @startLocation = @current + 2, + @current = @current + 2, + @length = 0; CONTINUE; END - ELSE IF ( - SUBSTRING(@str, @current, 1) IN ( - CHAR(0x0D) - ,CHAR(0x0A) - ) - ) + ELSE IF SUBSTRING(@str, @current, 1) IN (CHAR(0x0D), CHAR(0x0A)) BEGIN IF @length <= 0 PRINT ''; ELSE BEGIN SELECT @line = SUBSTRING(@str, @startLocation, @length); - - EXEC sp_executesql @PrintLine - ,N'@line NVARCHAR(max)' - ,@line; + EXEC sp_executesql @PrintLine, N'@line NVARCHAR(MAX)', @line; END - SELECT @startLocation = @current + 1 - ,@current = @current + 1 - ,@length = 0; + SELECT @startLocation = @current + 1, + @current = @current + 1, + @length = 0; CONTINUE; END - SELECT @current = @current + 1 - , @length = @length + 1; + SELECT @current = @current + 1, + @length = @length + 1; END - IF (@startLocation <= DATALENGTH(@str)) + IF @startLocation <= DATALENGTH(@str) PRINT SUBSTRING(@str, @startLocation, DATALENGTH(@str)); END; GO From c100e2dddbbf1bf99b6c07a1e5db5ca5f4d1d49d Mon Sep 17 00:00:00 2001 From: Alex Bochkov Date: Sat, 1 Feb 2025 11:32:26 -0800 Subject: [PATCH 538/553] Add the SSMS addin I maintain --- SSMS/SSMS_Addins.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/SSMS/SSMS_Addins.md b/SSMS/SSMS_Addins.md index 5c0db34f..985fc505 100644 --- a/SSMS/SSMS_Addins.md +++ b/SSMS/SSMS_Addins.md @@ -43,6 +43,7 @@ Complete list of useful and must have add-ins for SQL Server Management Studio - | [SSMS Lizard](#ssms-lizard) | [SSMS Lizard] | 2020-06-15 | 2018-2018 | Lizard Labs Software | Yes | No | | [SSMS Object Explorer Menu](#ssms-menu) | [SSMS Object Explorer Menu] | 2023-07-10 | 2018-2022 | Daniel Brink | Yes | No | | [SQL Shades dark mode](#sql-shades) | [SQL Shades] | 2022-08-03 | 2018-2022 | Wrism Innovations | Yes | No | +| [Axial SQL Tools](#axial-sql-tools) | [Axial SQL Tools] | 2025-01-26 | 2022-2025 | Alex Bochkov | Yes | No | @@ -714,6 +715,31 @@ Price: No Adds a true dark theme to SSMS. + +## Axial SQL Tools +Download page: [Axial SQL Tools]
+Release date: 2025-01-26
+Support Version: 20+
+Developer: Alex Bochkov
+Free version: Yes
+Price: No + +Axial SQL Tools is a productivity add-in for SQL Server Management Studio 20/21, designed to streamline your workflow and address common limitations in SSMS. Built from the personal experience of a seasoned SQL Server engineer, this tool incorporates community feedback to continuously improve and simplify routine tasks. + +Main Features: +- Transaction Warning: Instantly see if you’ve left any transactions open. +- Precise Execution Time: Monitor query execution times down to the millisecond on the status bar. +- Format Any TSQL Code: Validate and format your TSQL code using the Microsoft TSQL parser for improved readability. +- Query Templates and Snippets: Access a library of query templates for common tasks, saving time on routine queries. +- Export Grid to Excel: Quickly export grid results directly into an Excel file. +- Export Grid to Email: Export grid results and send the file via email directly from SSMS. +- Export Grid as Temp Table: Convert grid results into temporary tables using generated INSERT statements. +- Script Selected Object Definition: Easily generate scripts for the definitions of selected objects from your query. +- Server Health Dashboard: Get a quick overview of the server’s key metrics. +- Right Alignment for Numeric Values in Grid: Automatically align numeric values to the right in the grid for better readability. +- BULK Data Transfer Between Two Open Connections: Seamlessly transfer bulk data between two open connections with a single click. +- Query History: Maintain a detailed log of executed queries for auditing and easy retrieval. + [SSMSBoost]:http://www.ssmsboost.com/ [SQL Refactor Studio]: https://sqlrefactorstudio.com/ @@ -761,3 +787,4 @@ Adds a true dark theme to SSMS. [DbForge Search Download]:https://www.devart.com/dbforge/sql/search/searchsql22std.exe [SSMS Lizard]:https://www.lizard-labs.com/sql_server_management_studio_ssms_extesnsion_lizard.aspx [SQL Shades]:https://www.sqlshades.com/ +[Axial SQL Tools]:(https://github.com/Axial-SQL/AxialSqlTools) From fa31b06d83ee4026530534450b54e177dbc58aa1 Mon Sep 17 00:00:00 2001 From: Abair Date: Wed, 23 Apr 2025 14:51:40 -0400 Subject: [PATCH 539/553] Update SQL Server Trace Flag.md added info for trace flag 6773 --- SQL Server Trace Flag.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index e20e43b2..b0b9f513 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3465,7 +3465,14 @@ Link: https://support.microsoft.com/kb/4517771
Scope: global only
SQL Server Version: >= 2019 CU1, >= 2017 CU18, >= 2016 SP1 CU10 - + + +#### Trace Flag: 6773 +Function: Enables a fix to address an out of memory issue that occurs when bulk copying XML data where the sum of all XML attributes are > 2MB. This flag can help in circumstances where a client is running bulk copy of XML data and it receives sql error 6303 "XML parsing: Document parsing required too much memory".
+Link: https://support.microsoft.com/en-us/topic/kb4019125-fix-system-center-configuration-manager-replication-process-by-using-bcp-apis-fails-when-there-is-a-large-value-in-an-xml-column-53a969d5-801c-63ab-a557-bc89fe264394
+SQL Server Version: >= 2016 CU7, >= 2014 SP2 CU6, >= 2014 SP1 CU13, >= 2012 SP3 CU9 + + #### Trace Flag: 6950 **Undocumented trace flag**
From 1e8cd4f4c3ff47007c6dd5c5b9b60ade078d38e1 Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Thu, 24 Apr 2025 16:39:57 +0300 Subject: [PATCH 540/553] Add Abair into thanks section --- SQL Server Trace Flag.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index b0b9f513..8aef1d18 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -83,6 +83,7 @@ Source links: - Wilfred van Dijk - Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) - Danilo Zocco (https://github.com/CrazySwimmer) +- Abair (https://github.com/abair34) From f0c0a100e1d21dbbc1cc38972236c6a70b62f79d Mon Sep 17 00:00:00 2001 From: Abair Date: Thu, 24 Apr 2025 13:55:37 -0400 Subject: [PATCH 541/553] Update SQL Server Trace Flag.md --- SQL Server Trace Flag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 8aef1d18..f14ebd75 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -83,7 +83,7 @@ Source links: - Wilfred van Dijk - Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) - Danilo Zocco (https://github.com/CrazySwimmer) -- Abair (https://github.com/abair34) +- Michael Abair (https://github.com/abair34) From 69a2eb515c3f5f386e3968e86a5aaf04edcf16dc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 9 Jun 2025 15:44:47 +0300 Subject: [PATCH 542/553] Add 12502 trace flag Thanks to Mikulas Mraz --- SQL Server Trace Flag.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index f14ebd75..81d38c77 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -84,6 +84,7 @@ Source links: - Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano)) - Danilo Zocco (https://github.com/CrazySwimmer) - Michael Abair (https://github.com/abair34) +- Mikulas Mraz (https://github.com/Prohiller) @@ -5602,6 +5603,20 @@ Scope: global or session
SQL Server Version: >= 2019 CU9, >= 2017 CU21 +### Trace Flag: 12502 +Function: Disables external authorization policies for on-premises SQL Server instances. +Use this flag when you see increased PREEMPTIVE_OS_QUERYREGISTRY waits to occur. Due to a bug a SQL Server might lookup Windows Registry values even for a simple queries which do not work with operating system at all. +Link: [Docs Trace Flags](https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql) +Link: [SQL Server 2022 CU5 Documentation](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate5#2351584) +Scope: global
+SQL Server Version: >= 2022 CU5 + + +Note: In my case vast majority of queries executed against SQL Server started looking up non-existing registry value at: +`HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQLServer\PurviewConfig` +so this buggy behavior might be triggered only after other software gets integrated with SQL Server 2022. + + #### Trace Flag: 12606 Function: Enables Query Store for secondary replicas.
From 465e8885215d385059c0dfa230be7d33ab143c73 Mon Sep 17 00:00:00 2001 From: DataModelingTools <46059055+datensen@users.noreply.github.com> Date: Fri, 20 Jun 2025 10:14:29 +0200 Subject: [PATCH 543/553] Update README.md Added Luna Modeler - database modeling tool --- Utilities/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Utilities/README.md b/Utilities/README.md index a293961e..628e4570 100644 --- a/Utilities/README.md +++ b/Utilities/README.md @@ -217,6 +217,7 @@ Utility types (main purpose), in braces `{}` current counts: | [EMS Data Comparer](#ems-data-comparer) | No | No | [DC] | [EMS Data Comparer] | 2012-11-16 | EMS | | No | $47 | | [NitroAccelerator](#nitroaccelerator) | No | No | [?] | [NitroAccelerator] | 2016-07-10 | Nitrosphere | | No | $1265 | | [ERwin Data Modeler](#erwin-data-modeler) | Oracle,MySQL,PostgreSQL,Other | No | [DA] | [ERwin Data Modeler] | 2016-06-03 | ERwin | | No | $810 | +| [Luna Modeler](#luna-modeler) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [Luna Modeler] | 2022-10-05 | Ideamerit | | No | $99 | | [Toad Data Point](#toad-data-point) | Oracle,MySQL,PostgreSQL,Other | No | [?] | [Toad Data Point] | 2016-06-16 | Quest Software | | No | ? | | [SQL Power Architect](#sql-power-architect) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [SQL Power Architect] | 2016-02-11 | SQLPower | | Yes | $995 | | [DbWrench](#dbwrench) | Oracle,MySQL,PostgreSQL,Other | Linux,Mac | [DA] | [DbWrench] | 2019-09-17 | Nizana Systems | | No | $99 | @@ -3112,6 +3113,18 @@ Price: $810 ERwin Data Modeler is an industry-leading data modeling solution that provides a simple, visual interface to manage your complex data environment +## Luna Modeler + +Download page: [Luna Modeler]
+Release date: 2022-10-05
+Support Version: 2019/2022
+Author: Ideamerit
+Free version: No
+Price: $99 + +Luna Modeler is a database design and data modeling tool for relational databases. With Luna Modeler, you can create ER diagrams, design and visualize database structures, generate SQL scripts, and document your data models. + + ## Toad Data Point Download page: [Toad Data Point]
@@ -6396,6 +6409,7 @@ SQLWATCH is an Open Source (MIT License) Real-Time monitoring solution for SQL S [EMS Data Comparer]:http://www.sqlmanager.net/en/products/mssql/datacomparer [NitroAccelerator]:http://nitrosphere.com/nitroaccelerator/ [ERwin Data Modeler]:http://erwin.com/products/data-modeler +[Luna Modeler]:https://www.datensen.com/luna-modeler-for-relational-databases.html [Toad Data Point]:https://www.quest.com/products/toad-data-point/ [SQL Power Architect]:http://www.sqlpower.ca/page/architect [DbWrench]:http://www.dbwrench.com/ From 4663dfd1628d52c683dc640b34164dd4072c9158 Mon Sep 17 00:00:00 2001 From: dlucre Date: Thu, 24 Jul 2025 09:44:43 +1000 Subject: [PATCH 544/553] The Enable_Statement was selecting the DisableTriggerStatement column. Seems like a copy/paste error. --- Scripts/Disable_Enable_All_Triggers_In_Database.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Disable_Enable_All_Triggers_In_Database.sql b/Scripts/Disable_Enable_All_Triggers_In_Database.sql index fe9feb6f..fd6d032b 100644 --- a/Scripts/Disable_Enable_All_Triggers_In_Database.sql +++ b/Scripts/Disable_Enable_All_Triggers_In_Database.sql @@ -33,7 +33,7 @@ EXEC sys.sp_executesql @Disable_Statement; -- Perpare Variable Script for Execution DECLARE @Enable_Statement nvarchar(max) = ( - SELECT tmp.DisableTriggerStatement + CHAR(10) AS "data()" + SELECT tmp.EnableTriggerStatementTriggerStatement + CHAR(10) AS "data()" FROM #Triggers tmp FOR XML PATH('') ); From c32420ad3fe8f09fe15a0a96a5cb75ba80366c11 Mon Sep 17 00:00:00 2001 From: dlucre Date: Thu, 24 Jul 2025 09:49:54 +1000 Subject: [PATCH 545/553] Revert "The Enable_Statement was selecting the DisableTriggerStatement column. Seems like a copy/paste error." This reverts commit 4663dfd1628d52c683dc640b34164dd4072c9158. Accidentally committed a typo. --- Scripts/Disable_Enable_All_Triggers_In_Database.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Disable_Enable_All_Triggers_In_Database.sql b/Scripts/Disable_Enable_All_Triggers_In_Database.sql index fd6d032b..fe9feb6f 100644 --- a/Scripts/Disable_Enable_All_Triggers_In_Database.sql +++ b/Scripts/Disable_Enable_All_Triggers_In_Database.sql @@ -33,7 +33,7 @@ EXEC sys.sp_executesql @Disable_Statement; -- Perpare Variable Script for Execution DECLARE @Enable_Statement nvarchar(max) = ( - SELECT tmp.EnableTriggerStatementTriggerStatement + CHAR(10) AS "data()" + SELECT tmp.DisableTriggerStatement + CHAR(10) AS "data()" FROM #Triggers tmp FOR XML PATH('') ); From ef4ab5992a9dc02dff0a23d13618bf91bbee2f10 Mon Sep 17 00:00:00 2001 From: dlucre Date: Thu, 24 Jul 2025 09:54:28 +1000 Subject: [PATCH 546/553] Fix Enable_Statement to select the correct EnableTriggerStatement instead of DisableTriggerStatement, Fix a couple of typing mistakes --- Scripts/Disable_Enable_All_Triggers_In_Database.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/Disable_Enable_All_Triggers_In_Database.sql b/Scripts/Disable_Enable_All_Triggers_In_Database.sql index fe9feb6f..5801e967 100644 --- a/Scripts/Disable_Enable_All_Triggers_In_Database.sql +++ b/Scripts/Disable_Enable_All_Triggers_In_Database.sql @@ -21,7 +21,7 @@ INNER JOIN sys.tables ta ON ta.object_id = tr.parent_id INNER JOIN sys.schemas sc ON sc.schema_id = ta.schema_id WHERE tr.is_disabled = 0; --- Perpare Variable Script for Execution +-- Prepare Variable Script for Execution DECLARE @Disable_Statement nvarchar(max) = ( SELECT tmp.DisableTriggerStatement + CHAR(10) AS "data()" FROM #Triggers tmp @@ -31,9 +31,9 @@ DECLARE @Disable_Statement nvarchar(max) = ( -- Execute SQL EXEC sys.sp_executesql @Disable_Statement; --- Perpare Variable Script for Execution +-- Prepare Variable Script for Execution DECLARE @Enable_Statement nvarchar(max) = ( - SELECT tmp.DisableTriggerStatement + CHAR(10) AS "data()" + SELECT tmp.EnableTriggerStatement + CHAR(10) AS data FROM #Triggers tmp FOR XML PATH('') ); From 05431827a54c5cdb9c1928c416771880cba3a4f8 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Tue, 19 Aug 2025 07:18:26 -0700 Subject: [PATCH 547/553] Trace flags 4631 and 4675 --- SQL Server Trace Flag.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 81d38c77..9f741171 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -3343,6 +3343,21 @@ Function: SQL 9 – After 4610 & 4618 you can still customize the quota for Toke Link: https://support.microsoft.com/kb/959823 + +#### Trace Flag: 4631 +Function: Disables SHA2_256/AES256 for hashing passwords that generate encryption keys. Starting in SQL Server 2017 (14.x), SHA2 is used instead of SHA1. This means extra steps might be necessary to have your SQL Server 2017 (14.x) installation decrypt items that were encrypted by SQL Server 2016 (13.x)
+Link: [Encryption Changes in SQL Server 2017 CU2](https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/create-identical-symmetric-keys-on-two-servers?view=sql-server-ver17#encryption-changes-in-sql-server-2017-cu2)
+Link: [KB 4053407: SQL Server 2017 cannot decrypt data encrypted by earlier versions of SQL Server using the same symmetric key](https://support.microsoft.com/kb/4053407)
+Scope: global only + + + +#### Trace Flag: 4675 +Function: Enable checks on create credential for managed identity on a SQL Server on Azure VM if Microsoft Entra authentication is enabled. Enables diagnostics for the CREATE CREDENTAIL WITH IDENTITY = 'Managed Identity' statement. The trace flag provides information about the primary managed identity and its setting for SQL Server on Azure VM.
+Link: [DBCC TRACEON Trace Flags](https://learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver17)
+Scope: global or session + + #### Trace Flag: 5004 Function: Pauses TDE encryption scan and causes encryption scan worker to exit without doing any work. From a5e27335b0285df3c261668d79276054203e7214 Mon Sep 17 00:00:00 2001 From: aarunreddy <66240041+aarunreddy@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:08:04 -0700 Subject: [PATCH 548/553] =?UTF-8?q?Update=20Backup=5FRestore=5FWhat?= =?UTF-8?q?=E2=80=99s=5FMy=5FStatus.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add log backup and log restore status --- "Scripts/Backup_Restore_What\342\200\231s_My_Status.sql" | 2 ++ 1 file changed, 2 insertions(+) diff --git "a/Scripts/Backup_Restore_What\342\200\231s_My_Status.sql" "b/Scripts/Backup_Restore_What\342\200\231s_My_Status.sql" index 9d760042..c7560aa7 100644 --- "a/Scripts/Backup_Restore_What\342\200\231s_My_Status.sql" +++ "b/Scripts/Backup_Restore_What\342\200\231s_My_Status.sql" @@ -28,4 +28,6 @@ FROM sys.dm_exec_requests r WHERE command IN ( 'RESTORE DATABASE' , 'BACKUP DATABASE' + ,'RESTORE LOG' + ,'BACKUP LOG' ); From 86013114946ac34ec1d7e9bd933c7163f57aa056 Mon Sep 17 00:00:00 2001 From: aarunreddy <66240041+aarunreddy@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:19:13 -0700 Subject: [PATCH 549/553] Create Index_Fragmentation_on_DB Find the indexes on a database which are fragmented more than 30% and will provide script as well in Script column. --- Scripts/Index_Fragmentation_on_DB | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Scripts/Index_Fragmentation_on_DB diff --git a/Scripts/Index_Fragmentation_on_DB b/Scripts/Index_Fragmentation_on_DB new file mode 100644 index 00000000..9c6373e0 --- /dev/null +++ b/Scripts/Index_Fragmentation_on_DB @@ -0,0 +1,20 @@ +/** +Author: Arun Agunuru +Find the indexes on a database which are fragmented more than 30% and will provide script as well in Script column. +**/ +use database +go +SELECT dbschemas.[name] as 'Schema', +dbtables.[name] as 'Table', +dbindexes.[name] as 'Index', +indexstats.alloc_unit_type_desc, +indexstats.avg_fragmentation_in_percent, +indexstats.page_count, +'ALTER INDEX [' + dbindexes.[name] + '] ON ['+dbschemas.[name] +'].['+dbtables.[name]+ '] REBUILD PARTITION = ALL WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)' as Script --provide the script to pickup and execute +FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS indexstats +INNER JOIN sys.tables dbtables on dbtables.[object_id] = indexstats.[object_id] +INNER JOIN sys.schemas dbschemas on dbtables.[schema_id] = dbschemas.[schema_id] +INNER JOIN sys.indexes AS dbindexes ON dbindexes.[object_id] = indexstats.[object_id] +AND indexstats.index_id = dbindexes.index_id +WHERE indexstats.database_id = DB_ID() and indexstats.avg_fragmentation_in_percent >= 30 and dbindexes.[name] is NOT NULL +ORDER BY indexstats.avg_fragmentation_in_percent desc From 750c2b48db5401870321bbe79d5472012ea2f9f9 Mon Sep 17 00:00:00 2001 From: samhaese <63563702+samhaese@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:17:53 -0700 Subject: [PATCH 550/553] Typo: Change 'throw' to 'through' --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 5f01ff49..7bbdc746 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -325,7 +325,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. 4. All [Service Broker statements](https://docs.microsoft.com/sql/t-sql/statements/send-transact-sql): > If the SEND statement isn't the first statement in a batch or stored procedure, the preceding statement must be terminated with a semicolon (;). - - All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools. + - All script files should end with `GO` and line break. This is neccesary for batching scripts run through `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. More details [here](https://www.sentryone.com/blog/aaronbertrand/backtobasics-lower-case-data-types). From c3ec2201f4d12cf4b1a61c4659173c572cf8d582 Mon Sep 17 00:00:00 2001 From: samhaese <63563702+samhaese@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:19:30 -0700 Subject: [PATCH 551/553] Typo: change neccesary to necessary --- SQL Server Name Convention and T-SQL Programming Style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Server Name Convention and T-SQL Programming Style.md b/SQL Server Name Convention and T-SQL Programming Style.md index 7bbdc746..2e63ae48 100644 --- a/SQL Server Name Convention and T-SQL Programming Style.md +++ b/SQL Server Name Convention and T-SQL Programming Style.md @@ -325,7 +325,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines. 4. All [Service Broker statements](https://docs.microsoft.com/sql/t-sql/statements/send-transact-sql): > If the SEND statement isn't the first statement in a batch or stored procedure, the preceding statement must be terminated with a semicolon (;). - - All script files should end with `GO` and line break. This is neccesary for batching scripts run through `sqlcmd` or another tools. + - All script files should end with `GO` and line break. This is necessary for batching scripts run through `sqlcmd` or another tools. - Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code. - Data types declaration should be in **lowercase**: `varchar(30)`, `int`, `real`, `nvarchar(max)` etc. More details [here](https://www.sentryone.com/blog/aaronbertrand/backtobasics-lower-case-data-types). From a81aa19e5f62772144f948b099953dd9c0daa2a6 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Mon, 27 Oct 2025 13:33:44 -0400 Subject: [PATCH 552/553] Trace flag 12310 --- SQL Server Trace Flag.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 9f741171..452038d8 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -5570,6 +5570,14 @@ Scope: global or session
SQL Server Version: >= 2019 CU9, >= 2017 CU21 + +#### Trace Flag: 12310 +Function: Availability groups are designed with flow control gates on the primary replica to avoid excessive resource consumption, such as network and memory resources, on all availability replicas. SQL Server 2022 (16.x) increases the limits to the number of messages that each gate allows. By using trace flag 12310, the increased limit is also available to the following versions of SQL Server: SQL Server 2019 (15.x) CU9, SQL Server 2017 (14.x) CU18, SQL Server 2016 (13.x) SP1 CU16.
+Link: https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/monitor-performance-for-always-on-availability-groups?tabs=new-limits#flow-control-gates
+Scope: global
+SQL Server Version: >= 2019 CU9, >= 2017 CU18, >= 2016 SP1 CU16 + + #### Trace Flag: 12311 Function: After TF [12306](#12306) is enabled, you can further enable 12311 trace flag that represent maximum group commit times of **1ms**. This TF is additive whith [12312](#12312), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.
From 14e1becca1c65912653d804dcedae475d17c73fc Mon Sep 17 00:00:00 2001 From: Konstantin Taranov Date: Mon, 26 Jan 2026 16:09:37 +0300 Subject: [PATCH 553/553] Update 2301 and 2330 trace flags info Thanks @brimhj https://github.com/ktaranov/sqlserver-kit/issues/252 --- SQL Server Trace Flag.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SQL Server Trace Flag.md b/SQL Server Trace Flag.md index 452038d8..a553882e 100644 --- a/SQL Server Trace Flag.md +++ b/SQL Server Trace Flag.md @@ -1554,13 +1554,13 @@ Link: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0489f308-2e0c-479 #### Trace Flag: 2301 -Function: Trace flag 2301 enables advanced optimizations that are specific to decision support queries. -This option applies to decision support processing of large data sets.
+Function: Trace flag 2301 enables advanced optimizations that are specific to decision support queries. This option applies to decision support processing of large data sets.This trace flag enables enhanced decision support optimizations, further information on this trace flag can be found in this Microsoft technical note. Trace flag 2301 comes at the expense of increasing compilation and recompilation times. The sweet spot for this trace flag, as “Decision support” suggests is OLAP/reporting/MI style query workloads, rather than turn this on globally, my preference would be to test this on a statement by statement basis using QUERYTRACEON.
Link: [KB920093]
Link: [Docs Trace Flags]
Link: http://www.queryprocessor.com/ce_join_base_containment_assumption
Link: https://connect.microsoft.com/SQLServer/feedback/details/772232/make-optimizer-estimations-more-accurate-by-using-metadata
Link: https://www.sqlservergeeks.com/sql-server-trace-flag-2301/
+Link: https://web.archive.org/web/20160331120855/http://exadat.co.uk/2015/04/14/well-known-and-not-so-well-known-sql-server-tuning-knobs-and-switches/ Scope: global or session or query @@ -1619,9 +1619,9 @@ Link: http://www.queryprocessor.com/few-outer-rows-optimization #### Trace Flag: 2330 -Function: Query performance decreases when sys.dm_db_index_usage_stats has large number of rows
+Function: Query performance decreases when sys.dm_db_index_usage_stats has large number of rows.Statistics collection for the data structures which sys.dm_db_index_usage_stats and sys.dm_db_missing_index_group_stats use is disabled by specifying this trace flag as a start up parameter. Consider using this if there is heavy spin activity on the OPT_IDX_STATS spinlock.
Link: http://www.brentozar.com/archive/2015/11/trace-flag-2330-who-needs-missing-index-requests/
-Link: https://chrisadkin.org/2015/04/14/well-known-and-not-so-well-known-sql-server-tuning-knobs-and-switches/ +Link: https://web.archive.org/web/20160331120855/http://exadat.co.uk/2015/04/14/well-known-and-not-so-well-known-sql-server-tuning-knobs-and-switches/