On FlexNet Manager Suite systems where a large volume of unique filenames have been imported, the “WriteFileEvidence - Insert unmatched evidence” inventory writer step may fail due to the FileEvidenceFileID identity column in the FileEvidenceFile table in the compliance database growing too large and running out of available values.
When this issue occurs, inventory imports are likely to fail with an error similar to the following:
2019-11-15 06:57:00,735 [INFO ] WriteFileEvidence - Insert unmatched evidence
2019-11-15 07:00:24,730 [INFO ] Failed to execute Writer 'WriteFileEvidence - Insert unmatched evidence' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\\Writer\FileEvidence.xml, at step line 108
Error: Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred.
The following SQL query can be executed against the compliance database to identify the current identity value in the FileEvidenceFile table:
SELECT IDENT_CURRENT('dbo.FileEvidenceFile') AS CurrentIdentity
This issue is likely to occur if the value returned by this query is at or near 2,147,483,647 (being the maximum value that can be stored in a SQL Server INT value).
This issue may be mitigated by executing the following SQL query against the compliance database to reseed the FileEvidenceFile table to use negative identity values:
Note that this mitigation can only be done once. If this mitigation has been previously applied and the database has continued to grow such that all negative identity values have been subsequently used then imports are likely to start to fail again.