Software license Consumption tab may fail to load with red bar error, and error in webui.log: "Violation of PRIMARY KEY constraint 'PK__#...'. Cannot insert duplicate key in object 'dbo.@InstallsAllocations'"
Summary
In FlexNet Manager Suite versions 2022 R2 to 2023 R2, a problem can occur that produces an error similar to the following in the Webui.log when attempting to view the Consumption tab of a license record in the web UI:
[ERROR 2023-08-18 10:39:10,647 39157783ms b.Core.UnhandledErrors] An unexpected error occurred (36e7a994-a336-4218-96aa-39a9c702e8b4) System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_#BC531FF_3214EC2776DBAAEC'. Cannot insert duplicate key in object 'dbo.@InstallsAllocations'. The duplicate key value is (xxxxxx).
An issue in the SQL database function dbo.Grid_LicenseComputerConsumptionListModelByLicense causes this error. It occurs due to an unexpected duplication of ComplianceComputerID field values within the dbo.ReconcileVirtualMachineLayer table.
Remediation
Follow the steps below to run the resolve the issue.
- Take a backup of the dbo.Grid_LicenseComputerConsumptionListModelByLicense function in your compliance database. This function can be found in SQL Server Management Studio under <Compliance database> > Programmability > Functions > Table-Valued Functions.
- Run the appropriate scripts for your affected version of FlexNet Manager Suite, attached to this article:
- ModifiedScript_2022R2.sql for FlexNet Manager Suite 2022 R2
- ModifiedScript_2023R1.sql for FlexNet Manager Suite 2023 R1
- ModifiedScript_2023R2.sql for FlexNet Manager Suite 2023 R2
Was this helpful?
© 2026 Flexera. All rights reserved.