mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
facilitating publication to azure
- removing explicit filegroup references from index definitions - adding snapshot hints to references for memory-optimized tables, to facilicate publication in DBs without the MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT hint
This commit is contained in:
+3
-3
@@ -29,12 +29,12 @@ BEGIN
|
||||
DECLARE @Temperature decimal(10,2);
|
||||
|
||||
-- clean up any artifacts from earlier runs
|
||||
DELETE FROM DataLoadSimulation.[ColdRoomTemperatures_temp]
|
||||
DELETE FROM DataLoadSimulation.[ColdRoomTemperatures_temp] WITH (SNAPSHOT)
|
||||
|
||||
IF @TimeCounter < @TimeToFinishForTheDay
|
||||
BEGIN
|
||||
-- seed temporary table with current status of sensors
|
||||
DELETE Warehouse.ColdRoomTemperatures
|
||||
DELETE Warehouse.ColdRoomTemperatures WITH (SNAPSHOT)
|
||||
OUTPUT deleted.ColdRoomTemperatureID,
|
||||
deleted.ColdRoomSensorNumber,
|
||||
deleted.RecordedWhen,
|
||||
@@ -54,7 +54,7 @@ BEGIN
|
||||
EXEC DataLoadSimulation.PopulateColdRoomTemperatures_temp @AverageSecondsBetweenReadings, @NumberOfSensors, @TimeCounter, @ArchiveEndTime
|
||||
|
||||
-- move daily data into archive table
|
||||
DELETE DataLoadSimulation.ColdRoomTemperatures_temp
|
||||
DELETE DataLoadSimulation.ColdRoomTemperatures_temp WITH (SNAPSHOT)
|
||||
OUTPUT deleted.ColdRoomTemperatureID,
|
||||
deleted.ColdRoomSensorNumber,
|
||||
deleted.RecordedWhen,
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
[IsFinalized] AS (case when [FinalizationDate] IS NULL then CONVERT([bit],(0)) else CONVERT([bit],(1)) end) PERSISTED,
|
||||
[LastEditedBy] INT NOT NULL,
|
||||
[LastEditedWhen] DATETIME2 (7) CONSTRAINT [DF_Purchasing_SupplierTransactions_LastEditedWhen] DEFAULT (sysdatetime()) NOT NULL,
|
||||
CONSTRAINT [PK_Purchasing_SupplierTransactions] PRIMARY KEY NONCLUSTERED ([SupplierTransactionID] ASC) ON [USERDATA],
|
||||
CONSTRAINT [PK_Purchasing_SupplierTransactions] PRIMARY KEY NONCLUSTERED ([SupplierTransactionID] ASC),
|
||||
CONSTRAINT [FK_Purchasing_SupplierTransactions_Application_People] FOREIGN KEY ([LastEditedBy]) REFERENCES [Application].[People] ([PersonID]),
|
||||
CONSTRAINT [FK_Purchasing_SupplierTransactions_PaymentMethodID_Application_PaymentMethods] FOREIGN KEY ([PaymentMethodID]) REFERENCES [Application].[PaymentMethods] ([PaymentMethodID]),
|
||||
CONSTRAINT [FK_Purchasing_SupplierTransactions_PurchaseOrderID_Purchasing_PurchaseOrders] FOREIGN KEY ([PurchaseOrderID]) REFERENCES [Purchasing].[PurchaseOrders] ([PurchaseOrderID]),
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
[IsFinalized] AS (case when [FinalizationDate] IS NULL then CONVERT([bit],(0)) else CONVERT([bit],(1)) end) PERSISTED,
|
||||
[LastEditedBy] INT NOT NULL,
|
||||
[LastEditedWhen] DATETIME2 (7) CONSTRAINT [DF_Sales_CustomerTransactions_LastEditedWhen] DEFAULT (sysdatetime()) NOT NULL,
|
||||
CONSTRAINT [PK_Sales_CustomerTransactions] PRIMARY KEY NONCLUSTERED ([CustomerTransactionID] ASC) ON [USERDATA],
|
||||
CONSTRAINT [PK_Sales_CustomerTransactions] PRIMARY KEY NONCLUSTERED ([CustomerTransactionID] ASC),
|
||||
CONSTRAINT [FK_Sales_CustomerTransactions_Application_People] FOREIGN KEY ([LastEditedBy]) REFERENCES [Application].[People] ([PersonID]),
|
||||
CONSTRAINT [FK_Sales_CustomerTransactions_CustomerID_Sales_Customers] FOREIGN KEY ([CustomerID]) REFERENCES [Sales].[Customers] ([CustomerID]),
|
||||
CONSTRAINT [FK_Sales_CustomerTransactions_InvoiceID_Sales_Invoices] FOREIGN KEY ([InvoiceID]) REFERENCES [Sales].[Invoices] ([InvoiceID]),
|
||||
|
||||
Reference in New Issue
Block a user