How to troubleshoot Change History archive database growing to maximum size
Applies to
Cayosoft Guardian environments that use an Archive database for Archive > Change History.
Symptoms
- Archive database size keeps growing and reaches maximum size.
- Retention job may complete, but old data remains and DB size does not decrease.
- Retention may fail with timeout errors, including:
Execution Timeout ExpiredSystem.TimeoutException- “Failed to retain …”
Cause
- Retention rules for Archive databases are disabled.

- Retention processing on large Change History datasets can time out.
- Index condition on Change History tables in both production and archive databases can slow retention operations.
- Timeout values may be too low for the archive or production DB workload.
Resolution
- Ensure the retention rules for Archive Database are enabled.
- Confirm the intended retention window.
- Increase timeout settings used for archive DB operations.

-
Configure SQL maintenance plans to reorganize and rebuild indexes online for archive and production databases.
NOTE: Online indexes rebuild is available on SQL Enterprise edition only.
- To optimize SQL indexes manually, connect to the Archive database with SSMS and execute the following commands. For Enterprise SQL edition:
CopyALTER INDEX IX_HistoryRecords_createdDateTime
ON dbo.HistoryRecords
REBUILD WITH (ONLINE = ON);
- For Enterprise SQL edition, execute the following:
CopyALTER INDEX IX_HistoryRecords_createdDateTime
ON dbo.HistoryRecords
REORGANIZE;
- After timeout update, index optimization, run the retention job again.
Comments
0 comments
Please sign in to leave a comment.