Sidebar

Error 'Arithmetic overflow error converting IDENTITY to data type int.' when saving logs.

0 votes
370 views
asked Aug 23, 2017 by ben-s-7515 (12,320 points)
Just recently getting these errors in our QIE log.  What is causing this, and how do we fix it.

1 Answer

0 votes
QIE originally used integers for the primary keys on the message and log tables.  This meant that you could only have 2.4 billion messages before you start to have problems.  This error is telling you that the primary key is greater than the max integer value and it can't save any more records.

To fix this problem, you have two options.  Both of these options will re-create the tables to use Longs intead of Integers for the primary key.  Once this is completed you will not have this error again.

1) Reset the database.
   - Export the QIE settings, or make sure that you have a full backup.  
   - Stop the service
   - Create a new QIE database
   - Re-configure QIE to use this new database
   - Start the service
   - Restore settings from backup

2) Migrate the database (Note: This option will migrate the database from the old database to a new one.  The migration process will allow you to specify the channels that you want to migrate the historical messages from, but this option does take a little longer than option 1).
   - Stop the QIE service
   - Create new QIE database
   - Re-configure QIE to use this new database
   - Start the service
   - Migrate messages from old database using migration tool at the bottom of the "System Config" page
answered Aug 23, 2017 by ben-s-7515 (12,320 points)
...