SOI Toolbox cleanHistoryData and AlertHistory table data


Article ID: 131072


Updated On:


CA Service Operations Insight (SOI)


The soitoolbox is used to delete the old alert history data. The soitoolbox.exe -x --cleanHistoryData=90 command deletes alerts and history data for items older then 30 days. 

After running the SOI toolbox command the SOI databases AlertHistory table still has some data older then 90 days in it. Why is this?


Component: SOIMGR


The AlertHistory table keeps the update history for every alert in the Alerts table, both tables have an AlertID column for each alert. As long as the AlertID exists in the Alerts table, the AlertsHistory table entry will not get deleted. You can run the following query to verify alerts in the AlertHistory table still have valid AlertIDs in the Alerts table:

select count(*) from AlertHistory where AlertID not in (select AlertID from Alerts)

This query checks if the AlertID's in the AlertHistory table are not in the Alerts table. The result should be 0 meaning all the AlertHistory entries still have a valid AlertsID entry in the alerts table.