Skip to content

Commit b531bc3

Browse files
author
Darling Data
committed
Automation: Format and Build SQL File [skip ci]
1 parent aa76ac4 commit b531bc3

1 file changed

Lines changed: 36 additions & 34 deletions

File tree

Install-All/DarlingData.sql

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Compile Date: 05/23/2026 16:07:57 UTC
1+
-- Compile Date: 05/28/2026 18:07:18 UTC
22
SET ANSI_NULLS ON;
33
SET ANSI_PADDING ON;
44
SET ANSI_WARNINGS ON;
@@ -6364,8 +6364,8 @@ SET XACT_ABORT ON;
63646364
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
63656365

63666366
SELECT
6367-
@version = '7.6',
6368-
@version_date = '20260501';
6367+
@version = '7.7',
6368+
@version_date = '20260601';
63696369

63706370
IF @help = 1
63716371
BEGIN
@@ -9127,7 +9127,7 @@ BEGIN
91279127
currentdbname = bd.value('(process/@currentdbname)[1]', 'sysname'),
91289128
currentdbid = bd.value('(process/@currentdb)[1]', 'integer'),
91299129
blocking_level = 0,
9130-
sort_order = CAST('' AS varchar(400)),
9130+
sort_order = CONVERT(varchar(400), ''),
91319131
activity = CASE WHEN oa.c.exist('//blocked-process-report/blocked-process') = 1 THEN 'blocked' END,
91329132
blocked_process_report = oa.c.query('.')
91339133
INTO #blocked
@@ -9154,17 +9154,17 @@ BEGIN
91549154
ISNULL
91559155
(
91569156
'(' +
9157-
CAST(blocking_spid AS varchar(10)) +
9157+
CONVERT(varchar(10), blocking_spid) +
91589158
':' +
9159-
CAST(blocking_ecid AS varchar(10)) +
9159+
CONVERT(varchar(10), blocking_ecid) +
91609160
')',
91619161
'unresolved process'
91629162
) PERSISTED,
91639163
blocked_desc AS
91649164
'(' +
9165-
CAST(blocked_spid AS varchar(10)) +
9165+
CONVERT(varchar(10), blocked_spid) +
91669166
':' +
9167-
CAST(blocked_ecid AS varchar(10)) +
9167+
CONVERT(varchar(10), blocked_ecid) +
91689168
')' PERSISTED;
91699169

91709170
CREATE CLUSTERED INDEX
@@ -9222,7 +9222,7 @@ BEGIN
92229222
currentdbname = bg.value('(process/@currentdbname)[1]', 'sysname'),
92239223
currentdbid = bg.value('(process/@currentdb)[1]', 'integer'),
92249224
blocking_level = 0,
9225-
sort_order = CAST('' AS varchar(400)),
9225+
sort_order = CONVERT(varchar(400), ''),
92269226
activity = CASE WHEN oa.c.exist('//blocked-process-report/blocking-process') = 1 THEN 'blocking' END,
92279227
blocked_process_report = oa.c.query('.')
92289228
INTO #blocking
@@ -9249,17 +9249,17 @@ BEGIN
92499249
ISNULL
92509250
(
92519251
'(' +
9252-
CAST(blocking_spid AS varchar(10)) +
9252+
CONVERT(varchar(10), blocking_spid) +
92539253
':' +
9254-
CAST(blocking_ecid AS varchar(10)) +
9254+
CONVERT(varchar(10), blocking_ecid) +
92559255
')',
92569256
'unresolved process'
92579257
) PERSISTED,
92589258
blocked_desc AS
92599259
'(' +
9260-
CAST(blocked_spid AS varchar(10)) +
9260+
CONVERT(varchar(10), blocked_spid) +
92619261
':' +
9262-
CAST(blocked_ecid AS varchar(10)) +
9262+
CONVERT(varchar(10), blocked_ecid) +
92639263
')' PERSISTED;
92649264

92659265
CREATE CLUSTERED INDEX
@@ -9283,11 +9283,12 @@ BEGIN
92839283
b.blocked_desc,
92849284
level = 0,
92859285
sort_order =
9286-
CAST
9286+
CONVERT
92879287
(
9288+
varchar(400),
92889289
b.blocking_desc +
92899290
' <-- ' +
9290-
b.blocked_desc AS varchar(400)
9291+
b.blocked_desc
92919292
)
92929293
FROM #blocking AS b
92939294
WHERE NOT EXISTS
@@ -9307,13 +9308,14 @@ BEGIN
93079308
bg.blocked_desc,
93089309
h.level + 1,
93099310
sort_order =
9310-
CAST
9311+
CONVERT
93119312
(
9313+
varchar(400),
93129314
h.sort_order +
93139315
' ' +
93149316
bg.blocking_desc +
93159317
' <-- ' +
9316-
bg.blocked_desc AS varchar(400)
9318+
bg.blocked_desc
93179319
)
93189320
FROM hierarchy AS h
93199321
JOIN #blocking AS bg
@@ -15580,8 +15582,8 @@ ALTER PROCEDURE
1558015582
@min_rows bigint = 0, /*only look at indexes with a minimum number of rows*/
1558115583
@dedupe_only bit = 'false', /*only perform deduplication, don't mark unused indexes for removal*/
1558215584
@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)*/
1558515587
@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)*/
1558615588
@help bit = 'false', /*learn about the procedure and parameters*/
1558715589
@debug bit = 'false', /*print dynamic sql, show temp table contents*/
@@ -15594,8 +15596,8 @@ BEGIN
1559415596
SET NOCOUNT ON;
1559515597
BEGIN TRY
1559615598
SELECT
15597-
@version = '2.6',
15598-
@version_date = '20260501';
15599+
@version = '2.7',
15600+
@version_date = '20260601';
1559915601

1560015602
IF
1560115603
/* 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.
1577915781

1578015782
DECLARE
1578115783
/*general script variables*/
15782-
@sql nvarchar(MAX) = N'',
15784+
@sql nvarchar(max) = N'',
1578315785
@object_id integer = NULL,
1578415786
@full_object_name nvarchar(768) = NULL,
1578515787
@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.
1590315905
@current_database_name sysname,
1590415906
@current_database_id integer,
1590515907
@error_msg nvarchar(2048),
15906-
@conflict_list nvarchar(MAX) = N'',
15908+
@conflict_list nvarchar(max) = N'',
1590715909
@rc bigint;
1590815910

1590915911
/* 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.
1619716199
index_id integer NOT NULL,
1619816200
index_name sysname NOT NULL,
1619916201
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,
1620316205
/* Query plan for original CREATE INDEX statement */
16204-
original_index_definition nvarchar(MAX) NULL,
16206+
original_index_definition nvarchar(max) NULL,
1620516207
/*
1620616208
Consolidation rule that matched (e.g., Key Duplicate, Key Subset, etc)
1620716209
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.
1795917961
JOIN ' + QUOTENAME(@current_database_name) +
1796017962
CONVERT
1796117963
(
17962-
nvarchar(MAX),
17964+
nvarchar(max),
1796317965
N'.sys.columns AS c
1796417966
ON ic.object_id = c.object_id
1796517967
AND ic.column_id = c.column_id
@@ -17987,7 +17989,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1798717989
) + QUOTENAME(@current_database_name) +
1798817990
CONVERT
1798917991
(
17990-
nvarchar(MAX),
17992+
nvarchar(max),
1799117993
N'.sys.dm_db_partition_stats ps
1799217994
WHERE ps.object_id = i.object_id
1799317995
AND ps.index_id IN (0, 1)
@@ -19913,7 +19915,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1991319915
XML
1991419916
PATH(''),
1991519917
TYPE
19916-
).value('.', 'nvarchar(MAX)'),
19918+
).value('.', 'nvarchar(max)'),
1991719919
1,
1991819920
2,
1991919921
N''
@@ -40331,8 +40333,8 @@ ALTER PROCEDURE
4033140333
@hide_help_table bit = 0, /*hides the "bottom table" that shows help and support information*/
4033240334
@format_output bit = 1, /*returns numbers formatted with commas and most decimals rounded away*/
4033340335
@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)*/
4033640338
@workdays bit = 0, /*Use this to filter out weekends and after-hours queries*/
4033740339
@work_start time(0) = '9am', /*Use this to set a specific start of your work days*/
4033840340
@work_end time(0) = '5pm', /*Use this to set a specific end of your work days*/
@@ -40368,8 +40370,8 @@ BEGIN TRY
4036840370
These are for your outputs.
4036940371
*/
4037040372
SELECT
40371-
@version = '6.6',
40372-
@version_date = '20260501';
40373+
@version = '6.7',
40374+
@version_date = '20260601';
4037340375

4037440376
/*
4037540377
Helpful section! For help.

0 commit comments

Comments
 (0)