Skip to content

Commit 39f26d8

Browse files
authored
Merge pull request #3549 from BrentOzarULTD/20240701_release
2024-07-01 Release
2 parents 5cbd9a6 + af04839 commit 39f26d8

13 files changed

+499
-327
lines changed

Install-All-Scripts.sql

Lines changed: 418 additions & 272 deletions
Large diffs are not rendered by default.

Install-Azure.sql

Lines changed: 70 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ AS
3737
SET NOCOUNT ON;
3838
SET STATISTICS XML OFF;
3939

40-
SELECT @Version = '8.20', @VersionDate = '20240522';
40+
SELECT @Version = '8.21', @VersionDate = '20240701';
4141

4242
IF(@VersionCheckMode = 1)
4343
BEGIN
@@ -1172,7 +1172,7 @@ SET NOCOUNT ON;
11721172
SET STATISTICS XML OFF;
11731173
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
11741174

1175-
SELECT @Version = '8.20', @VersionDate = '20240522';
1175+
SELECT @Version = '8.21', @VersionDate = '20240701';
11761176
SET @OutputType = UPPER(@OutputType);
11771177

11781178
IF(@VersionCheckMode = 1)
@@ -8545,7 +8545,7 @@ SET NOCOUNT ON;
85458545
SET STATISTICS XML OFF;
85468546
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
85478547

8548-
SELECT @Version = '8.20', @VersionDate = '20240522';
8548+
SELECT @Version = '8.21', @VersionDate = '20240701';
85498549

85508550
IF(@VersionCheckMode = 1)
85518551
BEGIN
@@ -13554,7 +13554,7 @@ SET NOCOUNT ON;
1355413554
SET STATISTICS XML OFF;
1355513555
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
1355613556

13557-
SELECT @Version = '8.20', @VersionDate = '20240522';
13557+
SELECT @Version = '8.21', @VersionDate = '20240701';
1355813558
SET @OutputType = UPPER(@OutputType);
1355913559

1356013560
IF(@VersionCheckMode = 1)
@@ -20029,6 +20029,7 @@ ALTER PROCEDURE
2002920029
@EventSessionName sysname = N'system_health',
2003020030
@TargetSessionType sysname = NULL,
2003120031
@VictimsOnly bit = 0,
20032+
@DeadlockType nvarchar(20) = NULL,
2003220033
@Debug bit = 0,
2003320034
@Help bit = 0,
2003420035
@Version varchar(30) = NULL OUTPUT,
@@ -20047,7 +20048,7 @@ BEGIN
2004720048
SET XACT_ABORT OFF;
2004820049
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2004920050

20050-
SELECT @Version = '8.20', @VersionDate = '20240522';
20051+
SELECT @Version = '8.21', @VersionDate = '20240701';
2005120052

2005220053
IF @VersionCheckMode = 1
2005320054
BEGIN
@@ -20209,7 +20210,7 @@ BEGIN
2020920210
@StartDateOriginal datetime = @StartDate,
2021020211
@EndDateOriginal datetime = @EndDate,
2021120212
@StartDateUTC datetime,
20212-
@EndDateUTC datetime;
20213+
@EndDateUTC datetime;;
2021320214

2021420215
/*Temporary objects used in the procedure*/
2021520216
DECLARE
@@ -20719,50 +20720,63 @@ BEGIN
2071920720
END CATCH;
2072020721
END;
2072120722

20723+
IF @DeadlockType IS NOT NULL
20724+
BEGIN
20725+
SELECT
20726+
@DeadlockType =
20727+
CASE
20728+
WHEN LOWER(@DeadlockType) LIKE 'regular%'
20729+
THEN N'Regular Deadlock'
20730+
WHEN LOWER(@DeadlockType) LIKE N'parallel%'
20731+
THEN N'Parallel Deadlock'
20732+
ELSE NULL
20733+
END;
20734+
END;
20735+
2072220736
/*If @TargetSessionType, we need to figure out if it's ring buffer or event file*/
2072320737
/*Azure has differently named views, so we need to separate. Thanks, Azure.*/
2072420738

20725-
IF
20726-
(
20727-
@Azure = 0
20728-
AND @TargetSessionType IS NULL
20729-
)
20730-
BEGIN
20731-
RAISERROR('@TargetSessionType is NULL, assigning for non-Azure instance', 0, 1) WITH NOWAIT;
20739+
IF
20740+
(
20741+
@Azure = 0
20742+
AND @TargetSessionType IS NULL
20743+
)
20744+
BEGIN
20745+
RAISERROR('@TargetSessionType is NULL, assigning for non-Azure instance', 0, 1) WITH NOWAIT;
2073220746

20733-
SELECT TOP (1)
20734-
@TargetSessionType = t.target_name
20735-
FROM sys.dm_xe_sessions AS s
20736-
JOIN sys.dm_xe_session_targets AS t
20737-
ON s.address = t.event_session_address
20738-
WHERE s.name = @EventSessionName
20739-
AND t.target_name IN (N'event_file', N'ring_buffer')
20740-
ORDER BY t.target_name
20741-
OPTION(RECOMPILE);
20747+
SELECT TOP (1)
20748+
@TargetSessionType = t.target_name
20749+
FROM sys.dm_xe_sessions AS s
20750+
JOIN sys.dm_xe_session_targets AS t
20751+
ON s.address = t.event_session_address
20752+
WHERE s.name = @EventSessionName
20753+
AND t.target_name IN (N'event_file', N'ring_buffer')
20754+
ORDER BY t.target_name
20755+
OPTION(RECOMPILE);
2074220756

20743-
RAISERROR('@TargetSessionType assigned as %s for non-Azure', 0, 1, @TargetSessionType) WITH NOWAIT;
20744-
END;
20757+
RAISERROR('@TargetSessionType assigned as %s for non-Azure', 0, 1, @TargetSessionType) WITH NOWAIT;
20758+
END;
2074520759

20746-
IF
20747-
(
20748-
@Azure = 1
20749-
AND @TargetSessionType IS NULL
20750-
)
20751-
BEGIN
20752-
RAISERROR('@TargetSessionType is NULL, assigning for Azure instance', 0, 1) WITH NOWAIT;
20760+
IF
20761+
(
20762+
@Azure = 1
20763+
AND @TargetSessionType IS NULL
20764+
)
20765+
BEGIN
20766+
RAISERROR('@TargetSessionType is NULL, assigning for Azure instance', 0, 1) WITH NOWAIT;
2075320767

20754-
SELECT TOP (1)
20755-
@TargetSessionType = t.target_name
20756-
FROM sys.dm_xe_database_sessions AS s
20757-
JOIN sys.dm_xe_database_session_targets AS t
20758-
ON s.address = t.event_session_address
20759-
WHERE s.name = @EventSessionName
20760-
AND t.target_name IN (N'event_file', N'ring_buffer')
20761-
ORDER BY t.target_name
20762-
OPTION(RECOMPILE);
20768+
SELECT TOP (1)
20769+
@TargetSessionType = t.target_name
20770+
FROM sys.dm_xe_database_sessions AS s
20771+
JOIN sys.dm_xe_database_session_targets AS t
20772+
ON s.address = t.event_session_address
20773+
WHERE s.name = @EventSessionName
20774+
AND t.target_name IN (N'event_file', N'ring_buffer')
20775+
ORDER BY t.target_name
20776+
OPTION(RECOMPILE);
2076320777

20764-
RAISERROR('@TargetSessionType assigned as %s for Azure', 0, 1, @TargetSessionType) WITH NOWAIT;
20765-
END;
20778+
RAISERROR('@TargetSessionType assigned as %s for Azure', 0, 1, @TargetSessionType) WITH NOWAIT;
20779+
END;
2076620780

2076720781

2076820782
/*The system health stuff gets handled different from user extended events.*/
@@ -23460,6 +23474,7 @@ BEGIN
2346023474
AND (d.client_app = @AppName OR @AppName IS NULL)
2346123475
AND (d.host_name = @HostName OR @HostName IS NULL)
2346223476
AND (d.login_name = @LoginName OR @LoginName IS NULL)
23477+
AND (d.deadlock_type = @DeadlockType OR @DeadlockType IS NULL)
2346323478
OPTION (RECOMPILE, LOOP JOIN, HASH JOIN);
2346423479

2346523480
UPDATE d
@@ -23847,7 +23862,11 @@ BEGIN
2384723862
deqs.max_reserved_threads,
2384823863
deqs.min_used_threads,
2384923864
deqs.max_used_threads,
23850-
deqs.total_rows
23865+
deqs.total_rows,
23866+
max_worker_time_ms =
23867+
deqs.max_worker_time / 1000.,
23868+
max_elapsed_time_ms =
23869+
deqs.max_elapsed_time / 1000.
2385123870
INTO #dm_exec_query_stats
2385223871
FROM sys.dm_exec_query_stats AS deqs
2385323872
WHERE EXISTS
@@ -23879,8 +23898,10 @@ BEGIN
2387923898
ap.executions_per_second,
2388023899
ap.total_worker_time_ms,
2388123900
ap.avg_worker_time_ms,
23901+
ap.max_worker_time_ms,
2388223902
ap.total_elapsed_time_ms,
2388323903
ap.avg_elapsed_time_ms,
23904+
ap.max_elapsed_time_ms,
2388423905
ap.total_logical_reads_mb,
2388523906
ap.total_physical_reads_mb,
2388623907
ap.total_logical_writes_mb,
@@ -23923,7 +23944,9 @@ BEGIN
2392323944
c.min_used_threads,
2392423945
c.max_used_threads,
2392523946
c.total_rows,
23926-
c.query_plan
23947+
c.query_plan,
23948+
c.max_worker_time_ms,
23949+
c.max_elapsed_time_ms
2392723950
FROM #available_plans AS ap
2392823951
OUTER APPLY
2392923952
(
@@ -24074,6 +24097,8 @@ BEGIN
2407424097
@TargetSessionType,
2407524098
VictimsOnly =
2407624099
@VictimsOnly,
24100+
DeadlockType =
24101+
@DeadlockType,
2407724102
Debug =
2407824103
@Debug,
2407924104
Help =
@@ -24178,7 +24203,7 @@ BEGIN
2417824203
SET STATISTICS XML OFF;
2417924204
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2418024205

24181-
SELECT @Version = '8.20', @VersionDate = '20240522';
24206+
SELECT @Version = '8.21', @VersionDate = '20240701';
2418224207

2418324208
IF(@VersionCheckMode = 1)
2418424209
BEGIN

SqlServerVersions.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ VALUES
5757
(16, 4003, 'CU1', 'https://support.microsoft.com/en-us/help/5022375', '2023-02-16', '2028-01-11', '2033-01-11', 'SQL Server 2022', 'Cumulative Update 1'),
5858
(16, 1050, 'RTM GDR', 'https://support.microsoft.com/kb/5021522', '2023-02-14', '2028-01-11', '2033-01-11', 'SQL Server 2022 GDR', 'RTM'),
5959
(16, 1000, 'RTM', '', '2022-11-15', '2028-01-11', '2033-01-11', 'SQL Server 2022', 'RTM'),
60+
(15, 4375, 'CU27', 'https://support.microsoft.com/kb/5037331', '2024-06-14', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'Cumulative Update 27'),
6061
(15, 4365, 'CU26', 'https://support.microsoft.com/kb/5035123', '2024-04-11', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'Cumulative Update 26'),
6162
(15, 4355, 'CU25', 'https://support.microsoft.com/kb/5033688', '2024-02-15', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'Cumulative Update 25'),
6263
(15, 4345, 'CU24', 'https://support.microsoft.com/kb/5031908', '2023-12-14', '2025-01-07', '2030-01-08', 'SQL Server 2019', 'Cumulative Update 24'),

sp_Blitz.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AS
3838
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3939

4040

41-
SELECT @Version = '8.20', @VersionDate = '20240522';
41+
SELECT @Version = '8.21', @VersionDate = '20240701';
4242
SET @OutputType = UPPER(@OutputType);
4343

4444
IF(@VersionCheckMode = 1)

sp_BlitzAnalysis.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ AS
3737
SET NOCOUNT ON;
3838
SET STATISTICS XML OFF;
3939

40-
SELECT @Version = '8.20', @VersionDate = '20240522';
40+
SELECT @Version = '8.21', @VersionDate = '20240701';
4141

4242
IF(@VersionCheckMode = 1)
4343
BEGIN

sp_BlitzBackups.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ AS
2424
SET STATISTICS XML OFF;
2525
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2626

27-
SELECT @Version = '8.20', @VersionDate = '20240522';
27+
SELECT @Version = '8.21', @VersionDate = '20240701';
2828

2929
IF(@VersionCheckMode = 1)
3030
BEGIN

sp_BlitzCache.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ SET NOCOUNT ON;
281281
SET STATISTICS XML OFF;
282282
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
283283

284-
SELECT @Version = '8.20', @VersionDate = '20240522';
284+
SELECT @Version = '8.21', @VersionDate = '20240701';
285285
SET @OutputType = UPPER(@OutputType);
286286

287287
IF(@VersionCheckMode = 1)

sp_BlitzFirst.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SET NOCOUNT ON;
4747
SET STATISTICS XML OFF;
4848
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
4949

50-
SELECT @Version = '8.20', @VersionDate = '20240522';
50+
SELECT @Version = '8.21', @VersionDate = '20240701';
5151

5252
IF(@VersionCheckMode = 1)
5353
BEGIN

sp_BlitzIndex.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ SET NOCOUNT ON;
4848
SET STATISTICS XML OFF;
4949
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
5050

51-
SELECT @Version = '8.20', @VersionDate = '20240522';
51+
SELECT @Version = '8.21', @VersionDate = '20240701';
5252
SET @OutputType = UPPER(@OutputType);
5353

5454
IF(@VersionCheckMode = 1)

sp_BlitzLock.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ BEGIN
3737
SET XACT_ABORT OFF;
3838
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3939

40-
SELECT @Version = '8.20', @VersionDate = '20240522';
40+
SELECT @Version = '8.21', @VersionDate = '20240701';
4141

4242
IF @VersionCheckMode = 1
4343
BEGIN

sp_BlitzWho.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BEGIN
3333
SET STATISTICS XML OFF;
3434
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3535

36-
SELECT @Version = '8.20', @VersionDate = '20240522';
36+
SELECT @Version = '8.21', @VersionDate = '20240701';
3737

3838
IF(@VersionCheckMode = 1)
3939
BEGIN

sp_DatabaseRestore.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ SET STATISTICS XML OFF;
5858

5959
/*Versioning details*/
6060

61-
SELECT @Version = '8.20', @VersionDate = '20240522';
61+
SELECT @Version = '8.21', @VersionDate = '20240701';
6262

6363
IF(@VersionCheckMode = 1)
6464
BEGIN

sp_ineachdb.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BEGIN
3636
SET NOCOUNT ON;
3737
SET STATISTICS XML OFF;
3838

39-
SELECT @Version = '8.20', @VersionDate = '20240522';
39+
SELECT @Version = '8.21', @VersionDate = '20240701';
4040

4141
IF(@VersionCheckMode = 1)
4242
BEGIN

0 commit comments

Comments
 (0)