Skip to content

Commit 3cc1a25

Browse files
authored
Update ❄️
1 parent f5d33c2 commit 3cc1a25

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

SQL Queries/maxdop_calculator.sql

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,13 @@ BEGIN
143143

144144
IF (@MaxDop <> @RecommendedMaxDop)
145145
BEGIN
146-
PRINT 'In case you want to change MAXDOP to the recommended value, please use this script:';
146+
PRINT 'In case you want to change MAXDOP to the recommended value, you can use this script:';
147147
PRINT '';
148-
PRINT 'EXEC sp_configure ''max degree of parallelism'', ' + CAST(@RecommendedMaxDop AS CHAR);
148+
PRINT 'EXEC sp_configure ''show advanced options'', 1;';
149+
PRINT 'GO';
150+
PRINT 'RECONFIGURE WITH OVERRIDE;';
151+
PRINT 'GO';
152+
PRINT 'EXEC sp_configure ''max degree of parallelism'', ' + CAST(@RecommendedMaxDop AS CHAR) + ';';
149153
PRINT 'GO';
150154
PRINT 'RECONFIGURE WITH OVERRIDE;';
151155
END;
@@ -165,7 +169,11 @@ BEGIN
165169
BEGIN
166170
PRINT 'In case you want to change MAXDOP to the recommended value, please use this script:';
167171
PRINT '';
168-
PRINT 'EXEC sp_configure ''max degree of parallelism'', ' + CAST(@RecommendedMaxDop AS CHAR);
172+
PRINT 'EXEC sp_configure ''show advanced options'', 1;';
173+
PRINT 'GO';
174+
PRINT 'RECONFIGURE WITH OVERRIDE;';
175+
PRINT 'GO';
176+
PRINT 'EXEC sp_configure ''max degree of parallelism'', ' + CAST(@RecommendedMaxDop AS CHAR) + ';';
169177
PRINT 'GO';
170178
PRINT 'RECONFIGURE WITH OVERRIDE;';
171179
END;

0 commit comments

Comments
 (0)