SyncEngine.RunHistory table has too many records

Managing SyncEngine.RunHistory Table Size for Identity Service

Key Point:

  • The SyncEngine.RunHistory table can significantly grow without automated cleanup, potentially impacting performance.

Recommended Actions:

  1. Regularly Delete Old Data:

    • Use this query to retain only 30 days of logs:
      SQL
      DELETE FROM [SyncEngine].[RunHistory]
      WHERE [SyncEnd] < GETUTCDATE() - 30
    • Automate with SQL Job: Create a scheduled job to execute this query regularly.
  2. Consider Performance and Disk Space:

    • Stop K2 Service: Temporarily pause K2 services during cleanup to minimize impact.
    • Ensure Adequate Disk Space: Verify sufficient space on the SQL server for transaction logs, especially for large deletions.

Additional Tips:

  • Customize Retention Period: Adjust the '-30' value in the query to match your desired log retention period.
  • Monitor Table Size: Regularly check the table size to ensure it's within acceptable limits.
  • Explore Alternative Cleanup Methods: If manual or scheduled cleanups become unwieldy, investigate options for automating the process within the K2 environment itself.

By following these guidelines, you can effectively manage the SyncEngine.RunHistory table size and maintain optimal performance of your Identity service.

Comments

Popular posts from this blog

Blocking Error during K2 5.6 Server migration

Client Credentials flow with K2 Cloud with Odata, Workflow REST or SCIM

Blocking error RegisterServiceInstanceObjects when upgrading to K2 5.6/5.7