You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
activity = CASE WHEN oa.c.exist('//blocked-process-report/blocking-process') = 1 THEN 'blocking' END,
9227
9227
blocked_process_report = oa.c.query('.')
9228
9228
INTO #blocking
@@ -9249,17 +9249,17 @@ BEGIN
9249
9249
ISNULL
9250
9250
(
9251
9251
'(' +
9252
-
CAST(blocking_spid AS varchar(10)) +
9252
+
CONVERT(varchar(10), blocking_spid) +
9253
9253
':' +
9254
-
CAST(blocking_ecid AS varchar(10)) +
9254
+
CONVERT(varchar(10), blocking_ecid) +
9255
9255
')',
9256
9256
'unresolved process'
9257
9257
) PERSISTED,
9258
9258
blocked_desc AS
9259
9259
'(' +
9260
-
CAST(blocked_spid AS varchar(10)) +
9260
+
CONVERT(varchar(10), blocked_spid) +
9261
9261
':' +
9262
-
CAST(blocked_ecid AS varchar(10)) +
9262
+
CONVERT(varchar(10), blocked_ecid) +
9263
9263
')' PERSISTED;
9264
9264
9265
9265
CREATE CLUSTERED INDEX
@@ -9283,11 +9283,12 @@ BEGIN
9283
9283
b.blocked_desc,
9284
9284
level = 0,
9285
9285
sort_order =
9286
-
CAST
9286
+
CONVERT
9287
9287
(
9288
+
varchar(400),
9288
9289
b.blocking_desc +
9289
9290
' <-- ' +
9290
-
b.blocked_desc AS varchar(400)
9291
+
b.blocked_desc
9291
9292
)
9292
9293
FROM #blocking AS b
9293
9294
WHERE NOT EXISTS
@@ -9307,13 +9308,14 @@ BEGIN
9307
9308
bg.blocked_desc,
9308
9309
h.level + 1,
9309
9310
sort_order =
9310
-
CAST
9311
+
CONVERT
9311
9312
(
9313
+
varchar(400),
9312
9314
h.sort_order +
9313
9315
' ' +
9314
9316
bg.blocking_desc +
9315
9317
' <-- ' +
9316
-
bg.blocked_desc AS varchar(400)
9318
+
bg.blocked_desc
9317
9319
)
9318
9320
FROM hierarchy AS h
9319
9321
JOIN #blocking AS bg
@@ -15580,8 +15582,8 @@ ALTER PROCEDURE
15580
15582
@min_rows bigint = 0, /*only look at indexes with a minimum number of rows*/
15581
15583
@dedupe_only bit = 'false', /*only perform deduplication, don't mark unused indexes for removal*/
15582
15584
@get_all_databases bit = 'false', /*looks for all accessible user databases and returns combined results*/
15583
-
@include_databases nvarchar(MAX) = NULL, /*comma-separated list of databases to include (only when @get_all_databases = 1)*/
15584
-
@exclude_databases nvarchar(MAX) = NULL, /*comma-separated list of databases to exclude (only when @get_all_databases = 1)*/
15585
+
@include_databases nvarchar(max) = NULL, /*comma-separated list of databases to include (only when @get_all_databases = 1)*/
15586
+
@exclude_databases nvarchar(max) = NULL, /*comma-separated list of databases to exclude (only when @get_all_databases = 1)*/
15585
15587
@sort_order varchar(20) = 'default', /*controls final result ordering: default (script type first) or object (cluster rows for the same index; Key Subset disables sort under their replacement)*/
15586
15588
@help bit = 'false', /*learn about the procedure and parameters*/
15587
15589
@debug bit = 'false', /*print dynamic sql, show temp table contents*/
@@ -15594,8 +15596,8 @@ BEGIN
15594
15596
SET NOCOUNT ON;
15595
15597
BEGIN TRY
15596
15598
SELECT
15597
-
@version = '2.6',
15598
-
@version_date = '20260501';
15599
+
@version = '2.7',
15600
+
@version_date = '20260601';
15599
15601
15600
15602
IF
15601
15603
/* Check SQL Server 2012+ for FORMAT and CONCAT functions */
@@ -15779,7 +15781,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15779
15781
15780
15782
DECLARE
15781
15783
/*general script variables*/
15782
-
@sql nvarchar(MAX) = N'',
15784
+
@sql nvarchar(max) = N'',
15783
15785
@object_id integer = NULL,
15784
15786
@full_object_name nvarchar(768) = NULL,
15785
15787
@uptime_warning bit = 0, /* Will set after @uptime_days is calculated */
@@ -15903,7 +15905,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15903
15905
@current_database_name sysname,
15904
15906
@current_database_id integer,
15905
15907
@error_msg nvarchar(2048),
15906
-
@conflict_list nvarchar(MAX) = N'',
15908
+
@conflict_list nvarchar(max) = N'',
15907
15909
@rc bigint;
15908
15910
15909
15911
/* Set uptime warning flag after @uptime_days is calculated */
@@ -16197,11 +16199,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16197
16199
index_id integer NOT NULL,
16198
16200
index_name sysname NOT NULL,
16199
16201
is_unique bit NULL,
16200
-
key_columns nvarchar(MAX) NULL,
16201
-
included_columns nvarchar(MAX) NULL,
16202
-
filter_definition nvarchar(MAX) NULL,
16202
+
key_columns nvarchar(max) NULL,
16203
+
included_columns nvarchar(max) NULL,
16204
+
filter_definition nvarchar(max) NULL,
16203
16205
/* Query plan for original CREATE INDEX statement */
16204
-
original_index_definition nvarchar(MAX) NULL,
16206
+
original_index_definition nvarchar(max) NULL,
16205
16207
/*
16206
16208
Consolidation rule that matched (e.g., Key Duplicate, Key Subset, etc)
16207
16209
For exact duplicates, use one of: Exact Duplicate, Reverse Duplicate, or Equal Except For Filter
@@ -17959,7 +17961,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17959
17961
JOIN ' + QUOTENAME(@current_database_name) +
17960
17962
CONVERT
17961
17963
(
17962
-
nvarchar(MAX),
17964
+
nvarchar(max),
17963
17965
N'.sys.columns AS c
17964
17966
ON ic.object_id = c.object_id
17965
17967
AND ic.column_id = c.column_id
@@ -17987,7 +17989,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17987
17989
) + QUOTENAME(@current_database_name) +
17988
17990
CONVERT
17989
17991
(
17990
-
nvarchar(MAX),
17992
+
nvarchar(max),
17991
17993
N'.sys.dm_db_partition_stats ps
17992
17994
WHERE ps.object_id = i.object_id
17993
17995
AND ps.index_id IN (0, 1)
@@ -19913,7 +19915,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19913
19915
XML
19914
19916
PATH(''),
19915
19917
TYPE
19916
-
).value('.', 'nvarchar(MAX)'),
19918
+
).value('.', 'nvarchar(max)'),
19917
19919
1,
19918
19920
2,
19919
19921
N''
@@ -40331,8 +40333,8 @@ ALTER PROCEDURE
40331
40333
@hide_help_table bit = 0, /*hides the "bottom table" that shows help and support information*/
40332
40334
@format_output bit = 1, /*returns numbers formatted with commas and most decimals rounded away*/
40333
40335
@get_all_databases bit = 0, /*looks for query store enabled user databases and returns combined results from all of them*/
40334
-
@include_databases nvarchar(MAX) = NULL, /*comma-separated list of databases to include (only when @get_all_databases = 1)*/
40335
-
@exclude_databases nvarchar(MAX) = NULL, /*comma-separated list of databases to exclude (only when @get_all_databases = 1)*/
40336
+
@include_databases nvarchar(max) = NULL, /*comma-separated list of databases to include (only when @get_all_databases = 1)*/
40337
+
@exclude_databases nvarchar(max) = NULL, /*comma-separated list of databases to exclude (only when @get_all_databases = 1)*/
40336
40338
@workdays bit = 0, /*Use this to filter out weekends and after-hours queries*/
40337
40339
@work_start time(0) = '9am', /*Use this to set a specific start of your work days*/
40338
40340
@work_end time(0) = '5pm', /*Use this to set a specific end of your work days*/
0 commit comments