Replication Capture journal job fails with ASN2301 rc90 -- Could not write records to change data table, or MCH1867 from #cftsmp to vGenSynchPt with error type 18.
An error message is seen in the Capture job log and the journal job stops:
ASN2301 rc90 -- Could not write records to change data table
MCH1867 from #cftsmp to vGenSynchPt with error type 18
The problem is seen when a delete (journal entry - DL ) is rolled back but the rollback journal entry is a UR (Update, after image for rollback) with no matching BR (Update, before image for rollback) journal entry. In addition the registration is set up to capture updates as delete-Insert pairs.
This condition is not common and is not easy to produce. The common delete rollback journal entry is DR. A possible way to produce such an entry is to have a table with referential integrity constraints and also have a delete trigger on the table with *before as its trigger time. The trigger would delete records from the registered table. If there is an RI constraint violation, then it is possible for the registered table to see the DL and UR entries for the delete and rollback done by the trigger.
If such a condition happens, capture does not have the before image, cannot capture the update as a delete-insert pair, and will fail.
System i Datapropagator Capture.
Diagnosing the problem
ASN2301 rc90 or MCH1867 is seen in the job log.
The table affected will have CHG_UPD_TO_DEL_INS = 'Y' in the IBMSNAP_REGISTER table.
DSPJRN could be used to dump rollback entries to try and identify the table. The journal entries in the affected journal will have UR entries without matching BR entries.
In the capture job log the timestamp in the call to QZSNCV82 will provide the start time for retrieving journal entries. The call might be similar to the following example:
CALL PGM(QZSNCV82) PARM('TL QSQJRN 0 71 19999976 2012-01-08-10.51.10.160848 2 909 ASN ')
The journal entry types to look for will be BR and UR.
Resolving the problem
1. Stop the Capture program.
2. Update the IBMSNAP_REGISTER table to set CHG_UPD_TO_DEL_INS = 'N' for that table. For example:
UPDATE ASN/IBMSNAP_REGISTER SET CHG_UPD_TO_DEL_INS = 'N' WHERE SOURCE_OWNER='<affectedtablelibrary>' AND SOURCE_TABLE='<affectedtable>'
3. Start Capture.
4. Stop Capture after it is past the problem journal entry.
5. Change the value back. For example:
UPDATE ASN/IBMSNAP_REGISTER SET CHG_UPD_TO_DEL_INS = 'Y' WHERE SOURCE_OWNER='<affectedtablelibrary>' AND SOURCE_TABLE='<affectedtable>'
CHG_UPD_TO_DEL_INS = 'Y' is usually used in environments where applications update key columns.
Contact IBM Support for assistance with diagnosing or resolving the problem.