|
32 | 32 | SET NOCOUNT ON; |
33 | 33 | SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
34 | 34 | DECLARE @Version VARCHAR(30); |
35 | | - SET @Version = '6.0'; |
36 | | - SET @VersionDate = '20171201'; |
| 35 | + SET @Version = '6.1'; |
| 36 | + SET @VersionDate = '20180101'; |
37 | 37 | SET @OutputType = UPPER(@OutputType); |
38 | 38 |
|
39 | 39 | IF @Help = 1 PRINT ' |
@@ -5024,7 +5024,7 @@ IF @ProductVersionMajor >= 10 |
5024 | 5024 | ''File Configuration'' AS FindingsGroup, |
5025 | 5025 | ''File growth set to percent'', |
5026 | 5026 | ''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.'' |
5028 | 5028 | FROM [?].sys.database_files f |
5029 | 5029 | WHERE is_percent_growth = 1 and size > 128000 OPTION (RECOMPILE);'; |
5030 | 5030 | END; |
@@ -6706,8 +6706,8 @@ IF @ProductVersionMajor >= 10 |
6706 | 6706 | 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)) |
6707 | 6707 | 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)) |
6708 | 6708 | 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)) |
6711 | 6711 | END |
6712 | 6712 | ) AS [Details] |
6713 | 6713 | FROM [sys].[dm_os_windows_info] [owi]; |
@@ -7145,8 +7145,49 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1 |
7145 | 7145 |
|
7146 | 7146 | EXECUTE(@StringToExecute); |
7147 | 7147 | 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; |
7148 | 7156 |
|
| 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; |
7149 | 7188 |
|
| 7189 | + |
| 7190 | + |
7150 | 7191 | IF NOT EXISTS ( SELECT 1 |
7151 | 7192 | FROM #SkipChecks |
7152 | 7193 | WHERE DatabaseName IS NULL AND CheckID = 106 ) |
|
0 commit comments