identity seed is all messed up

  • When I do a dbcc check Ident, I get a lot of

    Checking identity information: current identity value 'NULL', current column value 'NULL'.

    Or I get a lot of

    Checking identity information: current identity value '1', current column value '1001505'.

    Is there a away to fix this?

  • Looks like you need to reseed.

    DBCC CHECKIDENT ( 'table_name', RESEED )

    more info here:

    http://msdn2.microsoft.com/en-us/library/ms176057.aspx

  • If you run the statement I just posted the seed will be the maximum value which is 1001505 in your case.

    If you want to start the seed at 1 or any other number you can do

    DBCC CHECKIDENT ( 'table_name', RESEED,1)

  • Cool, I wasn't sujre if that reset to the highest Value. Thank you very much.

    I still see this

    Checking identity information: current identity value 'NULL', current column value '64'.

    Versus This

    Checking identity information: current identity value '1035637357', current column value '1035637357'.

    Is that Okay?

  • The values should match.

    Checking identity information: current identity value '1035637357', current column value '1035637357'. Is okay becauses it matches.

    Null does not match 64. So I would reseed this table.

    -Adam

  • Yes, I did and I'm still seing the same thing.

  • I hate to say this - but (and I don't know HOW you would have this) are there NULLs in your identity field? It's not supposed to be possible, but CHECKIDENT sure thinks that you do....

    Now - if you were just getting both values being reported as 'Null' - that's a sign that your table is empty after a TRUNCATE operation. But the disconnect on null/64 - that's not great.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 7 posts - 1 through 6 (of 6 total)

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