Symptoms
After upgrading from adTempus 3.x to adTempus 4, an error message with message code 5313 is periodically logged in the Alerts view, with a message similar to the following:
Note: This article only applies if the error message indicates that "The DELETE statement conflicted with the REFERENCE constraint "FK_capturedFile_executionHistoryStep". If the error message does not match this, the cause of the problem is something else.
Cause
This message is reported while adTempus is cleaning up expired job history data and is caused by a problem with the way some history data was converted during the upgrade from version 3.
The problem only affects history cleanup and does not affect job execution.
Resolution
This problem can be resolved by executing a database query to correct the data.
1. Run the adTempus Database Utility as described in How to query the adTempus database.
2. Paste the following statements into the query window:
update t1 set t1.executionhistoryitemoid=t2.executionhistoryitemoid from capturedfile t1 inner join executionhistorystep t2 on t1.ExecutionHistoryStepOID =t2.oid where t1.ExecutionHistoryItemOID is null go update cf set cf.filedate=o.lastmodified from capturedfile cf join adtobject o on cf.oid=o.oid where cf.filedate is null go
3. Press F5 to execute the commands.
After this update is run, the messages should no longer appear.
There is no need to stop or restart the adTempus service.