• Firstly, there isn't a problem here. There is never a guarantee that identity values will not have gaps. Any time there's a insert that rolls back, the identity increments and doesn't go back. Identity values are meaningless numbers, you shouldn't care at all what the values are.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass