Database Purge Job Failing After Upgrade

Document ID : KB000075106
Last Modified Date : 30/03/2018
Show Technical Document Details
Question:
Hi, We recently upgraded from 12.6.4 to 12.6.8, running on Websphere. We run a monthly purge on the IMTPSTORE database which includes the garbageCollectTaskPersistence stored procedure. It seems that procedure changed with the upgrade and is now failing. The error is: Procedure or function 'garbageCollectTaskPersistence' expects parameter '@task_limit', which was not supplied. [SQLSTATE 42000] (Error 201). The step failed. Could you please let me know if this is a known issue with a fix? There seem to be two parameters missing: task_limit and totalTasks. Please let me know if I can provide any more info. Thank you, Michael
Environment:
IM 12.6.8
IM 14.1
Answer:
These are new parameters added in IM 12.6.8. You will only encounter this problem when executing the stored procedure garbageCollectTaskPeristence directly in SQL or Oracle.

Task limit is a number that would limit the number of tasks that would get archived. It's useful mainly when you don't know the volume of tasks that qualify (which at times can be millions), and you want to limit the amount of resources the DB was need over this. So you'd say, for example, 10000, meaning after it cleans up 10k tasks it would stop even though there are more qualified transactions under your criteria.

The total tasks parameter is an output parameter - when a task gets archived it increases this by one and when it's completed you'd get Total Tasks output saying how many transactions got cleaned up. Please let me know if you have further questions in this thread.