@@ -2926,9 +2926,7 @@ CREATE PROCEDURE DataLoadSimulation.DailyProcessToCreateHistory
2926
2926
@SundayPercentageOfNormalWorkDay int,
2927
2927
@UpdateCustomFields bit,
2928
2928
@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
2932
2930
AS
2933
2931
BEGIN
2934
2932
SET NOCOUNT ON;
@@ -2943,18 +2941,13 @@ BEGIN
2943
2941
DECLARE @IsMonday bit;
2944
2942
DECLARE @Weekday int;
2945
2943
DECLARE @IsStaffOnly bit;
2946
- -- @TotalNumberCounter, used to count the number of record, added by Shiyang Qiu, July 14, 2016
2947
- DECLARE @TotalNumberCounter int = 1;
2948
2944
2949
2945
SET DATEFIRST 7; -- Week begins on Sunday
2950
2946
2951
2947
EXEC DataLoadSimulation.DeactivateTemporalTablesBeforeDataLoad;
2952
2948
2953
2949
WHILE @CurrentDateTime <= @EndDate
2954
2950
BEGIN
2955
- --begin tran if there is no transaction
2956
- IF(@@TRANCOUNT=0) BEGIN TRAN
2957
-
2958
2951
IF @AreDatesPrinted <> 0 OR @IsSilentMode = 0
2959
2952
BEGIN
2960
2953
PRINT SUBSTRING(DATENAME(weekday, @CurrentDateTime), 1,3) + N'' '' + CONVERT(nvarchar(20), @CurrentDateTime, 107);
@@ -3095,17 +3088,7 @@ BEGIN
3095
3088
PRINT N'' '' ;
3096
3089
END;
3097
3090
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);
3109
3092
END; -- of processing each day
3110
3093
3111
3094
IF @UpdateCustomFields <> 0
@@ -6202,4 +6185,4 @@ EXEC DataLoadSimulation.PopulateDataToCurrentDate
6202
6185
@IsSilentMode = 1,
6203
6186
@AreDatesPrinted = 1;
6204
6187
6205
- */
6188
+ */
0 commit comments