

This is one of my favorite SQL Server courses on Udemy and it covers all the fundamental concepts a programmer or a DBA needs to know about SQL Server.Īnyway, let's turn back our focus on how to solve this problem.

Such knowledge goes a long way in debugging and troubleshooting this kind of problem in production. Similarly, you will get "Arithmetic overflow error converting IDENTITY to data type tinyint" if IDENTITY has grown beyond 255, the maximum value of tinyint data type in SQL Server.ītw, if you are not familiar with the range of basic data types in SQL Server, I strongly suggest you go through a course like Microsoft SQL Server For Beginners to learn fundamentals.

For example, you will get "Arithmetic overflow error converting IDENTITY to data type smallint" if the identity value crosses 32,767 which is the maximum value for smallint in SQL Server. The error is more common with columns using smaller datatypes like SMALLINT, TINYINT, and INT and uses the IDENTITY feature to automatically generate values. For example, if the current value of Identity becomes more than 2,147,483,647, then you cannot store that into an int column because it's more than the maximum value of int in SQL Server. The error "Arithmetic overflow error converting IDENTITY to data type int" comes when the IDENTITY value is inserted into a column of data type int, but the value is out-of-range. The reason was dreaded "Arithmetic overflow error converting IDENTITY to data type int" because the table was using IDENTITY feature of SQL Server to generate OrderId, and Identity has breached it a maximum value, which is around 2.1 billion, precisely 2,147,483,647. Last year we had a production issue where one of our backup jobs was failing while inserting Orders aggregated from other systems into our SQL Server database.
