Change Log Error

This error keeps popping up at various times and we do not know how to resolve it.“Change Log Entry Entry No.‘0’ already exists”. I resolved it last week by deleting some of the change log entries but I don’t want to do this again.

This happens when you restore a backup, and a table with autoincrement exist. Somehow this counter is not stored in the backup, so you have to do a delete/insert of the last entry in order to get back on track.

Hey Soren, what do you mean by “a table with autoincrement exist” I am seeing this problem a lot, and not just after restores, so I really want to find a propper fix. thanks.

Take a look at table 405 Change Log Entry - field 1 Entry No. Datatype BigInteger. The property AutoIncrement is set.


AutoIncrement Use this property to specify whether or not each field value should be automatically given a new number that is greater than the number given to the previous value. Applies to Fields of the Integer and BigInteger data type. Comments A table can only contain one field that has been defined as an auto-increment field. The numbers that are assigned will not necessarily be consecutive because: If you delete some records from a table, the numbers that are used in these records will not be reused. If several transactions are being performed at the same time, they will each be assigned a different number. However, if one of these transactions is rolled back, the number that it was assigned cannot be reused. If you add an auto-increment field to an existing table, it will automatically generate consecutive values and insert them into the table. If you enable the auto-increment property for a field that already contains data, there must be no zero values in the field. The AutoIncrement property does not work for C/SIDE temporary tables.

I dont know if they have fixed this issue in 3.70, but when restoring a backup in 3.60 the AutoIncrement counter where not updated - so what happens is it tries to insert an entry ‘0’ again, which already exists - resulting in the error.


Its fixed in 3.70 and hotfix 17 of 3.60.

Great, hadn’t seen it. Thanks…


HQ-107-485-D9FK Field with the Autoincrement Property Set to Yes does not Continue Data with the Maximum Value after a Restore Error If a backup is made of a table that contains a field with data and where the AutoIncrement property for the field is set to Yes, then the seed for the autoincrement value should be the maximum value for that field when the table is restored. Instead, the seed is reset to 0, which gives 1 as the next value to be used. This error applies only to Navision Database Server. An example of this error in the base application is the Change Log functionality, which would fail after performing a restore of change log entries and an attempt to add further entries to the change log. This has been corrected.

Do you know if they have fixed it so that you can use Autoincrement as the primary key in a dataport?

David, can you explain the problem/error with this scenario?