Skip to content

Commit f44f654

Browse files
committed
Merge branch 'dev'
2 parents 4a3a2ee + 260a207 commit f44f654

16 files changed

+1311
-697
lines changed

Documentation/Development/ReleaseProcess.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Well, useful is probably the wrong word. More like entertaining. Here we go.
3434
* sp_BlitzQueryStore @Version and @VersionDate
3535
* sp_AllNightLog @Version and @VersionDate
3636
* sp_AllNightLog_Setup @Version and @VersionDate
37+
* sp_BlitzInMemoryOLTP @Version and @VersionDate
3738

3839
## Push to Master
3940

@@ -47,14 +48,12 @@ Well, useful is probably the wrong word. More like entertaining. Here we go.
4748
* Copy the FirstResponderKit.zip into Employees/Public.BrentOzar
4849
* For PowerBi, only keep the .pbit file
4950
* Copy the Github release text into a WordPress blog post with the First Responder Kit Updates category. The nice thing about doing the Github release first is that you should be able to copy/paste the Github release page and the HTML should paste smoothly into the WordPress draft window, complete with links to the Github issues. At the end of the post, put a download now link that points to: https://www.brentozar.com/first-aid/
50-
5151
* Blog post support wording:
5252

5353
<h3>For Support</h3>
5454

55-
<strong>You can <a href="https://www.brentozar.com/first-aid/">download the updated FirstResponderKit.zip here</a>.</strong>
56-
5755
When you have questions about how the tools work, talk with the community in the <a href="https://sqlcommunity.slack.com/messages/firstresponderkit/" target="_blank" rel="noopener">#FirstResponderKit Slack channel</a>. If you need a free invite, hit <a href="http://SQLslack.com/" target="_blank" rel="noopener">SQLslack.com</a>. Be patient - it's staffed with volunteers who have day jobs, heh.
56+
5857
When you find a bug or want something changed, read the <a href="https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/master/CONTRIBUTING.md" target="_blank" rel="noopener">contributing.md</a> file.
5958

6059
When you have a question about what the scripts found, first make sure you read the "More Details" URL for any warning you find. We put a lot of work into documentation, and we wouldn't want someone to yell at you to go read the fine manual. After that, when you've still got questions about how something works in SQL Server, post a question at <a href="http://dba.stackexchange.com" target="_blank" rel="noopener">DBA.StackExchange.com</a> and the community (that includes us!) will help. Include exact errors and any applicable screenshots, your SQL Server version number (including the build #), and the version of the tool you're working with.

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
66

77
If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.
88

9-
CURRENT HIGH CHECKID: 216
10-
If you want to add a new one, start at 217
9+
CURRENT HIGH CHECKID: 217
10+
If you want to add a new one, start at 218
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
@@ -87,6 +87,7 @@ If you want to add a new one, start at 217
8787
| 100 | Performance | Stored Procedure WITH RECOMPILE | https://www.BrentOzar.com/go/recompile | 78 |
8888
| 100 | Performance | Unusual SQL Server Edition | https://www.BrentOzar.com/go/workgroup | 97 |
8989
| 100 | Performance | Implicit Transactions | https://www.brentozar.com/go/ImplicitTransactions/ | 215 |
90+
| 100 | Reliability | Cumulative Update Available | https://SQLServerUpdates.com | 217 |
9091
| 110 | Performance | Active Tables Without Clustered Indexes | https://www.BrentOzar.com/go/heaps | 38 |
9192
| 110 | Performance | Auto-Create Stats Disabled | https://www.BrentOzar.com/go/acs | 15 |
9293
| 110 | Performance | Auto-Update Stats Disabled | https://www.BrentOzar.com/go/aus | 16 |

Install-All-Scripts.sql

Lines changed: 364 additions & 231 deletions
Large diffs are not rendered by default.

Install-Core-Blitz-No-Query-Store.sql

Lines changed: 260 additions & 97 deletions
Large diffs are not rendered by default.

Install-Core-Blitz-With-Query-Store.sql

Lines changed: 274 additions & 111 deletions
Large diffs are not rendered by default.

sp_Blitz.sql

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ AS
3232
SET NOCOUNT ON;
3333
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3434
DECLARE @Version VARCHAR(30);
35-
SET @Version = '6.6';
36-
SET @VersionDate = '20180601';
35+
SET @Version = '6.7';
36+
SET @VersionDate = '20180701';
3737
SET @OutputType = UPPER(@OutputType);
3838

3939
IF @Help = 1 PRINT '
@@ -81,9 +81,9 @@ AS
8181
tigertoolbox and are provided under the MIT license:
8282
https://github.com/Microsoft/tigertoolbox
8383
84-
All other copyright for sp_Blitz are held by Brent Ozar Unlimited, 2017.
84+
All other copyright for sp_Blitz are held by Brent Ozar Unlimited, 2018.
8585
86-
Copyright (c) 2017 Brent Ozar Unlimited
86+
Copyright (c) 2018 Brent Ozar Unlimited
8787
8888
Permission is hereby granted, free of charge, to any person obtaining a copy
8989
of this software and associated documentation files (the "Software"), to deal
@@ -322,6 +322,9 @@ AS
322322
INSERT INTO #SkipChecks (CheckID) VALUES (177);
323323
INSERT INTO #SkipChecks (CheckID) VALUES (180); /* 180/181 are maintenance plans */
324324
INSERT INTO #SkipChecks (CheckID) VALUES (181);
325+
INSERT INTO #SkipChecks (CheckID) VALUES (184); /* xp_readerrorlog checking for IFI */
326+
INSERT INTO #SkipChecks (CheckID) VALUES (211); /* xp_regread checking for power saving */
327+
INSERT INTO #SkipChecks (CheckID) VALUES (212); /* xp_regread */
325328
END; /* Amazon RDS skipped checks */
326329

327330
/* If the server is ExpressEdition, skip checks that it doesn't allow */
@@ -2022,7 +2025,8 @@ AS
20222025
+ CAST(create_date AS VARCHAR(20))
20232026
+ '. Tables in the master database may not be restored in the event of a disaster.' ) AS Details
20242027
FROM master.sys.tables
2025-
WHERE is_ms_shipped = 0;
2028+
WHERE is_ms_shipped = 0
2029+
AND name NOT IN ('CommandLog','SqlServerVersions');
20262030
END;
20272031

20282032
IF NOT EXISTS ( SELECT 1
@@ -3299,6 +3303,44 @@ AS
32993303

33003304
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 125) WITH NOWAIT;
33013305

3306+
DECLARE @user_perm_sql NVARCHAR(MAX) = N'';
3307+
DECLARE @user_perm_gb_out DECIMAL(38,2);
3308+
3309+
IF @ProductVersionMajor >= 11
3310+
3311+
BEGIN
3312+
3313+
SET @user_perm_sql += N'
3314+
SELECT @user_perm_gb = CASE WHEN (pages_kb / 128.0 / 1024.) >= 2.
3315+
THEN CONVERT(DECIMAL(38, 2), (pages_kb / 128.0 / 1024.))
3316+
ELSE NULL
3317+
END
3318+
FROM sys.dm_os_memory_clerks
3319+
WHERE type = ''USERSTORE_TOKENPERM''
3320+
AND name = ''TokenAndPermUserStore''
3321+
';
3322+
3323+
END
3324+
3325+
IF @ProductVersionMajor < 11
3326+
3327+
BEGIN
3328+
SET @user_perm_sql += N'
3329+
SELECT @user_perm_gb = CASE WHEN ((single_pages_kb + multi_pages_kb) / 1024.0 / 1024.) >= 2.
3330+
THEN CONVERT(DECIMAL(38, 2), ((single_pages_kb + multi_pages_kb) / 1024.0 / 1024.))
3331+
ELSE NULL
3332+
END
3333+
FROM sys.dm_os_memory_clerks
3334+
WHERE type = ''USERSTORE_TOKENPERM''
3335+
AND name = ''TokenAndPermUserStore''
3336+
';
3337+
3338+
END
3339+
3340+
EXEC sys.sp_executesql @user_perm_sql,
3341+
N'@user_perm_gb DECIMAL(38,2) OUTPUT',
3342+
@user_perm_gb = @user_perm_gb_out OUTPUT
3343+
33023344
INSERT INTO #BlitzResults
33033345
(CheckID,
33043346
Priority,
@@ -3307,7 +3349,11 @@ AS
33073349
URL,
33083350
Details)
33093351
SELECT TOP 1 125, 10, 'Performance', 'Plan Cache Erased Recently', 'https://BrentOzar.com/askbrent/plan-cache-erased-recently/',
3310-
'The oldest query in the plan cache was created at ' + CAST(creation_time AS NVARCHAR(50)) + '. Someone ran DBCC FREEPROCCACHE, restarted SQL Server, or it is under horrific memory pressure.'
3352+
'The oldest query in the plan cache was created at ' + CAST(creation_time AS NVARCHAR(50))
3353+
+ CASE WHEN @user_perm_gb_out IS NULL
3354+
THEN '. Someone ran DBCC FREEPROCCACHE, restarted SQL Server, or it is under horrific memory pressure.'
3355+
ELSE '. You also have ' + CONVERT(NVARCHAR(20), @user_perm_gb_out) + ' GB of USERSTORE_TOKENPERM, which could indicate unusual memory consumption.'
3356+
END
33113357
FROM sys.dm_exec_query_stats WITH (NOLOCK)
33123358
ORDER BY creation_time;
33133359
END;
@@ -3439,6 +3485,25 @@ AS
34393485

34403486
END;
34413487

3488+
/* Cumulative Update Available */
3489+
IF NOT EXISTS ( SELECT 1
3490+
FROM #SkipChecks
3491+
WHERE DatabaseName IS NULL AND CheckID = 217 )
3492+
AND SERVERPROPERTY('EngineEdition') NOT IN (5,8) /* Azure Managed Instances and Azure SQL DB*/
3493+
AND EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'SqlServerVersions' AND TABLE_TYPE = 'BASE TABLE')
3494+
AND NOT EXISTS (SELECT * FROM #BlitzResults WHERE CheckID IN (128, 129, 157, 189, 216)) /* Other version checks */
3495+
BEGIN
3496+
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 217) WITH NOWAIT;
3497+
3498+
INSERT INTO #BlitzResults(CheckID, Priority, FindingsGroup, Finding, URL, Details)
3499+
SELECT TOP 1 217, 100, 'Reliability', 'Cumulative Update Available', COALESCE(v.Url, 'https://SQLServerUpdates.com/'),
3500+
v.MinorVersionName + ' was released on ' + CAST(CONVERT(DATETIME, v.ReleaseDate, 112) AS VARCHAR(100))
3501+
FROM dbo.SqlServerVersions v
3502+
WHERE v.MajorVersionNumber = @ProductVersionMajor
3503+
AND v.MinorVersionNumber > @ProductVersionMinor
3504+
ORDER BY v.MinorVersionNumber DESC;
3505+
END;
3506+
34423507
/* Performance - High Memory Use for In-Memory OLTP (Hekaton) */
34433508
IF NOT EXISTS ( SELECT 1
34443509
FROM #SkipChecks
@@ -7324,12 +7389,19 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
73247389

73257390
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 211) WITH NOWAIT;
73267391

7327-
DECLARE @outval VARCHAR(36);
7392+
DECLARE @outval VARCHAR(36);
7393+
/* Get power plan if set by group policy [Git Hub Issue #1620] */
7394+
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',
7395+
@key = 'SOFTWARE\Policies\Microsoft\Power\PowerSettings',
7396+
@value_name = 'ActivePowerScheme',
7397+
@value = @outval OUTPUT;
7398+
7399+
IF @outval IS NULL /* If power plan was not set by group policy, get local value [Git Hub Issue #1620]*/
73287400
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',
73297401
@key = 'SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes',
73307402
@value_name = 'ActivePowerScheme',
73317403
@value = @outval OUTPUT;
7332-
7404+
73337405
DECLARE @cpu_speed_mhz int,
73347406
@cpu_speed_ghz decimal(18,2);
73357407

sp_BlitzBackups.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ AS
2121
SET NOCOUNT ON;
2222
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2323
DECLARE @Version VARCHAR(30);
24-
SET @Version = '2.6';
25-
SET @VersionDate = '20180601';
24+
SET @Version = '2.7';
25+
SET @VersionDate = '20180701';
2626

2727
IF @Help = 1 PRINT '
2828
/*

0 commit comments

Comments
 (0)