Max INT Identity Value Reached (DBCC CheckIdent)
One of my colleagues shared the following experience.
Recently, the identity column on one of his tables reached the maximum value allowable for an INT data type (2,147,483,647). Obviously, this caused all sorts of errors, as the application was unable to insert records into the table. This is a customer-facing table, so the issue needed to be resolved quickly. Converting the column to a BIGINT would require a significant amount of down-time. The solution? Reseed the identity column to -2,147,483,648 and have the values count upward toward zero. This took only seconds and the app was back up immediately. This is, of course, a temporary solution; it allows the team to schedule a more convenient time to resolve the issue.
Here’s how to do this:
DBCC CHECKIDENT ('tableName', RESEED, -2147483648);
Thanks, Peter, for sharing this tip!
Comments
2 Comments on Max INT Identity Value Reached (DBCC CheckIdent)
-
anonymous on
Wed, 12th Nov 2008 3:52 pm
-
Michelle Ufford on
Wed, 12th Nov 2008 3:57 pm
Actually, that would be “count upward toward zero”
You’re absolutely correct! Thanks for pointing that out, I’ll update the blog post now.
Tell me what you're thinking...
and oh, if you've enjoyed the post, please consider subscribing to my blog. ![]()





