Skip to content

Commit

Permalink
Merge pull request #55 from Microsoft/jodebrui
Browse files Browse the repository at this point in the history
Jodebrui - fixes for Azure in DB scripts
  • Loading branch information
jodebrui committed Jun 8, 2016
2 parents c572a40 + 6f66636 commit dfe1b64
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ 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
*.zip
samples/features/in-memory/ticket-reservations/packages/CircularGauge.1.0.0/CreatePackageFile.bat
samples/features/in-memory/ticket-reservations/TicketReservations/TicketReservations.dbmdl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -3922,24 +3921,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

Expand Down Expand Up @@ -4998,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];

Expand Down Expand Up @@ -6160,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,
Expand All @@ -6170,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -1148,24 +1147,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

Expand Down

0 comments on commit dfe1b64

Please sign in to comment.