Subject Auto-increment generating old ID's for insertion
Author Joje

Hello,

 

I have issue where auto-increment of ID column is generating older ID’s that is already used in table.

 

Currently, my transaction table has around 16 million rows and ID of last inserted row is 16,594,027.  While the generator ID its 16,593,965.  As you can see the generator is generating ID’s that is already present in table which causes violation of PRIMARY or UNIQUE KEY constraint "INTEG_105" error on that table.

 

I managed to fix this issue, recently I am facing it frequently on this transaction table, majority of the tables had number of records are more than 2 million or there is connectivity issues with DB.

 

Now, I am wondering is this related to Firebird DB or is there any other issue.

 

Thank you !!