[SyncEngine].[RunHistory] table maintenance

  • 15 February 2022
  • 0 replies

  • Anonymous
  • 0 replies


In K2 Five the ability exist to opt-in to using the New Identity Service / SyncEngine. This feature stores the run history in the '[SyncEngine].[RunHistory]' table. Each time a sync runs for any provider instance registered and entry is added and overtime this table can become large.


This article will help to cleanup entries older than 30 days from the table.


Backup the [SyncEngine].[RunHistory] table (Full run history might be needed when engaging Nintex Support).


The following SQL query will give an idea of how many rows in the table is older than 30 days.


Select count (*) from [SyncEngine].[RunHistory] with (NOLOCK)

where [SyncEnd] < GETUTCDATE() -30


 To delete the entries use the query below

NOTE: K2 Service needs to be stopped to ensure there are no new Syncs starting while the delete statement is running.

/* Delete all except last 30 days

Delete from [SyncEngine].[RunHistory]

where [SyncEnd] < GETUTCDATE() -30



Related Links

0 replies

Be the first to reply!