From b272a0fa35b1da6e0b89b7b15669c686d4af9887 Mon Sep 17 00:00:00 2001 From: Jos de Bruijn Date: Wed, 8 Jun 2016 08:57:55 -0700 Subject: [PATCH 1/2] fixes for Azure DB --- .gitignore | 3 ++- .../4-wwi-configure-required-database-objects.sql | 13 +++++++------ ...4-wwi-dw-configure-required-database-objects.sql | 13 +++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index d708676634..fcee0a896f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ samples/features/in-memory/ticket-reservations/DemoWorkload/obj/Release/DemoWork samples/features/in-memory/ticket-reservations/DemoWorkload/bin/Release/DemoWorkload.vshost.exe.config samples/databases/wide-world-importers/sample-scripts/always-encrypted/PopulateAlwaysEncryptedData/obj/Debug/PopulateAlwaysEncryptedData.csproj.FileListAbsolute.txt samples/databases/wide-world-importers/sample-scripts/always-encrypted/PopulateAlwaysEncryptedData/bin/Debug/PopulateAlwaysEncryptedData.vshost.exe.config -*.zip \ No newline at end of file +*.zip +samples/features/in-memory/ticket-reservations/packages/CircularGauge.1.0.0/CreatePackageFile.bat \ No newline at end of file diff --git a/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql b/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql index f4aaea521b..bb1387e5ca 100644 --- a/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql +++ b/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql @@ -3922,24 +3922,25 @@ BEGIN IF NOT EXISTS (SELECT 1 FROM sys.filegroups WHERE name = N'WWI_InMemory_Data') BEGIN SET @SQL = N' -ALTER DATABASE WideWorldImporters +ALTER DATABASE CURRENT ADD FILEGROUP WWI_InMemory_Data CONTAINS MEMORY_OPTIMIZED_DATA;'; EXECUTE (@SQL); SET @SQL = N' -ALTER DATABASE WideWorldImporters +ALTER DATABASE CURRENT ADD FILE (name = N''WWI_InMemory_Data_1'', filename = ''' + @MemoryOptimizedFilegroupFolder + N''') TO FILEGROUP WWI_InMemory_Data;'; EXECUTE (@SQL); - SET @SQL = N' -ALTER DATABASE WideWorldImporters -SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;'; - EXECUTE (@SQL); END; END; + SET @SQL = N' +ALTER DATABASE CURRENT +SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;'; + EXECUTE (@SQL); + IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = N'ColdRoomTemperatures' AND is_memory_optimized <> 0) BEGIN diff --git a/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql b/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql index 8c8c058213..e6a8c63780 100644 --- a/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql +++ b/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql @@ -1148,24 +1148,25 @@ BEGIN IF NOT EXISTS (SELECT 1 FROM sys.filegroups WHERE name = N'WWIDW_InMemory_Data') BEGIN SET @SQL = N' -ALTER DATABASE WideWorldImportersDW +ALTER DATABASE CURRENT ADD FILEGROUP WWIDW_InMemory_Data CONTAINS MEMORY_OPTIMIZED_DATA;'; EXECUTE (@SQL); SET @SQL = N' -ALTER DATABASE WideWorldImportersDW +ALTER DATABASE CURRENT ADD FILE (name = N''WWIDW_InMemory_Data_1'', filename = ''' + @MemoryOptimizedFilegroupFolder + N''') TO FILEGROUP WWIDW_InMemory_Data;'; EXECUTE (@SQL); - SET @SQL = N' -ALTER DATABASE WideWorldImportersDW -SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;'; - EXECUTE (@SQL); END; END; + SET @SQL = N' +ALTER DATABASE CURRENT +SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;'; + EXECUTE (@SQL); + IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = N'Customer_Staging' AND is_memory_optimized <> 0) BEGIN From 6f666364688483a1667fbd5ddfd2f7677bd5225a Mon Sep 17 00:00:00 2001 From: Jos de Bruijn Date: Wed, 8 Jun 2016 09:59:14 -0700 Subject: [PATCH 2/2] fix for Azure --- .gitignore | 3 ++- .../4-wwi-configure-required-database-objects.sql | 14 +++++--------- ...-wwi-dw-configure-required-database-objects.sql | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index fcee0a896f..931773c96b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ samples/features/in-memory/ticket-reservations/DemoWorkload/bin/Release/DemoWork samples/databases/wide-world-importers/sample-scripts/always-encrypted/PopulateAlwaysEncryptedData/obj/Debug/PopulateAlwaysEncryptedData.csproj.FileListAbsolute.txt samples/databases/wide-world-importers/sample-scripts/always-encrypted/PopulateAlwaysEncryptedData/bin/Debug/PopulateAlwaysEncryptedData.vshost.exe.config *.zip -samples/features/in-memory/ticket-reservations/packages/CircularGauge.1.0.0/CreatePackageFile.bat \ No newline at end of file +samples/features/in-memory/ticket-reservations/packages/CircularGauge.1.0.0/CreatePackageFile.bat +samples/features/in-memory/ticket-reservations/TicketReservations/TicketReservations.dbmdl \ No newline at end of file diff --git a/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql b/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql index bb1387e5ca..1e2ef1722a 100644 --- a/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql +++ b/samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql @@ -3900,7 +3900,6 @@ DROP PROCEDURE IF EXISTS [Application].Configuration_EnableInMemory; GO CREATE PROCEDURE [Application].Configuration_EnableInMemory -WITH EXECUTE AS OWNER AS BEGIN SET NOCOUNT ON; @@ -4999,10 +4998,7 @@ BEGIN EXEC [Application].[Configuration_ApplyColumnstoreIndexing]; - IF SERVERPROPERTY(N'IsFullTextInstalled') = 0 - BEGIN - EXEC [Application].[Configuration_ApplyFullTextIndexing]; - END; + EXEC [Application].[Configuration_ApplyFullTextIndexing]; EXEC [Application].[Configuration_EnableInMemory]; @@ -6161,8 +6157,8 @@ GO -- initial data population to ship date -EXEC WideWorldImporters.DataLoadSimulation.Configuration_ApplyDataLoadSimulationProcedures; -EXEC WideWorldImporters.DataLoadSimulation.DailyProcessToCreateHistory +EXEC DataLoadSimulation.Configuration_ApplyDataLoadSimulationProcedures; +EXEC DataLoadSimulation.DailyProcessToCreateHistory @StartDate = '20130101', @EndDate = '20160331', @AverageNumberOfCustomerOrdersPerDay = 60, @@ -6171,11 +6167,11 @@ EXEC WideWorldImporters.DataLoadSimulation.DailyProcessToCreateHistory @UpdateCustomFields = 1, @IsSilentMode = 1, @AreDatesPrinted = 1; -EXEC WideWorldImporters.DataLoadSimulation.Configuration_RemoveDataLoadSimulationProcedures; +EXEC DataLoadSimulation.Configuration_RemoveDataLoadSimulationProcedures; -- roll data up to current date -EXEC WideWorldImporters.DataLoadSimulation.PopulateDataToCurrentDate +EXEC DataLoadSimulation.PopulateDataToCurrentDate @AverageNumberOfCustomerOrdersPerDay = 60, @SaturdayPercentageOfNormalWorkDay = 50, @SundayPercentageOfNormalWorkDay = 0, diff --git a/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql b/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql index e6a8c63780..ac7b8d092c 100644 --- a/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql +++ b/samples/databases/wide-world-importers/wwi-dw-database-scripts/4-wwi-dw-configure-required-database-objects.sql @@ -1124,7 +1124,6 @@ DROP PROCEDURE IF EXISTS [Application].Configuration_EnableInMemory; GO CREATE PROCEDURE [Application].Configuration_EnableInMemory -WITH EXECUTE AS OWNER AS BEGIN SET NOCOUNT ON;