none
after reseed, the id value doesn't follow RRS feed

  • Question

  • Hi all,

    After I reseed, the newly added don't grow their id from the new seed, but follow the current column value. In my case, they should follow the 106716, but they go with 777981.

    Checking identity information: current identity value '106716', current column value '777981'.

    thanks,

    Sheldon

    Monday, December 23, 2019 4:38 PM

All replies

  • What exactly was the command you ran to reseed the value?

    Monday, December 23, 2019 5:05 PM
    Moderator
  • Hi all,

    After I reseed, the newly added don't grow their id from the new seed, but follow the current column value. In my case, they should follow the 106716, but they go with 777981.

    Checking identity information: current identity value '106716', current column value '777981'.

    thanks,

    Sheldon

    Good day ,

    1. We cannot read minds and we cannot see your queries. Please provide full demo which reproduce the issue (queries to create the table, insert sample data, and the task you do step by step  

    2. In the mean time make sure that you IDENTITY_INSERT is not SET to ON. Maybe you forgot to return it to OFF and you keep enter the same value?


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Monday, December 23, 2019 5:22 PM
    Moderator
  • Don't know what you are doing, but this works on my computer. (The table Northwind..Orders has an IDENTITY column and the values are in the range 10248 to 11077. The IDENTITY property is retained with SELECT INTO.)

    SELECT * INTO Orders FROM Northwind..Orders
    DBCC CHECKIDENT(Orders, RESEED, 35)
    INSERT Orders(CustomerID, OrderDate, EmployeeID)
      VALUES('ALFKI', '19990101', 7)
    SELECT scope_identity()

    The SELECT returns 36 as expected.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Monday, December 23, 2019 10:35 PM
    Moderator
  • Hi sesquipedalian,

    What was the command you executed to change the Seed Value?

    Please refer to this article.

    Best regards,
    Cris


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Tuesday, December 24, 2019 3:42 AM
  • Hi Sheldon,

    If you have resolved your issue, please mark the useful reply as answer. This can be beneficial to other community members reading the thread.

    In addition, if you have another questions, please feel free to ask.

    Thanks for your contribution.

    Best regards,
    Cris


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, December 30, 2019 2:23 AM