Skip to content

Commit 8e5b698

Browse files
authored
#1994 sp_Blitz version checking (#2028)
Changed wording from "consistency check" to "version check," updated check IDs, removed mandatory scripts. Closes #1994.
1 parent 95fdef7 commit 8e5b698

File tree

2 files changed

+68
-67
lines changed

2 files changed

+68
-67
lines changed

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 5 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: 225.
10-
If you want to add a new one, start at 226.
9+
CURRENT HIGH CHECKID: 228.
10+
If you want to add a new one, start at 229.
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
@@ -297,5 +297,8 @@ If you want to add a new one, start at 226.
297297
| 250 | Server Info | Windows Version | | 172 |
298298
| 250 | Server Info | Power Plan | | 211 |
299299
| 250 | Server Info | Stacked Instances | https://www.brentozar.com/go/babygotstacked/ | 212 |
300+
| 253 | First Responder Kit | Version Check Failed | http://FirstResponderKit.org | 226 |
301+
| 253 | First Responder Kit | Component Missing | http://FirstResponderKit.org | 227 |
302+
| 253 | First Responder Kit | Component Outdated | http://FirstResponderKit.org | 228 |
300303
| 254 | Rundate | (Current Date) | | 156 |
301304
| 255 | Thanks! | From Your Community Volunteers | | -1 |

sp_Blitz.sql

Lines changed: 63 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4397,8 +4397,6 @@ BEGIN
43974397
' UNION ALL ' + @crlf +
43984398
' SELECT ''sp_BlitzFirst'',''P'',0' + @crlf +
43994399
' UNION ALL' + @crlf +
4400-
' SELECT ''sp_BlitzInMemoryOLTP'',''P'',0' + @crlf +
4401-
' UNION ALL ' + @crlf +
44024400
' SELECT ''sp_BlitzIndex'',''P'',0' + @crlf +
44034401
' UNION ALL ' + @crlf +
44044402
' SELECT ''sp_BlitzLock'',''P'',0' + @crlf +
@@ -4409,11 +4407,11 @@ BEGIN
44094407
' UNION ALL ' + @crlf +
44104408
' SELECT ''sp_DatabaseRestore'',''P'',0' + @crlf +
44114409
' UNION ALL ' + @crlf +
4412-
' SELECT ''sp_foreachdb'',''P'',1' + @crlf +
4410+
' SELECT ''sp_foreachdb'',''P'',0' + @crlf +
44134411
' UNION ALL ' + @crlf +
4414-
' SELECT ''sp_ineachdb'',''P'',1' + @crlf +
4412+
' SELECT ''sp_ineachdb'',''P'',0' + @crlf +
44154413
' UNION ALL' + @crlf +
4416-
' SELECT ''SqlServerVersions'',''U'',1' + @crlf +
4414+
' SELECT ''SqlServerVersions'',''U'',0' + @crlf +
44174415
')' + @crlf +
44184416
'INSERT INTO #FRKObjects (' + @crlf +
44194417
' DatabaseName,ObjectSchemaName,ObjectName, ObjectType,MandatoryComponent' + @crlf +
@@ -4536,12 +4534,12 @@ BEGIN
45364534
Details
45374535
)
45384536
SELECT
4539-
2260 AS CheckID ,
4540-
200 AS Priority ,
4541-
'Reliability' AS FindingsGroup ,
4542-
'First Responder kit consistency check has been unexpectedly modified (check names)' AS Finding ,
4543-
'https://www.BrentOzar.com/blitz/' AS URL ,
4544-
'First Responder kit consistency check failed because a change has been made to code generator and the handling code has not been adapted' + @crlf +
4537+
226 AS CheckID ,
4538+
253 AS Priority ,
4539+
'First Responder Kit' AS FindingsGroup ,
4540+
'Version Check Failed (code generator changed)' AS Finding ,
4541+
'http://FirstResponderKit.org' AS URL ,
4542+
'Download an updated First Responder Kit. Your version check failed because a change has been made to the version check code generator.' + @crlf +
45454543
'Error: No handler for check with name "' + ISNULL(@StatementCheckName,'') + '"' AS Details
45464544
;
45474545

@@ -4567,12 +4565,12 @@ BEGIN
45674565
Details
45684566
)
45694567
SELECT
4570-
2261 AS CheckID ,
4571-
200 AS Priority ,
4572-
'Reliability' AS FindingsGroup ,
4573-
'First Responder kit consistency check has been unexpectedly modified (dynamic query failure)' AS Finding ,
4574-
'https://www.BrentOzar.com/blitz/' AS URL ,
4575-
'First Responder kit consistency check failed because a change has been made to code generator' + @crlf +
4568+
226 AS CheckID ,
4569+
253 AS Priority ,
4570+
'First Responder Kit' AS FindingsGroup ,
4571+
'Version Check Failed (dynamic query failure)' AS Finding ,
4572+
'http://FirstResponderKit.org' AS URL ,
4573+
'Download an updated First Responder Kit. Your version check failed due to dynamic query failure.' + @crlf +
45764574
'Error: following query failed at execution (check if component [' + ISNULL(@CurrentComponentName,@CurrentComponentName) + '] is mandatory and missing)' + @crlf +
45774575
@tsql AS Details
45784576
;
@@ -4593,12 +4591,12 @@ BEGIN
45934591
Details
45944592
)
45954593
SELECT
4596-
2262 AS CheckID ,
4597-
200 AS Priority ,
4598-
'Features' AS FindingsGroup ,
4599-
'First Responder kit mandatory component called "' + @CurrentComponentName + '" is missing' AS Finding ,
4600-
'https://www.BrentOzar.com/blitz/' AS URL ,
4601-
NULL AS Details
4594+
227 AS CheckID ,
4595+
253 AS Priority ,
4596+
'First Responder Kit' AS FindingsGroup ,
4597+
'Component Missing: ' + @CurrentComponentName AS Finding ,
4598+
'http://FirstResponderKit.org' AS URL ,
4599+
'Download an updated version of the First Responder Kit to install it.' AS Details
46024600
;
46034601

46044602
-- as it's missing, no value for SubjectFullPath
@@ -4622,12 +4620,12 @@ BEGIN
46224620
Details
46234621
)
46244622
SELECT
4625-
2263 AS CheckID ,
4626-
200 AS Priority ,
4627-
'Reliability' AS FindingsGroup ,
4628-
'First Responder kit consistency check has been unexpectedly modified (checks ordering)' AS Finding ,
4629-
'https://www.BrentOzar.com/blitz/' AS URL ,
4630-
'First Responder kit consistency check failed because "Mandatory" check has not been completed before for current component' + @crlf +
4623+
226 AS CheckID ,
4624+
253 AS Priority ,
4625+
'First Responder Kit' AS FindingsGroup ,
4626+
'Version Check Failed (unexpectedly modified checks ordering)' AS Finding ,
4627+
'http://FirstResponderKit.org' AS URL ,
4628+
'Download an updated First Responder Kit. Version check failed because "Mandatory" check has not been completed before for current component' + @crlf +
46314629
'Error: version check mode happenned before "Mandatory" check for component called "' + @CurrentComponentFullName + '"'
46324630
;
46334631

@@ -4650,12 +4648,12 @@ BEGIN
46504648
Details
46514649
)
46524650
SELECT
4653-
2261 AS CheckID ,
4654-
200 AS Priority ,
4655-
'Reliability' AS FindingsGroup ,
4656-
'First Responder kit consistency check has been unexpectedly modified (dynamic query failure)' AS Finding ,
4657-
'https://www.BrentOzar.com/blitz/' AS URL ,
4658-
'First Responder kit consistency check failed because a change has been made to code generator' + @crlf +
4651+
226 AS CheckID ,
4652+
253 AS Priority ,
4653+
'First Responder Kit' AS FindingsGroup ,
4654+
'Version Check Failed (dynamic query failure)' AS Finding ,
4655+
'http://FirstResponderKit.org' AS URL ,
4656+
'Download an updated First Responder Kit. Version check failed because a change has been made to the code generator.' + @crlf +
46594657
'Error: following query failed at execution (check if component [' + @CurrentComponentFullName + '] can run in VersionCheckMode)' + @crlf +
46604658
@tsql AS Details
46614659
;
@@ -4676,12 +4674,12 @@ BEGIN
46764674
Details
46774675
)
46784676
SELECT
4679-
2266 AS CheckID ,
4680-
200 AS Priority ,
4681-
'Reliability' AS FindingsGroup ,
4682-
'First Responder kit consistency: outdated component (' + @CurrentComponentFullName + ')' AS Finding ,
4683-
'https://www.BrentOzar.com/blitz/' AS URL ,
4684-
'Component ' + @CurrentComponentFullName + ' is not at the minimum version required to run this procedure' + @crlf +
4677+
228 AS CheckID ,
4678+
253 AS Priority ,
4679+
'First Responder Kit' AS FindingsGroup ,
4680+
'Component Outdated: ' + @CurrentComponentFullName AS Finding ,
4681+
'http://FirstResponderKit.org' AS URL ,
4682+
'Download an updated First Responder Kit. Component ' + @CurrentComponentFullName + ' is not at the minimum version required to run this procedure' + @crlf +
46854683
'VersionCheckMode has been introduced in component version date after "20190320". This means its version is lower than or equal to that date.' AS Details;
46864684
;
46874685

@@ -4705,12 +4703,12 @@ BEGIN
47054703
Details
47064704
)
47074705
SELECT
4708-
2263 AS CheckID ,
4709-
200 AS Priority ,
4710-
'Reliability' AS FindingsGroup ,
4711-
'First Responder kit consistency check has been unexpectedly modified (checks ordering)' AS Finding ,
4712-
'https://www.BrentOzar.com/blitz/' AS URL ,
4713-
'First Responder kit consistency check failed because "VersionCheckMode" check has not been completed before for component called "' + @CurrentComponentFullName + '"' + @crlf +
4706+
226 AS CheckID ,
4707+
253 AS Priority ,
4708+
'First Responder Kit' AS FindingsGroup ,
4709+
'Version Check Failed (unexpectedly modified checks ordering)' AS Finding ,
4710+
'http://FirstResponderKit.org' AS URL ,
4711+
'Download an updated First Responder Kit. Version check failed because "VersionCheckMode" check has not been completed before for component called "' + @CurrentComponentFullName + '"' + @crlf +
47144712
'Error: VersionCheck happenned before "VersionCheckMode" check for component called "' + @CurrentComponentFullName + '"'
47154713
;
47164714

@@ -4732,12 +4730,12 @@ BEGIN
47324730
Details
47334731
)
47344732
SELECT
4735-
2261 AS CheckID ,
4736-
200 AS Priority ,
4737-
'Reliability' AS FindingsGroup ,
4738-
'First Responder kit consistency check has been unexpectedly modified (dynamic query failure)' AS Finding ,
4739-
'https://www.BrentOzar.com/blitz/' AS URL ,
4740-
'First Responder kit consistency check failed because a change has been made to code generator' + @crlf +
4733+
226 AS CheckID ,
4734+
253 AS Priority ,
4735+
'First Responder Kit' AS FindingsGroup ,
4736+
'Version Check Failed (dynamic query failure)' AS Finding ,
4737+
'http://FirstResponderKit.org' AS URL ,
4738+
'Download an updated First Responder Kit. The version check failed because a change has been made to the code generator.' + @crlf +
47414739
'Error: following query failed at execution (check if component [' + @CurrentComponentFullName + '] is at the expected version)' + @crlf +
47424740
@tsql AS Details
47434741
;
@@ -4759,12 +4757,12 @@ BEGIN
47594757
Details
47604758
)
47614759
SELECT
4762-
2265 AS CheckID ,
4763-
200 AS Priority ,
4764-
'Reliability' AS FindingsGroup ,
4765-
'First Responder kit consistency check (Failed dynamic SP call to ' + @CurrentComponentFullName + ')' AS Finding ,
4766-
'https://www.BrentOzar.com/blitz/' AS URL ,
4767-
'Error: following query failed at execution (check if component [' + @CurrentComponentFullName + '] is at the expected version)' + @crlf +
4760+
226 AS CheckID ,
4761+
253 AS Priority ,
4762+
'First Responder Kit' AS FindingsGroup ,
4763+
'Version Check Failed (Failed dynamic SP call to ' + @CurrentComponentFullName + ')' AS Finding ,
4764+
'http://FirstResponderKit.org' AS URL ,
4765+
'Download an updated First Responder Kit. Error: following query failed at execution (check if component [' + @CurrentComponentFullName + '] is at the expected version)' + @crlf +
47684766
'Return code: ' + CONVERT(VARCHAR(10),@InnerExecRet) + @crlf +
47694767
'T-SQL Query: ' + @crlf +
47704768
@tsql AS Details
@@ -4787,12 +4785,12 @@ BEGIN
47874785
Details
47884786
)
47894787
SELECT
4790-
2266 AS CheckID ,
4791-
200 AS Priority ,
4792-
'Reliability' AS FindingsGroup ,
4793-
'First Responder kit consistency: outdated component (' + @CurrentComponentFullName + ')' AS Finding ,
4794-
'https://www.BrentOzar.com/blitz/' AS URL ,
4795-
'Please update component' AS Details
4788+
228 AS CheckID ,
4789+
253 AS Priority ,
4790+
'First Responder Kit' AS FindingsGroup ,
4791+
'Component Outdated: ' + @CurrentComponentFullName AS Finding ,
4792+
'http://FirstResponderKit.org' AS URL ,
4793+
'Download and install the latest First Responder Kit - you''re running some older code, and it doesn''t get better with age.' AS Details
47964794
;
47974795

47984796
RAISERROR('Component %s is outdated',10,1,@CurrentComponentFullName);

0 commit comments

Comments
 (0)