Skip to content

Commit 8d434da

Browse files
committed
Merge branch 'dev'
2 parents 4dbcfaf + 4fc2a50 commit 8d434da

18 files changed

+3867
-2077
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Has been tested on (remove any that don't apply):
1717
- SQL Server 2012
1818
- SQL Server 2014
1919
- SQL Server 2016
20+
- SQL Server 2017
2021
- Amazon RDS
2122
- Azure SQL DB

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ 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: 211
10+
If you want to add a new one, start at 212
11+
912
| Priority | FindingsGroup | Finding | URL | CheckID |
1013
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
1114
| 0 | Outdated sp_Blitz | sp_Blitz is Over 6 Months Old | https://www.BrentOzar.com/blitz/ | 155 |
@@ -279,4 +282,6 @@ If you want to change anything about a check - the priority, finding, URL, or ID
279282
| 250 | Server Info | SQL Server Service | | 85 |
280283
| 250 | Server Info | Virtual Server | https://www.BrentOzar.com/go/virtual | 103 |
281284
| 250 | Server Info | Windows Version | | 172 |
285+
| 250 | Server Info | Power Plan | | 211 |
282286
| 254 | Rundate | (Current Date) | | 156 |
287+
| 255 | Thanks! | From Your Community Volunteers | | -1 |

Install-All-Scripts.sql

Lines changed: 1012 additions & 555 deletions
Large diffs are not rendered by default.

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

Lines changed: 826 additions & 414 deletions
Large diffs are not rendered by default.

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

Lines changed: 1004 additions & 547 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ To install, [download the latest release ZIP](https://github.com/BrentOzarULTD/S
3838

3939
The First Responder Kit runs on:
4040

41-
* SQL Server 2008, 2008R2, 2012, 2014, 2016, 2017 - yes, fully supported
41+
* SQL Server 2008, 2008R2, 2012, 2014, 2016, 2017 on Windows - yes, fully supported
42+
* SQL Server 2017 on Linux - yes, fully supported except sp_AllNightLog and sp_DatabaseRestore, which require xp_cmdshell, which Microsoft doesn't provide on Linux
4243
* SQL Server 2000, 2005 - not supported by Microsoft anymore, so we don't either
4344
* Amazon RDS SQL Server - fully supported
4445
* Azure SQL DB - It's a dice roll. Microsoft changes DMV contents in here without warning, so no guarantees.
@@ -47,11 +48,11 @@ The First Responder Kit runs on:
4748
## How to Get Support
4849
Everyone here is expected to abide by the [Contributor Covenant Code of Conduct](CONTRIBUTING.md#the-contributor-covenant-code-of-conduct).
4950

50-
Want to talk to the developers? [Get an invite to SQLCommunity.slack.com](https://sqlps.io/slack/), and we're in the [#FirstResponderKit channel](https://sqlcommunity.slack.com/messages/firstresponderkit/).
51+
When you have questions about how the tools work, talk with the community in the [#FirstResponderKit Slack channel](https://sqlcommunity.slack.com/messages/firstresponderkit/). If you need a free invite, hit [SQLslack.com](https://SQLslack.com/). Be patient - it's staffed with volunteers who have day jobs, heh.
5152

52-
Got a question? Ask it on [DBA.StackExchange.com](http://dba.stackexchange.com). Tag your question with the script name, like sp_Blitz, sp_BlitzCache, sp_BlitzIndex, etc, and we’ll be alerted of it right away.
53+
When you find a bug or want something changed, [read the contributing.md file](CONTRIBUTING.md).
5354

54-
Want to contribute by writing, testing, or documenting code, or suggesting a new check? [Read the contributing.md file](CONTRIBUTING.md).
55+
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 [DBA.StackExchange.com](http://dba.stackexchange.com) 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.
5556

5657
[*Back to top*](#header1)
5758

sp_AllNightLog.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ SET NOCOUNT ON;
2828
BEGIN;
2929

3030
DECLARE @Version VARCHAR(30);
31-
SET @Version = '2.0';
32-
SET @VersionDate = '20171201';
31+
SET @Version = '2.1';
32+
SET @VersionDate = '20180101';
3333

3434
IF @Help = 1
3535

sp_AllNightLog_Setup.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ SET NOCOUNT ON;
3535
BEGIN;
3636

3737
DECLARE @Version VARCHAR(30);
38-
SET @Version = '2.0';
39-
SET @VersionDate = '20171201';
38+
SET @Version = '2.1';
39+
SET @VersionDate = '20180101';
4040

4141

4242
IF @Help = 1

sp_Blitz.sql

Lines changed: 46 additions & 5 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.0';
36-
SET @VersionDate = '20171201';
35+
SET @Version = '6.1';
36+
SET @VersionDate = '20180101';
3737
SET @OutputType = UPPER(@OutputType);
3838

3939
IF @Help = 1 PRINT '
@@ -5024,7 +5024,7 @@ IF @ProductVersionMajor >= 10
50245024
''File Configuration'' AS FindingsGroup,
50255025
''File growth set to percent'',
50265026
''https://BrentOzar.com/go/percentgrowth'' AS URL,
5027-
''The ['' + DB_NAME() + ''] database file '' + f.physical_name + '' has grown to '' + CAST((CONVERT(BIGINT, f.size * 8) / 1000000) AS NVARCHAR(10)) + '' GB, and is using percent filegrowth settings. This can lead to slow performance during growths if Instant File Initialization is not enabled.''
5027+
''The ['' + DB_NAME() + ''] database file '' + f.physical_name + '' has grown to '' + CONVERT(NVARCHAR(10), CONVERT(NUMERIC(38, 2), (f.size / 128.) / 1024.)) + '' GB, and is using percent filegrowth settings. This can lead to slow performance during growths if Instant File Initialization is not enabled.''
50285028
FROM [?].sys.database_files f
50295029
WHERE is_percent_growth = 1 and size > 128000 OPTION (RECOMPILE);';
50305030
END;
@@ -6706,8 +6706,8 @@ IF @ProductVersionMajor >= 10
67066706
WHEN [owi].[windows_release] >= '6' AND [owi].[windows_release] <= '6.1' THEN 'You''re running a pretty old version: Windows: Server 2008/2008R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
67076707
WHEN [owi].[windows_release] = '6.2' THEN 'You''re running a rather modern version of Windows: Server 2012 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
67086708
WHEN [owi].[windows_release] = '6.3' THEN 'You''re running a pretty modern version of Windows: Server 2012R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
6709-
WHEN [owi].[windows_release] > '6.3' THEN 'Hot dog! You''re living in the future! You''re running version ' + CAST([owi].[windows_release] AS VARCHAR(5))
6710-
ELSE 'I have no idea which version of Windows you''re on. Sorry.'
6709+
WHEN [owi].[windows_release] = '10.0' THEN 'You''re running a pretty modern version of Windows: Server 2016 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
6710+
ELSE 'Hot dog! You''re living in the future! You''re running version ' + CAST([owi].[windows_release] AS VARCHAR(5))
67116711
END
67126712
) AS [Details]
67136713
FROM [sys].[dm_os_windows_info] [owi];
@@ -7145,8 +7145,49 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
71457145

71467146
EXECUTE(@StringToExecute);
71477147
END;
7148+
7149+
7150+
IF NOT EXISTS ( SELECT 1
7151+
FROM #SkipChecks
7152+
WHERE DatabaseName IS NULL AND CheckID = 211 )
7153+
BEGIN
7154+
7155+
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 211) WITH NOWAIT;
71487156

7157+
DECLARE @outval VARCHAR(36);
7158+
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',
7159+
@key = 'SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes',
7160+
@value_name = 'ActivePowerScheme',
7161+
@value = @outval OUTPUT;
7162+
7163+
INSERT INTO #BlitzResults
7164+
( CheckID ,
7165+
Priority ,
7166+
FindingsGroup ,
7167+
Finding ,
7168+
URL ,
7169+
Details
7170+
)
7171+
SELECT 211 AS CheckId,
7172+
250 AS Priority,
7173+
'Server Info' AS FindingsGroup,
7174+
'Power Plan' AS Finding,
7175+
'https://www.brentozar.com/blitz/power-mode/' AS URL,
7176+
'Your server is in '
7177+
+ CASE @outval
7178+
WHEN 'a1841308-3541-4fab-bc81-f71556f20b4a'
7179+
THEN 'power saving mode -- are you sure this is a production SQL Server?'
7180+
WHEN '381b4222-f694-41f0-9685-ff5bb260df2e'
7181+
THEN 'balanced power mode -- Uh... you want your CPUs to run at full speed, right?'
7182+
WHEN '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c'
7183+
THEN 'high performance power mode'
7184+
ELSE 'Unknown!'
7185+
END AS Details
7186+
7187+
END;
71497188

7189+
7190+
71507191
IF NOT EXISTS ( SELECT 1
71517192
FROM #SkipChecks
71527193
WHERE DatabaseName IS NULL AND CheckID = 106 )

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.0';
25-
SET @VersionDate = '20171201';
24+
SET @Version = '2.1';
25+
SET @VersionDate = '20180101';
2626

2727
IF @Help = 1 PRINT '
2828
/*

0 commit comments

Comments
 (0)