浏览代码

Upgrade to v1.6.3.1

Pedro Lopes 9 年之前
父节点
当前提交
0eafe5dbdd
共有 2 个文件被更改,包括 10 次插入6 次删除
  1. 5 3
      AdaptiveIndexDefrag/usp_AdaptiveIndexDefrag.sql
  2. 5 3
      MaintenanceSolution/2_usp_AdaptiveIndexDefrag.sql

+ 5 - 3
AdaptiveIndexDefrag/usp_AdaptiveIndexDefrag.sql

@@ -292,7 +292,7 @@ FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			ELSE
 			ELSE
 			BEGIN
 			BEGIN
 				EXEC ('INSERT INTO tbl_AdaptiveIndexDefrag_Stats_Working ([dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],[partitionNumber],[no_recompute],[is_incremental],[scanDate],[updateDate],[printStatus])
 				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;')
 FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			END
 			END
 		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.
 						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;
 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.
 						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:
 IMPORTANT:
 Execute in the database context of where you created the log and working tables.			
 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;
 		RAISERROR('Starting up...', 0, 42) WITH NOWAIT;
 
 
 		/* Declare variables */	
 		/* Declare variables */	
-		DECLARE @ver VARCHAR(5)
+		DECLARE @ver VARCHAR(10)
 				, @objectID int	
 				, @objectID int	
 				, @dbID int		
 				, @dbID int		
 				, @dbName NVARCHAR(256)		
 				, @dbName NVARCHAR(256)		
@@ -1084,7 +1086,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 
 
 		/* Initialize variables */	
 		/* 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 */	
 		/* Create temporary tables */	
 		IF EXISTS (SELECT [object_id] FROM tempdb.sys.objects (NOLOCK) WHERE [object_id] = OBJECT_ID('tempdb.dbo.#tblIndexDefragDatabaseList'))
 		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
 			ELSE
 			BEGIN
 			BEGIN
 				EXEC ('INSERT INTO tbl_AdaptiveIndexDefrag_Stats_Working ([dbID],[objectID],[statsID],[dbName],[schemaName],[objectName],[statsName],[partitionNumber],[no_recompute],[is_incremental],[scanDate],[updateDate],[printStatus])
 				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;')
 FROM tbl_AdaptiveIndexDefrag_Stats_Working_old;')
 			END
 			END
 		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.
 						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;
 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.
 						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:
 IMPORTANT:
 Execute in the database context of where you created the log and working tables.			
 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;
 		RAISERROR('Starting up...', 0, 42) WITH NOWAIT;
 
 
 		/* Declare variables */	
 		/* Declare variables */	
-		DECLARE @ver VARCHAR(5)
+		DECLARE @ver VARCHAR(10)
 				, @objectID int	
 				, @objectID int	
 				, @dbID int		
 				, @dbID int		
 				, @dbName NVARCHAR(256)		
 				, @dbName NVARCHAR(256)		
@@ -1084,7 +1086,7 @@ BEGIN SET @hasIXsOUT = 1 END ELSE BEGIN SET @hasIXsOUT = 0 END'
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 				, @ColumnStoreGetIXSQL_Param NVARCHAR(1000)
 
 
 		/* Initialize variables */	
 		/* 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 */	
 		/* Create temporary tables */	
 		IF EXISTS (SELECT [object_id] FROM tempdb.sys.objects (NOLOCK) WHERE [object_id] = OBJECT_ID('tempdb.dbo.#tblIndexDefragDatabaseList'))
 		IF EXISTS (SELECT [object_id] FROM tempdb.sys.objects (NOLOCK) WHERE [object_id] = OBJECT_ID('tempdb.dbo.#tblIndexDefragDatabaseList'))