Skip to content

Commit b0b3678

Browse files
committed
Update Diagnostic Queries to 2018-01 version
1 parent d167aa0 commit b0b3678

10 files changed

+24
-15
lines changed

Scripts/Azure SQL Database Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- Azure SQL Database Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2005 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2005 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlserverperformance.wordpress.com/
66
-- https://www.sqlskills.com/blogs/glenn/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2008 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2008 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://sqlserverperformance.wordpress.com/
66
-- https://www.sqlskills.com/blogs/glenn/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2008 R2 Diagnostic Information Queries.sql

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2008 R2 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: December 20, 2018
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlserverperformance.wordpress.com/
66
-- https://www.sqlskills.com/blogs/glenn/
77
-- Twitter: GlennAlanBerry
@@ -15,7 +15,7 @@
1515
-- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server
1616

1717
--******************************************************************************
18-
--* Copyright (C) 2018 Glenn Berry, SQLskills.com
18+
--* Copyright (C) 2019 Glenn Berry, SQLskills.com
1919
--* All rights reserved.
2020
--*
2121
--* For more scripts and sample code, check out
@@ -457,7 +457,7 @@ ORDER BY avg_io_stall_ms DESC OPTION (RECOMPILE);
457457

458458
-- Recovery model, log reuse wait description, log file size, log usage size (Query 21) (Database Properties)
459459
-- and compatibility level for all databases on instance
460-
SELECT db.[name] AS [Database Name], db.recovery_model_desc AS [Recovery Model],
460+
SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model],
461461
db.log_reuse_wait_desc AS [Log Reuse Wait Description],
462462
ls.cntr_value AS [Log Size (KB)], lu.cntr_value AS [Log Used (KB)],
463463
CAST(CAST(lu.cntr_value AS FLOAT) / CAST(ls.cntr_value AS FLOAT)AS DECIMAL(18,2)) * 100 AS [Log Used %],
@@ -562,6 +562,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE);
562562
------
563563

564564
-- Helps determine which database is using the most CPU resources on the instance
565+
-- Note: This only reflects CPU usage from the currently cached query plans
565566

566567

567568
-- Get I/O utilization by database (Query 25) (IO Usage By Database)
@@ -1370,7 +1371,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE);
13701371
-- Have you done any backup tuning with striped backups, or changing the parameters of the backup command?
13711372

13721373

1373-
-- These three Pluralsight Courses go into more detail about how to run these queries and interpret the results
1374+
-- These five Pluralsight Courses go into more detail about how to run these queries and interpret the results
1375+
1376+
-- SQL Server 2017: Diagnosing Performance Issues with DMVs
1377+
-- https://bit.ly/2FqCeti
1378+
1379+
-- SQL Server 2017: Diagnosing Configuration Issues with DMVs
1380+
-- https://bit.ly/2MSUDUL
13741381

13751382
-- SQL Server 2014 DMV Diagnostic Queries – Part 1
13761383
-- https://bit.ly/2plxCer

Scripts/SQL Server 2012 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2012 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2014 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2014 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2016 Diagnostic Information Queries.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2016 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 14, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry
@@ -86,7 +86,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
8686
-- 13.0.4502.0 SP1 CU9 5/30/2018 ----> 13.0.5149.0 SP2 CU1 5/30/2018
8787
-- 13.0.4514.0 SP1 CU10 7/16/2018 ----> 13.0.5153.0 SP2 CU2 7/16/2018
8888
--13.0.4528.0 SP1 CU11 9/17/2018 ----> 13.0.5216.0 SP2 CU3 9/20/2018
89-
--13.0.4541.0 SP1 CU12 11/13/2018 ---_> 13.0.5233.0 SP2 CU4 11/13/2018
89+
--13.0.4541.0 SP1 CU12 11/13/2018 ----> 13.0.5233.0 SP2 CU4 11/13/2018
90+
--13.0.4550.0 SP1 CU13 1/23/2019 ----> 13.0.5264.1 SP2 CU5 1/23/2019
9091

9192

9293
-- How to determine the version, edition and update level of SQL Server and its components

Scripts/SQL Server 2016 SP2 Diagnostic Information Queries.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2016 SP2 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 14, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry
@@ -68,7 +68,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
6868
-- 13.0.5149.0 SP2 CU1 5/30/2018 https://support.microsoft.com/en-us/help/4135048/cumulative-update-1-for-sql-server-2016-sp2
6969
-- 13.0.5153.0 SP2 CU2 7/16/2018 https://support.microsoft.com/en-us/help/4340355
7070
-- 13.0.5216.0 SP2 CU3 9/20/2018 https://support.microsoft.com/en-us/help/4458871
71-
-- 13.0.5233.0 SP2 CU4 11/13/2018 https://support.microsoft.com/en-us/help/4464106/cumulative-update-4-for-sql-server-2016-sp2
71+
-- 13.0.5233.0 SP2 CU4 11/13/2018 https://support.microsoft.com/en-us/help/4464106/cumulative-update-4-for-sql-server-2016-sp2
72+
-- 13.0.5264.1 SP2 CU5 1/23/2019 https://support.microsoft.com/en-us/help/4475776/cumulative-update-5-for-sql-server-2016-sp2
7273

7374

7475

Scripts/SQL Server 2017 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2017 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 14, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry

Scripts/SQL Server 2019 Diagnostic Information Queries.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2019 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: January 11, 2019
4+
-- Last Modified: February 1, 2019
55
-- https://www.sqlskills.com/blogs/glenn/
66
-- http://sqlserverperformance.wordpress.com/
77
-- Twitter: GlennAlanBerry

0 commit comments

Comments
 (0)