Informix Error -345
-345 Cannot update row - row in table does not match row in audit trail.
While the database server was reconstructing a table from the audit trail, it found a discrepancy between the contents of an updated row now and the contents that were recorded in the audit trail when the row was first updated. Either the audit-trail file has been corrupted, or the audit-trail file is incomplete, with missing records for some alterations. The table cannot be recovered as it stands. Try the operation again after you make sure that the table has been restored to exactly the state it had when the audit trail was created. If the error recurs, rebuild the table by other means.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-345 is the update-side member of the same three-error family as -343 (insert) and -344
(delete): during audit-trail-based table reconstruction, a row's current contents don't match
what the trail recorded for the original update, pointing to the same underlying causes —
corruption or incomplete audit-trail records.
- A corrupted audit-trail file, where the recorded update no longer matches the table's actual current state.
- Incomplete audit-trail records — some alterations were missed, so the table's actual state has diverged from what the trail expects at this point in the replay.
- The table was modified outside the audit-trail-tracked path, breaking the trail's assumption of a complete, ordered history.
Solutions / Resolution
- Restore the table to its original state from when the audit trail was created, per the official guidance, and retry the operation from that clean starting point.
- If the problem persists after restoring and retrying, treat the audit trail as unreliable and rebuild the table through alternative means rather than continuing to rely on it.
- Investigate whether the table was modified outside the audit-tracked path, to prevent recurrence once a clean state is re-established.
Examples
Restoring and replaying from a clean starting point
1. Restore the table to its state at the time the audit trail
was created (from a matching backup).
2. Replay the audit trail's recorded changes from that point.
3. If -345 recurs, the trail itself is unreliable — rebuild the
table from a different, trustworthy source instead.
Diagnostic Checks
- Confirm exactly when the audit trail was created, and whether a matching backup of the table from that point exists.
- Check whether the table was modified through any path other than the audit-tracked one during the trail's lifetime.
- If -345 recurs after a clean restore-and-replay attempt, treat the audit trail itself as corrupted rather than retrying indefinitely.
Related Errors / Related Topics
- -344 — "Cannot delete row - row in table does not match row in audit trail." The delete-side sibling of this same reconstruction-mismatch problem.
- -343 — "Row from audit trail was added to a different position than expected." The insert-side sibling — together these three cover insert, delete, and update mismatches during audit-trail replay, all with the identical restore-and-replay resolution path.
Same resolution as -343/-344: restore to the audit trail's starting point and replay; if the
mismatch recurs, rebuild the table from a different trusted source instead of continuing to
retry.