Przeglądaj źródła

Upgrade to v1.6.3.1

Pedro Lopes 9 lat temu
rodzic
commit
0eafe5dbdd

+ 5 - 3
AdaptiveIndexDefrag/usp_AdaptiveIndexDefrag.sql

@@ -292,7 +292,7 @@ FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			ELSE
 			BEGIN
 				EXEC ('INSERT INTO tbl_AdaptiveIndexDefrag_Stats_Working ([dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],[partitionNumber],[no_recompute],[is_incremental],[scanDate],[updateDate],[printStatus])
-SELECT [dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],NULL,[no_recompute],0,[scanDate],[updateDate],[printStatus]
+SELECT [dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],1,[no_recompute],0,[scanDate],[updateDate],[printStatus]
 FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			END
 		END
@@ -574,6 +574,8 @@ v1.6.2 - 10/3/2016 - Added option to determine whether to exclude blobs from fra
 						Fixed issue where auto created statistics would not be picked up for update.
 v1.6.3 - 10/14/2016 - Fixed issue with statistics collection in SQL Server 2012 and below;
 						Fixed issue where indexes on views generated error 1934.
+v1.6.3.1 - 10/14/2016 - Fixed syntax error; 
+						Fixed migration issue from v1.6.2.
 					
 IMPORTANT:
 Execute in the database context of where you created the log and working tables.			
@@ -1010,7 +1012,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 		RAISERROR('Starting up...', 0, 42) WITH NOWAIT;
 
 		/* Declare variables */	
-		DECLARE @ver VARCHAR(5)
+		DECLARE @ver VARCHAR(10)
 				, @objectID int	
 				, @dbID int		
 				, @dbName NVARCHAR(256)		
@@ -1084,7 +1086,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 
 		/* Initialize variables */	
-		SELECT @startDateTime = GETDATE(), @endDateTime = DATEADD(minute, @timeLimit, GETDATE()), @operationFlag = NULL, @ver = '1.6.3';
+		SELECT @startDateTime = GETDATE(), @endDateTime = DATEADD(minute, @timeLimit, GETDATE()), @operationFlag = NULL, @ver = '1.6.3.1';
 	
 		/* Create temporary tables */	
 		IF EXISTS (SELECT [object_id] FROM tempdb.sys.objects (NOLOCK) WHERE [object_id] = OBJECT_ID('tempdb.dbo.#tblIndexDefragDatabaseList'))

+ 5 - 3
MaintenanceSolution/2_usp_AdaptiveIndexDefrag.sql

@@ -292,7 +292,7 @@ FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			ELSE
 			BEGIN
 				EXEC ('INSERT INTO tbl_AdaptiveIndexDefrag_Stats_Working ([dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],[partitionNumber],[no_recompute],[is_incremental],[scanDate],[updateDate],[printStatus])
-SELECT [dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],NULL,[no_recompute],0,[scanDate],[updateDate],[printStatus]
+SELECT [dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],1,[no_recompute],0,[scanDate],[updateDate],[printStatus]
 FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			END
 		END
@@ -574,6 +574,8 @@ v1.6.2 - 10/3/2016 - Added option to determine whether to exclude blobs from fra
 						Fixed issue where auto created statistics would not be picked up for update.
 v1.6.3 - 10/14/2016 - Fixed issue with statistics collection in SQL Server 2012 and below;
 						Fixed issue where indexes on views generated error 1934.
+v1.6.3.1 - 10/14/2016 - Fixed syntax error; 
+						Fixed migration issue from v1.6.2.
 					
 IMPORTANT:
 Execute in the database context of where you created the log and working tables.			
@@ -1010,7 +1012,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 		RAISERROR('Starting up...', 0, 42) WITH NOWAIT;
 
 		/* Declare variables */	
-		DECLARE @ver VARCHAR(5)
+		DECLARE @ver VARCHAR(10)
 				, @objectID int	
 				, @dbID int		
 				, @dbName NVARCHAR(256)		
@@ -1084,7 +1086,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 
 		/* Initialize variables */	
-		SELECT @startDateTime = GETDATE(), @endDateTime = DATEADD(minute, @timeLimit, GETDATE()), @operationFlag = NULL, @ver = '1.6.3';
+		SELECT @startDateTime = GETDATE(), @endDateTime = DATEADD(minute, @timeLimit, GETDATE()), @operationFlag = NULL, @ver = '1.6.3.1';
 	
 		/* Create temporary tables */	
 		IF EXISTS (SELECT [object_id] FROM tempdb.sys.objects (NOLOCK) WHERE [object_id] = OBJECT_ID('tempdb.dbo.#tblIndexDefragDatabaseList'))