SqlException: Arithmetic overflow error converting IDENTITY to data type int
Hi Joel Weber,
Greetings!!
The error you’re seeing (“Arithmetic overflow error converting IDENTITY to data type int”) means that the system has reached the limit of the ID column, which is currently set as an INT type.
Even if it looks like the data isn’t near the maximum, it’s likely that the internal identity counter has gone beyond the INT limit (which is about 2.1 billion), possibly due to manual inserts or reseeding.
We recommend one of the following solutions:
- Switch the column to a BIGINT, which can handle much larger values.
- Reseed the identity if appropriate and the current data allows it.
- This will prevent the overflow and allow new records to be inserted normally.
Reference document:
learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkident-transact-sql?view=sql-server-ver17
I hope this information helps. Please do let us know if you have any further queries.
Read more here: Source link
