Skip to content

Commit cec03cf

Browse files
committed
Glenn Berry Diagnostic Information Queries October 2017 release
1 parent fa2b812 commit cec03cf

4 files changed

Lines changed: 91 additions & 75 deletions

Scripts/SQL Server 2012 Diagnostic Information Queries.sql

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

22
-- SQL Server 2012 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- September 2017
5-
-- Last Modified: September 4, 2017
4+
-- Last Modified: October 7, 2017
65
-- https://www.sqlskills.com/blogs/glenn/
76
-- http://sqlserverperformance.wordpress.com/
87
-- Twitter: GlennAlanBerry
@@ -50,8 +49,8 @@ IF NOT EXISTS (SELECT * WHERE CONVERT(varchar(128), SERVERPROPERTY('ProductVersi
5049
SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version Info];
5150
------
5251

53-
-- SQL Server 2012 RTM Branch Builds SQL Server 2012 SP1 Branch Builds SQL Server 2012 SP2 Branch Builds SQL Server 2012 SP3 Branch Builds
54-
-- Build Description Release Date Build Description Release Date Build Description Release Date Build Description Release Date
52+
-- SQL Server 2012 RTM Branch Builds SQL Server 2012 SP1 Branch Builds SQL Server 2012 SP2 Branch Builds SQL Server 2012 SP3 Branch Builds SQL Server 2012 SP4 Branch Builds
53+
-- Build Description Release Date Build Description Release Date Build Description Release Date Build Description Release Date Build Description Release Date
5554
-- 11.0.2100 RTM 3/6/2012
5655
-- 11.0.2316 RTM CU1 4/12/2012
5756
-- 11.0.2325 RTM CU2 6/18/2012 --> 11.0.3000 SP1 RTM 11/7/2012
@@ -87,7 +86,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
8786
-- 11.0.6594 SP3 CU8 3/20/2017
8887
-- 11.0.6598 SP3 CU9 5/15/2017
8988
-- 11.0.6607 SP3 CU10 8/8/2017
90-
89+
-- 11.0.7001 SP4 RTM 10/3/2017
9190

9291
-- How to determine the version, edition and update level of SQL Server and its components
9392
-- https://support.microsoft.com/en-us/kb/321185
@@ -1292,7 +1291,8 @@ INNER JOIN sys.dm_db_missing_index_details AS mid WITH (NOLOCK)
12921291
ON mig.index_handle = mid.index_handle
12931292
INNER JOIN sys.partitions AS p WITH (NOLOCK)
12941293
ON p.[object_id] = mid.[object_id]
1295-
WHERE mid.database_id = DB_ID()
1294+
WHERE mid.database_id = DB_ID()
1295+
AND p.index_id < 2
12961296
ORDER BY index_advantage DESC OPTION (RECOMPILE);
12971297
------
12981298

Scripts/SQL Server 2014 Diagnostic Information Queries.sql

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

22
-- SQL Server 2014 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- September 2017
5-
-- Last Modified: September 4, 2017
4+
-- Last Modified: October 5, 2017
65
-- https://www.sqlskills.com/blogs/glenn/
76
-- http://sqlserverperformance.wordpress.com/
87
-- Twitter: GlennAlanBerry
@@ -1374,7 +1373,8 @@ INNER JOIN sys.dm_db_missing_index_details AS mid WITH (NOLOCK)
13741373
ON mig.index_handle = mid.index_handle
13751374
INNER JOIN sys.partitions AS p WITH (NOLOCK)
13761375
ON p.[object_id] = mid.[object_id]
1377-
WHERE mid.database_id = DB_ID()
1376+
WHERE mid.database_id = DB_ID()
1377+
AND p.index_id < 2
13781378
ORDER BY index_advantage DESC OPTION (RECOMPILE);
13791379
------
13801380

Scripts/SQL Server 2016 Diagnostic Information Queries.sql

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

22
-- SQL Server 2016 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- September 2017
5-
-- Last Modified: September 4, 2017
4+
-- Last Modified: October 5, 2017
65
-- https://www.sqlskills.com/blogs/glenn/
76
-- http://sqlserverperformance.wordpress.com/
87
-- Twitter: GlennAlanBerry
@@ -68,11 +67,12 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
6867
-- 13.0.1708.0 RTM-GDR 6/12/2016
6968
-- 13.0.2149.0 RTM CU1 7/25/2016
7069
-- 13.0.2164.0 RTM CU2 9/22/2016
71-
-- 13.0.2186.0 RTM CU3 11/16/2016 ----> 13.0.4001.0 SP1 RTM 11/16/2016
70+
-- 13.0.2186.0 RTM CU3 11/16/2016 ----> 13.0.4001.0 SP1 RTM 11/16/2016
7271
-- 13.0.2193.0 RTM CU4 1/18/2017 ----> 13.0.4411.0 SP1 CU1 1/18/2017
7372
-- 13.0.2197.0 RTM CU5 3/20/2017 ----> 13.0.4422.0 SP1 CU2 3/20/2017
7473
-- 13.0.2204.0 RTM CU6 5/15/2017 ----> 13.0.4435.0 SP1 CU3 5/15/2017
7574
-- 13.0.2210.0 RTM CU7 8/8/2017 ----> 13.0.4446.0 SP1 CU4 8/8/2017
75+
-- 13.0.2213.0 RTM CU8 9/18/2017 ----> 13.0.4451.0 SP1 CU5 9/18/2017
7676

7777

7878
-- How to determine the version, edition and update level of SQL Server and its components
@@ -1452,7 +1452,8 @@ INNER JOIN sys.dm_db_missing_index_details AS mid WITH (NOLOCK)
14521452
ON mig.index_handle = mid.index_handle
14531453
INNER JOIN sys.partitions AS p WITH (NOLOCK)
14541454
ON p.[object_id] = mid.[object_id]
1455-
WHERE mid.database_id = DB_ID()
1455+
WHERE mid.database_id = DB_ID()
1456+
AND p.index_id < 2
14561457
ORDER BY index_advantage DESC OPTION (RECOMPILE);
14571458
------
14581459

0 commit comments

Comments
 (0)