Skip to content

Commit e4c067a

Browse files
authored
Merge pull request #2454 from BrentOzarULTD/dev
2020-07-03 Release
2 parents c461609 + d761af5 commit e4c067a

20 files changed

+2902
-1161
lines changed
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
1-
#Set your file path
1+
#Set your file path
22
$FilePath = "C:\temp\SQL-Server-First-Responder-Kit"
3-
3+
$SqlVersionsPath = "$FilePath\SqlServerVersions.sql"
44

55
#All Core Blitz Without sp_BlitzQueryStore
66
Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" |
77
Where-Object { $_.FullName -notlike "*sp_BlitzQueryStore.sql*" -and $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
88
ForEach-Object { Get-Content $_.FullName } |
99
Set-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Force
10+
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
11+
if ( test-path "$SqlVersionsPath")
12+
{ Add-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")}
13+
1014

1115
#All Core Blitz With sp_BlitzQueryStore
1216
Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" |
1317
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
1418
ForEach-Object { Get-Content $_.FullName } |
1519
Set-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Force
20+
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
21+
if ( test-path "$SqlVersionsPath")
22+
{ Add-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")}
23+
1624

1725
#All Scripts
1826
Get-ChildItem -Path "$FilePath" -Filter "sp_*.sql" |
1927
Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*"} |
2028
ForEach-Object { Get-Content $_.FullName } |
21-
Set-Content -Path "$FilePath\Install-All-Scripts.sql" -Force
29+
Set-Content -Path "$FilePath\Install-All-Scripts.sql" -Force
30+
#append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429)
31+
if ( test-path "$SqlVersionsPath")
32+
{ Add-Content -Path "$FilePath\Install-All-Scripts.sql" -Value (Get-Content -Path "$SqlVersionsPath")}

Documentation/sp_BlitzFirst_Checks_by_Priority.md

Lines changed: 3 additions & 3 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: 44
10-
If you want to add a new check, start at 45
9+
CURRENT HIGH CHECKID: 45
10+
If you want to add a new check, start at 46
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|---------------------------------|---------------------------------------|-------------------------------------------------|----------|
@@ -29,12 +29,12 @@ If you want to add a new check, start at 45
2929
| 50 | In-Memory OLTP | Garbage Collection in Progress | https://BrentOzar.com/go/garbage | 31 |
3030
| 50 | Query Problems | Compilations/Sec High | https://BrentOzar.com/go/compile | 15 |
3131
| 50 | Query Problems | Implicit Transactions | https://www.brentozar.com/go/ImplicitTransactions/ | 37 |
32+
| 50 | Query Problems | Memory Leak in USERSTORE_TOKENPERM Cache | https://BrentOzar.com/go/userstore | 45 |
3233
| 50 | Query Problems | Plan Cache Erased Recently | https://BrentOzar.com/go/freeproccache | 7 |
3334
| 50 | Query Problems | Re-Compilations/Sec High | https://BrentOzar.com/go/recompile | 16 |
3435
| 50 | Query Problems | Statistics Updated Recently | https://BrentOzar.com/go/stats | 44 |
3536
| 50 | Server Performance | High CPU Utilization | https://BrentOzar.com/go/cpu | 24 |
3637
| 50 | Server Performance | High CPU Utilization - Non SQL Processes | https://BrentOzar.com/go/cpu | 28 |
37-
| 50 | Server Performance | Page Life Expectancy Low | https://BrentOzar.com/go/ple | 10 |
3838
| 50 | Server Performance | Slow Data File Reads | https://BrentOzar.com/go/slow | 11 |
3939
| 50 | Server Performance | Slow Log File Writes | https://BrentOzar.com/go/slow | 12 |
4040
| 50 | Server Performance | Too Much Free Memory | https://BrentOzar.com/go/freememory | 34 |

Install-All-Scripts.sql

Lines changed: 1035 additions & 416 deletions
Large diffs are not rendered by default.

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

Lines changed: 576 additions & 158 deletions
Large diffs are not rendered by default.

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

Lines changed: 577 additions & 159 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,15 @@ Common parameters include:
247247
* @ThresholdMB = 250 - by default, we only analyze objects over 250MB because you're busy.
248248
* @Mode = 0 (default) - get different data with 0=Diagnose, 1=Summarize, 2=Index Usage Detail, 3=Missing Index Detail, 4=Diagnose Details.
249249

250+
sp_BlitzIndex focuses on mainstream index types. Other index types have varying amounts of support:
251+
252+
* Fully supported: rowstore indexes, columnstore indexes, temporal tables.
253+
* Columnstore indexes: fully supported. Key columns are shown as includes rather than keys since they're not in a specific order.
254+
* In-Memory OLTP (Hekaton): unsupported. These objects show up in the results, but for more info, you'll want to use sp_BlitzInMemoryOLTP instead.
255+
* Graph tables: unsupported. These objects show up in the results, but we don't do anything special with 'em, like call out that they're graph tables.
256+
* Spatial indexes: unsupported. We call out that they're spatial, but we don't do any special handling for them.
257+
* XML indexes: unsupported. These objects show up in the results, but we don't include the index's columns or sizes.
258+
250259

251260
[*Back to top*](#header1)
252261

@@ -295,6 +304,10 @@ Parameters you can use:
295304
* @LoginName: If you want to filter to a specific login.
296305
* @EventSessionPath: If you want to point this at an XE session rather than the system health session.
297306

307+
Known issues:
308+
309+
* If your database has periods in the name, the deadlock report itself doesn't report the database name correctly. [More info in closed issue 2452.](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2452)
310+
298311

299312
[*Back to top*](#header1)
300313

@@ -340,10 +353,7 @@ Parameters include:
340353
* @HoursBack -- How many hours into backup history you want to go. Should be a negative number (we're going back in time, after all). But if you enter a positive number, we'll make it negative for you. You're welcome.
341354
* @MSDBName -- if you need to prefix dbo.backupset with an alternate database name.
342355
* @AGName -- If you have more than 1 AG on the server, and you don't know the listener name, specify the name of the AG you want to use the listener for, to push backup data. This may get used during analysis in a future release for filtering.
343-
* @RestoreSpeedFullMBps --[FIXFIX] Brent can word this better than I can
344-
* @RestoreSpeedDiffMBps -- Nothing yet
345-
* @RestoreSpeedLogMBps -- Nothing yet
346-
356+
* @RestoreSpeedFullMBps, @RestoreSpeedDiffMBps, @RestoreSpeedLogMBps -- if you know your restore speeds, you can input them here to better calculate your worst-case RPO times. Otherwise, we assume that your restore speed will be the same as your backup speed. That isn't likely true - your restore speed will likely be worse - but these numbers already scare the pants off people.
347357
* @PushBackupHistoryToListener -- Turn this to 1 to skip analysis and use sp_BlitzBackups to push backup data from msdb to a centralized location (more the mechanics of this to follow)
348358
* @WriteBackupsToListenerName -- This is the name of the AG listener, and **MUST** have a linked server configured pointing to it. Yes, that means you need to create a linked server that points to the AG Listener, with the appropriate permissions to write data.
349359
* @WriteBackupsToDatabaseName -- This can't be 'msdb' if you're going to use the backup data pushing mechanism. We can't write to your actual msdb tables.

SqlServerVersions.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ VALUES
3636
(15, 4003, 'CU1', 'https://support.microsoft.com/en-us/help/4527376', '2020-01-07', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'Cumulative Update 1 '),
3737
(15, 2070, 'GDR', 'https://support.microsoft.com/en-us/help/4517790', '2019-11-04', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'RTM GDR '),
3838
(15, 2000, 'RTM ', '', '2019-11-04', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'RTM '),
39+
(14, 3335, 'RTM CU21', 'https://support.microsoft.com/en-us/help/4557397', '2020-07-01', '2022-10-11', '2027-10-12', 'SQL Server 2017', 'RTM Cumulative Update 21'),
3940
(14, 3294, 'RTM CU20', 'https://support.microsoft.com/en-us/help/4541283', '2020-04-07', '2022-10-11', '2027-10-12', 'SQL Server 2017', 'RTM Cumulative Update 20'),
4041
(14, 3257, 'RTM CU19', 'https://support.microsoft.com/en-us/help/4535007', '2020-02-05', '2022-10-11', '2027-10-12', 'SQL Server 2017', 'RTM Cumulative Update 19'),
4142
(14, 3257, 'RTM CU18', 'https://support.microsoft.com/en-us/help/4527377', '2019-12-09', '2022-10-11', '2027-10-12', 'SQL Server 2017', 'RTM Cumulative Update 18'),

sp_AllNightLog.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SET NOCOUNT ON;
3030
BEGIN;
3131

3232

33-
SELECT @Version = '3.95', @VersionDate = '20200606';
33+
SELECT @Version = '3.96', @VersionDate = '20200703';
3434

3535
IF(@VersionCheckMode = 1)
3636
BEGIN

sp_AllNightLog_Setup.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SET NOCOUNT ON;
3636

3737
BEGIN;
3838

39-
SELECT @Version = '3.95', @VersionDate = '20200606';
39+
SELECT @Version = '3.96', @VersionDate = '20200703';
4040

4141
IF(@VersionCheckMode = 1)
4242
BEGIN

sp_Blitz.sql

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ AS
3737
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3838

3939

40-
SELECT @Version = '7.96', @VersionDate = '20200606';
40+
SELECT @Version = '7.97', @VersionDate = '20200703';
4141
SET @OutputType = UPPER(@OutputType);
4242

4343
IF(@VersionCheckMode = 1)
@@ -2200,7 +2200,8 @@ AS
22002200
+ '. Tables in the master database may not be restored in the event of a disaster.' ) AS Details
22012201
FROM master.sys.tables
22022202
WHERE is_ms_shipped = 0
2203-
AND name NOT IN ('CommandLog','SqlServerVersions');
2203+
AND name NOT IN ('CommandLog','SqlServerVersions','$ndo$srvproperty');
2204+
/* That last one is the Dynamics NAV licensing table: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2426 */
22042205
END;
22052206

22062207
IF NOT EXISTS ( SELECT 1
@@ -7888,12 +7889,8 @@ IF @ProductVersionMajor >= 10
78887889
) AS [URL] ,
78897890
( CASE
78907891
WHEN [ohi].[host_platform] = 'Linux' THEN 'You''re running the ' + CAST([ohi].[host_distribution] AS VARCHAR(35)) + ' distribution of ' + CAST([ohi].[host_platform] AS VARCHAR(35)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7891-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] = '5' THEN 'You''re running a really old version: Windows 2000, version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7892-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] > '5' AND [ohi].[host_release] < '6' THEN 'You''re running a really old version: ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7893-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] >= '6' AND [ohi].[host_release] <= '6.1' THEN 'You''re running a pretty old version: Windows: ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7894-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] = '6.2' THEN 'You''re running a rather modern version of Windows: ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7895-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] = '6.3' THEN 'You''re running a pretty modern version of Windows: ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7896-
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] > '6.3' THEN 'Hot dog! You''re living in the future! You''re running ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7892+
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] = '5' THEN 'You''re running Windows 2000, version ' + CAST([ohi].[host_release] AS VARCHAR(5))
7893+
WHEN [ohi].[host_platform] = 'Windows' AND [ohi].[host_release] > '5' THEN 'You''re running ' + CAST([ohi].[host_distribution] AS VARCHAR(50)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
78977894
ELSE 'You''re running ' + CAST([ohi].[host_distribution] AS VARCHAR(35)) + ', version ' + CAST([ohi].[host_release] AS VARCHAR(5))
78987895
END
78997896
) AS [Details]
@@ -7926,13 +7923,12 @@ IF @ProductVersionMajor >= 10
79267923
'Windows Version' AS [Finding] ,
79277924
'https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions' AS [URL] ,
79287925
( CASE
7929-
WHEN [owi].[windows_release] = '5' THEN 'You''re running a really old version: Windows 2000, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7930-
WHEN [owi].[windows_release] > '5' AND [owi].[windows_release] < '6' THEN 'You''re running a really old version: Windows Server 2003/2003R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7931-
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))
7932-
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))
7933-
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))
7934-
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))
7935-
ELSE 'Hot dog! You''re living in the future! You''re running version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7926+
WHEN [owi].[windows_release] = '5' THEN 'You''re running Windows 2000, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7927+
WHEN [owi].[windows_release] > '5' AND [owi].[windows_release] < '6' THEN 'You''re running Windows Server 2003/2003R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7928+
WHEN [owi].[windows_release] >= '6' AND [owi].[windows_release] <= '6.1' THEN 'You''re running Windows Server 2008/2008R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7929+
WHEN [owi].[windows_release] >= '6.2' AND [owi].[windows_release] <= '6.3' THEN 'You''re running Windows Server 2012/2012R2 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7930+
WHEN [owi].[windows_release] = '10.0' THEN 'You''re running Windows Server 2016/2019 era, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
7931+
ELSE 'You''re running Windows Server, version ' + CAST([owi].[windows_release] AS VARCHAR(5))
79367932
END
79377933
) AS [Details]
79387934
FROM [sys].[dm_os_windows_info] [owi];

0 commit comments

Comments
 (0)