****************INTERNAL TO SUPPORT TEAM ( Not for Customers) *************************
Note:-This article is created only for Support team and will be done along with product expert.
Environment:
iVend 6.6 integrated with SAPB1
Problem Statement:
iVend 6.6 Enterprise/HO database is getting increased in size becuase of high volume of tranaction data and there is need to purge the iVend Enterprise /HO database
Symptoms: NA
Resolution/Work Around:
Step1:
Schedule in SQL Job:
Declare @PurgeDate Datetime
Declare @FinalPurgeDate Nvarchar(50)
SET @PurgeDate = '2023-01-01 00:00:00.000' -- <<YYYY-MM-DD>> This is Cutoff Date you want to Choose for Purge Database i.e after Purging data will be available after this date only.
-- This Job will Delete 5 Days Data in One Execution and will execute daily untill Purge Date will Match. In case you want to Increase 5 days to 7 days you can change 5 to 7 in Below Query.
Select @FinalPurgeDate= CONVERT(nvarchar(50), CASE WHEN ((min(businessdate)+5) < @PurgeDate) THEN (min(businessdate)+5 ) ELSE @PurgeDate END , 112) from trxtransaction (nolock)
Print @FinalPurgeDate
exec sp_DatabasePurge @FinalPurgeDate , 0,1
Step2 :
Apply the attached SQL Procedure sp_DatabasePurge
Step3 :
CUstomer need to validate on daily bases via below query that data was deleted or not.
Select min(businessdate) from trxtransaction (nolock)
Recommendations /Suggestion: NA