On 02/04/18 13:11, 'Joje' j...@codework-solutions.com [firebird-support] 
wrote:
> 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.

Assuming that the ID is generated via the normal Firebird method, then 
there is a generator linked with the auto-increment. If the generator 
has been reset for some reason this would explain the current problem. 
Simply setting the generator above the current highest value will fix 
this. However we do need to check out just how the new value is 
generated as well.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-dig...@yahoogroups.com 
    firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

  • [firebird-support... 'Joje' j...@codework-solutions.com [firebird-support]
    • Re: [firebir... Lester Caine les...@lsces.co.uk [firebird-support]
      • RE: [fir... 'Joje' j...@codework-solutions.com [firebird-support]
    • Re: [firebir... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • RE: [fir... 'Joje' j...@codework-solutions.com [firebird-support]
        • Re: ... Lester Caine les...@lsces.co.uk [firebird-support]
        • Re: ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]

Reply via email to