Skip to content

Commit 710f34d

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/dev'
2 parents ef10869 + 482d5d4 commit 710f34d

File tree

9 files changed

+906
-156
lines changed

9 files changed

+906
-156
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# First Responder Kit Release Process
2+
3+
From http://FirstResponderKit.org
4+
5+
This doc explains how to do a release of the First Responder Kit scripts.
6+
7+
It's for internal use at BrentOzar.com, but other folks might find it useful.
8+
9+
Well, useful is probably the wrong word. More like entertaining. Here we go.
10+
11+
## Preparations
12+
13+
* Create a Milestone to tag issues/PRs as you work on them. In Github, go into Issues, Milestones (button at the top), and add a new milestone named YYYY-MM, like 2017-01.
14+
* As you merge pull requests into the dev branch (or before), tag them with the milestone. This makes it easy to find the related issues when you go to write release notes.
15+
16+
17+
## Finalize and Test the Code
18+
19+
* Make sure all issues in the milestone are closed - click Issues, Milestones, and it'll show the percent complete. If there's any issues you want to bump to the next round, add the next round's milestone and tag the issues with it.
20+
* When enough PRs are in dev, do a round of code testing in 2008-2016 in the cloud lab.
21+
* Copy all newly synced scripts to each VM and install in master
22+
* Run _TestBed.sql: this has stored proc calls with common parameters. May have to add in new scenarios if new features are added.
23+
* If it passes, bump all the version numbers inside the scripts.
24+
* sp_foreachdb (no version number yet)
25+
* sp_BlitzWho (no version number yet)
26+
* sp_BlitzIndex @Version and @VersionDate
27+
* sp_BlitzFirst @VersionDate (no version)
28+
* sp_BlitzCache @Version and @VersionDate
29+
* sp_Blitz @VersionDate (no version)
30+
31+
## Push to Master
32+
33+
* Push to the master branch from dev. (Make sure you're pushing FROM dev, TO master.)
34+
* Draft a new release. Click Code, Releases, and edit one of the recent releases to get the Markdown syntax. Copy/paste that into a new release, and put the issue numbers for the relevant changes.
35+
* Publish the release pointing at the current master branch code (not dev).
36+
37+
## Announce It
38+
39+
* Copy the FRK scripts into BrentOzar.com's First Responder Kit zip file (Employees/Products/Download Pack)
40+
* Copy the old zip file's name, delete the old zip file, then create a new zip file with today's date, like First-Responder-Kit-20170126.zip.
41+
* Upload it to u.brentozar.com (s3), set permissions so that it's readable by everyone. Delete the old zip file.
42+
* Change the email download link by going into BrentOzar.com WordPress - click Forms, and in the form list, find First Responder Kit, Settings, Notifications, First Responder Kit. Edit the message to point to the new zip file name.
43+
* Copy the Github release text into a WordPress blog post. 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/
44+
* Create a Mailchimp announcement to people who subscribed to the FRK releases, linking directly to the zip file. (For now, Brent will do this part.)
45+

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ If you want to change anything about a check - the priority, finding, URL, or ID
2626
| 10 | Performance | Auto-Close Enabled | http://BrentOzar.com/go/autoclose | 12 |
2727
| 10 | Performance | Auto-Shrink Enabled | http://BrentOzar.com/go/autoshrink | 13 |
2828
| 10 | Performance | CPU Schedulers Offline | http://BrentOzar.com/go/schedulers | 101 |
29+
| 10 | Performance | CPU w/Odd Number of Cores | http://BrentOzar.com/go/oddity | 198 |
2930
| 10 | Performance | High Memory Use for In-Memory OLTP (Hekaton) | http://BrentOzar.com/go/hekaton | 145 |
3031
| 10 | Performance | Memory Nodes Offline | http://BrentOzar.com/go/schedulers | 110 |
3132
| 10 | Performance | Plan Cache Erased Recently | http://BrentOzar.com/askbrent/plan-cache-erased-recently/ | 125 |

Documentation/sp_BlitzFirst Checks by Priority.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ If you want to change anything about a check - the priority, finding, URL, or ID
2222
| 50 | Query Problems | Plan Cache Erased Recently | http://BrentOzar.com/go/freeproccache | 7 |
2323
| 50 | Query Problems | Re-Compilations/Sec High | http://BrentOzar.com/go/recompile | 16 |
2424
| 50 | Server Performance | High CPU Utilization | http://BrentOzar.com/go/cpu | 24 |
25+
| 50 | Server Performance | High CPU Utilization - Non SQL Processes | http://BrentOzar.com/go/cpu | 28 |
2526
| 50 | Server Performance | Page Life Expectancy Low | http://BrentOzar.com/go/ple | 10 |
2627
| 50 | Server Performance | Slow Data File Reads | http://BrentOzar.com/go/slow | 11 |
2728
| 50 | Server Performance | Slow Log File Writes | http://BrentOzar.com/go/slow | 12 |

LICENSE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
MIT License
22

3-
Copyright (c) 2016 Brent Ozar Unlimited
3+
Copyright for portions of sp_Blitz are held by Microsoft as part of project
4+
tigertoolbox and are provided under the MIT license:
5+
https://github.com/Microsoft/tigertoolbox
6+
7+
All other copyright for sp_Blitz are held by Brent Ozar Unlimited, 2017.
8+
9+
Copyright (c) 2017 Brent Ozar Unlimited
410

511
Permission is hereby granted, free of charge, to any person obtaining a copy
612
of this software and associated documentation files (the "Software"), to deal

sp_Blitz.sql

Lines changed: 114 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ALTER PROCEDURE [dbo].[sp_Blitz]
2929
AS
3030
SET NOCOUNT ON;
3131
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
32-
SET @VersionDate = '20161210';
32+
SET @VersionDate = '20170201';
3333
SET @OutputType = UPPER(@OutputType);
3434

3535
IF @Help = 1 PRINT '
@@ -72,9 +72,17 @@ AS
7272
@IgnorePrioritiesAbove 50=ignore priorities above 50
7373
For the rest of the parameters, see http://www.brentozar.com/blitz/documentation for details.
7474
75+
76+
7577
MIT License
78+
79+
Copyright for portions of sp_Blitz are held by Microsoft as part of project
80+
tigertoolbox and are provided under the MIT license:
81+
https://github.com/Microsoft/tigertoolbox
82+
83+
All other copyright for sp_Blitz are held by Brent Ozar Unlimited, 2017.
7684
77-
Copyright (c) 2016 Brent Ozar Unlimited
85+
Copyright (c) 2017 Brent Ozar Unlimited
7886
7987
Permission is hereby granted, free of charge, to any person obtaining a copy
8088
of this software and associated documentation files (the "Software"), to deal
@@ -95,6 +103,8 @@ AS
95103
SOFTWARE.
96104
97105
106+
107+
98108
*/'
99109
ELSE IF @OutputType = 'SCHEMA'
100110
BEGIN
@@ -104,17 +114,6 @@ AS
104114
ELSE /* IF @OutputType = 'SCHEMA' */
105115
BEGIN
106116

107-
/*
108-
We start by creating #BlitzResults. It's a temp table that will store all of
109-
the results from our checks. Throughout the rest of this stored procedure,
110-
we're running a series of checks looking for dangerous things inside the SQL
111-
Server. When we find a problem, we insert rows into #BlitzResults. At the
112-
end, we return these results to the end user.
113-
114-
#BlitzResults has a CheckID field, but there's no Check table. As we do
115-
checks, we insert data into this table, and we manually put in the CheckID.
116-
For a list of checks, visit http://FirstResponderKit.org.
117-
*/
118117
DECLARE @StringToExecute NVARCHAR(4000)
119118
,@curr_tracefilename NVARCHAR(500)
120119
,@base_tracefilename NVARCHAR(500)
@@ -147,6 +146,20 @@ AS
147146
SET @crlf = NCHAR(13) + NCHAR(10);
148147
SET @ResultText = 'sp_Blitz Results: ' + @crlf;
149148

149+
/*
150+
--TOURSTOP01--
151+
See https://www.BrentOzar.com/go/blitztour for a guided tour.
152+
153+
We start by creating #BlitzResults. It's a temp table that will store all of
154+
the results from our checks. Throughout the rest of this stored procedure,
155+
we're running a series of checks looking for dangerous things inside the SQL
156+
Server. When we find a problem, we insert rows into #BlitzResults. At the
157+
end, we return these results to the end user.
158+
159+
#BlitzResults has a CheckID field, but there's no Check table. As we do
160+
checks, we insert data into this table, and we manually put in the CheckID.
161+
For a list of checks, visit http://FirstResponderKit.org.
162+
*/
150163
IF OBJECT_ID('tempdb..#BlitzResults') IS NOT NULL
151164
DROP TABLE #BlitzResults;
152165
CREATE TABLE #BlitzResults
@@ -187,6 +200,7 @@ AS
187200
not used. YET. We added that parameter in so that we could avoid changing the
188201
stored proc's surface area (interface) later.
189202
*/
203+
/* --TOURSTOP07-- */
190204
IF OBJECT_ID('tempdb..#SkipChecks') IS NOT NULL
191205
DROP TABLE #SkipChecks;
192206
CREATE TABLE #SkipChecks
@@ -231,7 +245,8 @@ AS
231245
END
232246

233247

234-
/* If the server is Amazon RDS, skip checks that it doesn't allow */
248+
/* --TOURSTOP08-- */
249+
/* If the server is Amazon RDS, skip checks that it doesn't allow */
235250
IF LEFT(CAST(SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS VARCHAR(8000)), 8) = 'EC2AMAZ-'
236251
AND LEFT(CAST(SERVERPROPERTY('MachineName') AS VARCHAR(8000)), 8) = 'EC2AMAZ-'
237252
AND LEFT(CAST(SERVERPROPERTY('ServerName') AS VARCHAR(8000)), 8) = 'EC2AMAZ-'
@@ -966,10 +981,12 @@ AS
966981
END
967982

968983

984+
/* --TOURSTOP06-- */
969985
IF NOT EXISTS ( SELECT 1
970986
FROM #SkipChecks
971987
WHERE DatabaseName IS NULL AND CheckID = 7 )
972988
BEGIN
989+
/* --TOURSTOP02-- */
973990
INSERT INTO #BlitzResults
974991
( CheckID ,
975992
Priority ,
@@ -1284,6 +1301,7 @@ AS
12841301
FROM #SkipChecks
12851302
WHERE DatabaseName IS NULL AND CheckID = 21 )
12861303
BEGIN
1304+
/* --TOURSTOP04-- */
12871305
IF @@VERSION NOT LIKE '%Microsoft SQL Server 2000%'
12881306
AND @@VERSION NOT LIKE '%Microsoft SQL Server 2005%'
12891307
BEGIN
@@ -3317,7 +3335,7 @@ AS
33173335

33183336

33193337
/*This checks to see if Agent is Offline*/
3320-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
3338+
IF @ProductVersionMajor >= 10
33213339
AND NOT EXISTS ( SELECT 1
33223340
FROM #SkipChecks
33233341
WHERE DatabaseName IS NULL AND CheckID = 167 )
@@ -3352,7 +3370,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
33523370
END;
33533371

33543372
/*This checks to see if the Full Text thingy is offline*/
3355-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
3373+
IF @ProductVersionMajor >= 10
33563374
AND NOT EXISTS ( SELECT 1
33573375
FROM #SkipChecks
33583376
WHERE DatabaseName IS NULL AND CheckID = 168 )
@@ -3386,7 +3404,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
33863404
END;
33873405

33883406
/*This checks which service account SQL Server is running as.*/
3389-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
3407+
IF @ProductVersionMajor >= 10
33903408
AND NOT EXISTS ( SELECT 1
33913409
FROM #SkipChecks
33923410
WHERE DatabaseName IS NULL AND CheckID = 169 )
@@ -3422,7 +3440,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
34223440
END;
34233441

34243442
/*This checks which service account SQL Agent is running as.*/
3425-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
3443+
IF @ProductVersionMajor >= 10
34263444
AND NOT EXISTS ( SELECT 1
34273445
FROM #SkipChecks
34283446
WHERE DatabaseName IS NULL AND CheckID = 170 )
@@ -3457,7 +3475,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
34573475
END;
34583476

34593477
/*This counts memory dumps and gives min and max date of in view*/
3460-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
3478+
IF @ProductVersionMajor >= 10
34613479
AND NOT EXISTS ( SELECT 1
34623480
FROM #SkipChecks
34633481
WHERE DatabaseName IS NULL AND CheckID = 171 )
@@ -3810,6 +3828,51 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
38103828
'Mismatch between the number of TempDB files in sys.master_files versus tempdb.sys.database_files' AS [Details]
38113829
END
38123830

3831+
/*Perf - Odd number of cores in a socket*/
3832+
IF NOT EXISTS ( SELECT 1
3833+
FROM #SkipChecks
3834+
WHERE DatabaseName IS NULL
3835+
AND CheckID = 198 )
3836+
AND EXISTS ( SELECT 1
3837+
FROM sys.dm_os_schedulers
3838+
WHERE is_online = 1
3839+
AND scheduler_id < 255
3840+
AND parent_node_id < 64
3841+
GROUP BY parent_node_id,
3842+
is_online
3843+
HAVING ( COUNT(cpu_id) + 2 ) % 2 = 1 )
3844+
BEGIN
3845+
3846+
INSERT INTO #BlitzResults
3847+
(
3848+
CheckID,
3849+
DatabaseName,
3850+
Priority,
3851+
FindingsGroup,
3852+
Finding,
3853+
URL,
3854+
Details
3855+
)
3856+
SELECT 198 AS CheckID,
3857+
NULL AS DatabaseName,
3858+
10 AS Priority,
3859+
'Performance' AS FindingsGroup,
3860+
'CPU w/Odd Number of Cores' AS Finding,
3861+
'http://BrentOzar.com/go/oddity' AS URL,
3862+
'Node ' + CONVERT(VARCHAR(10), parent_node_id) + ' has ' + CONVERT(VARCHAR(10), COUNT(cpu_id))
3863+
+ CASE WHEN COUNT(cpu_id) = 1 THEN ' core assigned to it. This is a really bad NUMA configuration.'
3864+
ELSE ' cores assigned to it. This is a really bad NUMA configuration.'
3865+
END AS Details
3866+
FROM sys.dm_os_schedulers
3867+
WHERE is_online = 1
3868+
AND scheduler_id < 255
3869+
AND parent_node_id < 64
3870+
GROUP BY parent_node_id,
3871+
is_online
3872+
HAVING ( COUNT(cpu_id) + 2 ) % 2 = 1;
3873+
3874+
END;
3875+
38133876

38143877
IF @CheckUserDatabaseObjects = 1
38153878
BEGIN
@@ -3846,6 +3909,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
38463909
WHERE DatabaseName IS NULL AND CheckID = 163 )
38473910
AND EXISTS(SELECT * FROM sys.all_objects WHERE name = 'database_query_store_options')
38483911
BEGIN
3912+
/* --TOURSTOP03-- */
38493913
EXEC dbo.sp_MSforeachdb 'USE [?];
38503914
INSERT INTO #BlitzResults
38513915
(CheckID,
@@ -3862,36 +3926,39 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
38623926
''Query Store Disabled'',
38633927
''http://BrentOzar.com/go/querystore'',
38643928
(''The new SQL Server 2016 Query Store feature has not been enabled on this database.'')
3865-
FROM [?].sys.database_query_store_options WHERE desired_state = 0 AND ''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'')';
3929+
FROM [?].sys.database_query_store_options WHERE desired_state = 0
3930+
AND ''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'')';
38663931
END
38673932

3868-
IF NOT EXISTS ( SELECT 1
3869-
FROM #SkipChecks
3870-
WHERE DatabaseName IS NULL AND CheckID = 182 )
3871-
AND EXISTS(SELECT * FROM sys.all_objects WHERE name = 'database_query_store_options')
3933+
3934+
IF @ProductVersionMajor >= 13 AND @ProductVersionMinor < 2149 --CU1 has the fix in it
3935+
AND NOT EXISTS ( SELECT 1
3936+
FROM #SkipChecks
3937+
WHERE DatabaseName IS NULL AND CheckID = 182 )
38723938
AND CAST(SERVERPROPERTY('edition') AS VARCHAR(100)) NOT LIKE '%Enterprise%'
38733939
AND CAST(SERVERPROPERTY('edition') AS VARCHAR(100)) NOT LIKE '%Developer%'
3874-
BEGIN
3875-
EXEC dbo.sp_MSforeachdb 'USE [?];
3876-
INSERT INTO #BlitzResults
3877-
(CheckID,
3878-
DatabaseName,
3879-
Priority,
3880-
FindingsGroup,
3881-
Finding,
3882-
URL,
3883-
Details)
3884-
SELECT TOP 1 182,
3885-
''?'',
3886-
20,
3887-
''Reliability'',
3888-
''Query Store Cleanup Disabled'',
3889-
''http://BrentOzar.com/go/cleanup'',
3890-
(''SQL 2016 RTM has a bug involving dumps that happen every time Query Store cleanup jobs run.'')
3891-
FROM [?].sys.database_query_store_options WHERE desired_state <> 0 AND ''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'')';
3940+
BEGIN
3941+
SET @StringToExecute = 'INSERT INTO #BlitzResults
3942+
(CheckID,
3943+
DatabaseName,
3944+
Priority,
3945+
FindingsGroup,
3946+
Finding,
3947+
URL,
3948+
Details)
3949+
SELECT TOP 1
3950+
182,
3951+
''Server'',
3952+
20,
3953+
''Reliability'',
3954+
''Query Store Cleanup Disabled'',
3955+
''http://BrentOzar.com/go/cleanup'',
3956+
(''SQL 2016 RTM has a bug involving dumps that happen every time Query Store cleanup jobs run. This is fixed in CU1 and later: https://sqlserverupdates.com/sql-server-2016-updates/'')
3957+
FROM sys.databases AS d
3958+
WHERE d.is_query_store_on = 1;'
3959+
EXECUTE(@StringToExecute)
38923960
END
38933961

3894-
38953962
IF NOT EXISTS ( SELECT 1
38963963
FROM #SkipChecks
38973964
WHERE DatabaseName IS NULL AND CheckID = 41 )
@@ -4017,7 +4084,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
40174084
''Licensing'',
40184085
''Enterprise Edition Features In Use'',
40194086
''http://BrentOzar.com/go/ee'',
4020-
(''The ['' + DB_NAME() + ''] database is using '' + feature_name + ''. If this database is restored onto a Standard Edition server, the restore will fail.'')
4087+
(''The ['' + DB_NAME() + ''] database is using '' + feature_name + ''. If this database is restored onto a Standard Edition server, the restore will fail on versions prior to 2016 SP1.'')
40214088
FROM [?].sys.dm_db_persisted_sku_features';
40224089
END;
40234090
END
@@ -5411,7 +5478,7 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
54115478
BEGIN
54125479

54135480
/*This checks Windows version. It would be better if Microsoft gave everything a separate build number, but whatever.*/
5414-
IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
5481+
IF @ProductVersionMajor >= 10
54155482
AND NOT EXISTS ( SELECT 1
54165483
FROM #SkipChecks
54175484
WHERE DatabaseName IS NULL AND CheckID = 172 )
@@ -5954,7 +6021,7 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
59546021

59556022
END
59566023

5957-
/* Add credits for the nice folks who put so much time into building and maintaining this for free: */
6024+
/* Add credits for the nice folks who put so much time into building and maintaining this for free: */
59586025
INSERT INTO #BlitzResults
59596026
( CheckID ,
59606027
Priority ,
@@ -6281,6 +6348,7 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
62816348
END
62826349
ELSE IF @OutputType <> 'NONE'
62836350
BEGIN
6351+
/* --TOURSTOP05-- */
62846352
SELECT [Priority] ,
62856353
[FindingsGroup] ,
62866354
[Finding] ,

0 commit comments

Comments
 (0)