SQL Server IDENTITY skipping -


this question has answer here:

i've got .net application has been running 10 years using sql server backend. reason, on last 2-3 months, has decided skip out around 990 (i think has been 997 twice , 989 once) identity numbers 3 times. can't think of activities system generate records , delete them or attempt insert many times. intermittent problem, odd , i'd bottom of it. have ideas how go finding cause?

the system mixture of different technologies - older stuff ado.net , newer linq sql. don't think feasible log every statement executed or quite active system number of users.

this normal - if attempt update fails due constraint violation (say because of attempt insert null non-nullable column, or non-existent foreign key, instance), identity field increment row not insert.

the next inserted row (assuming not fail) increment identity , insert, leaving "gap".

this not problem.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -