Pārlūkot izejas kodu

Merge pull request #15 from jmsferGH/patch-1

Update usp_AdaptiveIndexDefrag
Pedro Lopes 9 gadi atpakaļ
vecāks
revīzija
534397a60b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      AdaptiveIndexDefrag/usp_AdaptiveIndexDefrag.sql

+ 2 - 2
AdaptiveIndexDefrag/usp_AdaptiveIndexDefrag.sql

@@ -1791,7 +1791,7 @@ WHERE system_type_id IN (34, 35, 99) ' + CASE WHEN @sqlmajorver < 11 THEN 'OR ma
 				SET @operationFlag = 0	
 
 				/* Set Reorg command */
-				SET @sqlcommand = N'ALTER INDEX ' + @indexName + N' ON [' + @dbName + N'].' + @schemaName + N'.' + @objectName + N' REORGANIZE';
+				SET @sqlcommand = N'ALTER INDEX ' + @indexName + N' ON ' + @dbName + N'.' + @schemaName + N'.' + @objectName + N' REORGANIZE';
 
 				/* Set partition reorg options; requires Enterprise Edition; valid only if more than one partition exists */		
 				IF @partitionCount > 1 AND @dealMaxPartition IS NOT NULL AND @editionCheck = 1	
@@ -3101,4 +3101,4 @@ PRINT 'Procedure usp_AdaptiveIndexDefrag_Exceptions created (If the defrag shoul
 
 PRINT 'All done!'
 
-GO
+GO