From aec710f65d62976b2160919f290144bfebdb0ad2 Mon Sep 17 00:00:00 2001 From: Romain Ferraton Date: Wed, 20 Jun 2018 09:56:06 +0200 Subject: [PATCH] update dba_defragindex_sp to allow columnstore ColumnStore Index dissallow SORT_IN_TEMPDB parameter, so in order to rebuild these index, when the @sort_in_tempdb variable is set to 0 then no more SORT_IN_TEMPDB=OFF --> the ELSE part is removed. --- indexes/dba_indexDefrag_sp.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indexes/dba_indexDefrag_sp.sql b/indexes/dba_indexDefrag_sp.sql index a6a436c..cd895ff 100644 --- a/indexes/dba_indexDefrag_sp.sql +++ b/indexes/dba_indexDefrag_sp.sql @@ -889,8 +889,7 @@ BEGIN /* Set sort operation preferences */ IF @sortInTempDB = 1 SET @rebuildCommand = @rebuildCommand + N', SORT_IN_TEMPDB = ON'; - ELSE - SET @rebuildCommand = @rebuildCommand + N', SORT_IN_TEMPDB = Off'; + /* Set processor restriction options; requires Enterprise Edition */ IF @maxDopRestriction IS NOT NULL AND @editionCheck = 1