Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Am I understand correctly following messages mean some changes were not applied to the target DB due to PK violation. Replicator tried to insert row with the same value for PK, which already exists in the target table. From this follows target db is out of sync with the primary?
00008296: 2022-08-07T15:31:18 [TARGET_APPLY ]W: Source changes that would have had no impact were not applied to the target database. Refer to the 'attrep_apply_exceptions' table for details (endpointshell.c:7136)
00008296: 2022-08-07T15:31:18 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position
Hello,
Wheat ive seen in the field about the error "Error creating Net Changes in Batch Opimized Apply mode" is its related to the attrep_apply_exceptions tables.
The fix for the issue on "Error creating Net Changes in Batch Optimized Apply Mode." is as follows:
Please modify the columns and increase the length for the statement and error columns .By default they are set to varchar(8192)
As for the message:
2022-08-07T15:34:50 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:00069418:0016' (bulk_apply.c:1703)
What the messages means is when we received an Insert record and we tried to add it target but there was already a primary key with that value.
so replicate will not change the record that already exist but put the record into 'attrep_apply_exceptions'
Hope this helps!
Thanks
Lyka
Hello @sergsyb ,
These are the warning messages, and considered as there might be other unique indexes that Replicate is actually complaining about.
You can mitigate this message by implementing the recommendations in the article below:
Regards,
Sachin B
Hello,
I recommend checking attrep_apply_exceptions and verify the cause of apply errors.
Thanks
Lyka
Hello Lyka
There are 5 failed INSERTS in the table attrep_apply_exceptions. Error column of attrep_apply_exceptions contains followed messages for all Inserts
"Error creating Net Changes in Batch Opimized Apply mode. For details, see the task log"
In log we have
2022-08-07T15:31:18 [TARGET_APPLY ]W: Source changes that would have had no impact were not applied to the target database. Refer to the 'attrep_apply_exceptions' table for details (endpointshell.c:7136)
2022-08-07T15:31:18 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:0002f603:0012' (bulk_apply.c:1703)
2022-08-07T15:31:51 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:0003ebd1:0014' (bulk_apply.c:1703)
2022-08-07T15:33:29 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:00057904:0015' (bulk_apply.c:1703)
2022-08-07T15:34:50 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:00069418:0016' (bulk_apply.c:1703)
The strange thing - 3 of 5 failed rows exists on the Target, but 2 are absent
Hello,
What is the target endpoint?
Thanks
Lyka
Hello,
Wheat ive seen in the field about the error "Error creating Net Changes in Batch Opimized Apply mode" is its related to the attrep_apply_exceptions tables.
The fix for the issue on "Error creating Net Changes in Batch Optimized Apply Mode." is as follows:
Please modify the columns and increase the length for the statement and error columns .By default they are set to varchar(8192)
As for the message:
2022-08-07T15:34:50 [ASSERTION ]W: The 'INSERT' event received for table 1 after 'INSERT (1)' event with the same primary key at stream position '0004dab3:00069418:0016' (bulk_apply.c:1703)
What the messages means is when we received an Insert record and we tried to add it target but there was already a primary key with that value.
so replicate will not change the record that already exist but put the record into 'attrep_apply_exceptions'
Hope this helps!
Thanks
Lyka
Thanks Lyka
You wrote "The fix for the issue on "Error creating Net Changes in Batch Optimized Apply Mode." is as follows: Please modify the columns and increase the length for the statement and error columns .By default they are set to varchar(8192)"
Please clarify is it means the full error message couldn't fit into Error column of table attrep_apply_exceptions and in such case we can see some general error likes "Error creating Net Changes in Batch ....." . And if we increase the length for the error column we can see REAL error message ?
Hello,
Yes. That's correct
Thanks
Lyka