Task Persistence tables can grow excessively large, which negatively impacts Identity Manager system performance Task Persistence Database and In Progress Tasks: Use, Performance and Troubleshooting. The standard Cleanup Submitted Tasks task in the User Console may be ineffective for massive data sets as it is designed for regular maintenance of a well-managed database Cleanup Submitted Tasks Not Working. In cases where millions of records exist, the task may hang or cause system instability Daily Stuck "Cleanup" Task Requiring IAM Restart.
Massive row accumulation in the tasksession12_5 and object12_5 tables typically occurs when regular cleanup is not scheduled or when high-volume bulk tasks are processed.
For large-scale cleanup, use the built-in database stored procedures.
Warning: Perform a full Task Persistence database backup before executing these procedures Cleaning up Task Persistence DB of unnecessary data.
Select the procedure based on your archiving requirements Steps to perform IDM database cleanup:
garbageCollectTaskPersistence: Deletes tasks from the Task Persistence database without archiving them.archiveTaskPersistence: Moves tasks from Task Persistence to the Archive database.archive_gcTaskPersistence: Deletes old items from the Archive database.Instructions and scripts are located in the following directories of the Identity Manager installation Cleanup Submitted Tasks Not Working:
..\Identity Manager\tools\samples\TaskPersistence\SQLServer..\Identity Manager\tools\samples\TaskPersistence\OracleExample Execution (SQL Server): The following example deletes completed tasks older than 12 months, limiting processing to 10,000 records per run to conserve database resources Cleanup Submitted Tasks Not Working.
You may also find more details about running Celanup submitted tasks storred procedure in documentation - Cleanup Submitted Task by Executing a Stored Procedure from a Database.