Archive for the ‘SQL’ Category

Beware: Identity value can reach maximum value

March 5, 2010

Yesterday we were notified that our client could not logged into the Admin Console because of some Exception. That caused them to lose almost a whole day of work. After coming to office early in the morning, I checked at the log and found that the exception was because the IDENTITY value we were using for one of the table reached its maximum value – 32676 for type SMALLINT. I just converted the type to INT and the problem was resolved.

This was technically a very small problem but it caused the client to lose half a day of work. We learned that we should be checking these values continuously in other tables in our database to make sure that we don’t run into similar cases. There are scripts to do this as well. There should be other ways to automatically reseed these values or truncate the data by using triggers once it reaches the maximum value.

Just wanted to make every one cautious that a small glitch like this can cause loss of work, bring server down and harm client relation.


Design a site like this with WordPress.com
Get started