How can i check a reseed statement has been run on a table

  • i have a table with user_id (identity) as primary key

    everything is getting inserted normally up untill row 140

    next day i come in , rows inserted are with primary key values 1139

    how can i check whether a reseed statement has been run on a table ??

    Thank you

  • Forgot to mention its in Sql server 2012.

  • If this is in an AG topology you may have hit a bug. See here:

    http://connect.microsoft.com/SQLServer/feedback/details/739013/failover-or-restart-results-in-reseed-of-identity

    However, I wouldn't focus on the reseed itself unless you really can't accept gaps.

    Gaps are expected on identity columns. Consider using a sequence with no cache (gaps could still occur when values are not used or used in uncommitted transactions, but the same applies to identity).

    -- Gianluca Sartori

  • Hi

    The increment of an identity column (user_id) is not rollback-able. So if you're having rollback transactions than the seed value will just go forward.

    Regards,

    IgorMi

    Igor Micev,My blog: www.igormicev.com

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply