Skip to content

Commit f99d932

Browse files
committed
rolling back to last known good state
1 parent 51b0124 commit f99d932

File tree

3 files changed

+89
-111
lines changed

3 files changed

+89
-111
lines changed

samples/databases/wide-world-importers/wwi-database-scripts/4-wwi-configure-required-database-objects.sql

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,9 +2926,7 @@ CREATE PROCEDURE DataLoadSimulation.DailyProcessToCreateHistory
29262926
@SundayPercentageOfNormalWorkDay int,
29272927
@UpdateCustomFields bit,
29282928
@IsSilentMode bit,
2929-
@AreDatesPrinted bit,
2930-
-- @CommitBatchSize, the size of each commit batch, added by Shiyang Qiu, July 14, 2016
2931-
@CommitBatchSize int = 10
2929+
@AreDatesPrinted bit
29322930
AS
29332931
BEGIN
29342932
SET NOCOUNT ON;
@@ -2943,18 +2941,13 @@ BEGIN
29432941
DECLARE @IsMonday bit;
29442942
DECLARE @Weekday int;
29452943
DECLARE @IsStaffOnly bit;
2946-
-- @TotalNumberCounter, used to count the number of record, added by Shiyang Qiu, July 14, 2016
2947-
DECLARE @TotalNumberCounter int = 1;
29482944
29492945
SET DATEFIRST 7; -- Week begins on Sunday
29502946
29512947
EXEC DataLoadSimulation.DeactivateTemporalTablesBeforeDataLoad;
29522948
29532949
WHILE @CurrentDateTime <= @EndDate
29542950
BEGIN
2955-
--begin tran if there is no transaction
2956-
IF(@@TRANCOUNT=0) BEGIN TRAN
2957-
29582951
IF @AreDatesPrinted <> 0 OR @IsSilentMode = 0
29592952
BEGIN
29602953
PRINT SUBSTRING(DATENAME(weekday, @CurrentDateTime), 1,3) + N'' '' + CONVERT(nvarchar(20), @CurrentDateTime, 107);
@@ -3095,17 +3088,7 @@ BEGIN
30953088
PRINT N'' '';
30963089
END;
30973090
3098-
--control the batch commit
3099-
--where there is tran, and (meet the commit size or the final record)
3100-
IF(@@TRANCOUNT=1 and ((@TotalNumberCounter % @CommitBatchSize = 0) or @CurrentDateTime = @EndDate))
3101-
BEGIN
3102-
IF @AreDatesPrinted <> 0 OR @IsSilentMode = 0 print ''COMMIT''
3103-
COMMIT
3104-
END
3105-
3106-
-- increase the @CurrentDateTime and the @TotalNumberCounter
3107-
SET @CurrentDateTime = DATEADD(day, 1, @CurrentDateTime);
3108-
SET @TotalNumberCounter = @TotalNumberCounter + 1;
3091+
SET @CurrentDateTime = DATEADD(day, 1, @CurrentDateTime);
31093092
END; -- of processing each day
31103093
31113094
IF @UpdateCustomFields <> 0
@@ -6202,4 +6185,4 @@ EXEC DataLoadSimulation.PopulateDataToCurrentDate
62026185
@IsSilentMode = 1,
62036186
@AreDatesPrinted = 1;
62046187
6205-
*/
6188+
*/

0 commit comments

Comments
 (0)