Symptoms
After importing data from Office 365, the import “writers” process fails with logging similar to the following:
2018-08-31 00:33:35,559 [INFO ] Failed to execute Writer 'Create license allocations from ImportedSoftwareLicenseAllocations' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\LicenseCreateUpdate.xml Error: Violation of UNIQUE KEY constraint 'UQ_SoftwareLicenseAllocation'. Cannot insert duplicate key in object 'dbo.SoftwareLicenseAllocation_MT'. The duplicate key value is (293, <NULL>, 8391, <NULL>, <NULL>, <NULL>, <NULL>). The statement has been terminated. Added 0 new user allocation(s) from the source database connections.
Cause
This issue can be caused by the query logic used in the “Create license allocations from ImportedSoftwareLicenseAllocations” procedure being unable to handle a situation where a user record is linked to multiple imported user details.
Mitigation
- Make a backup copy of the following file on the batch server: C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\LicenseCreateUpdate.xml.
- Edit the LicenseCreateUpdate.xml file in a text editor, and locate the “Create license allocations from ImportedSoftwareLicenseAllocations” writer in that file.
- Add the “DISTINCT” keyword to the line “SELECT sl.SoftwareLicenseID” as shown towards the end of the following extract:
<Writer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Create license allocations from ImportedSoftwareLicenseAllocations" Order="1180" Retries="1"> <![CDATA[ INSERT INTO dbo.SoftwareLicenseAllocation ( SoftwareLicenseID, ComplianceUserID, NumberAllocated, SoftwareLicenseAllocationStatusID ) SELECT DISTINCT sl.SoftwareLicenseID, cu.ComplianceUserID, 1, 3 -- Permanent FROM dbo.ImportedSoftwareLicenseAllocation isla
Additional notes
This particular issue has been fixed in FlexNet Manager Suite releases noted in the “Fix status” section. There may be other root causes that result in similar symptoms affecting more recent FlexNet Manager Suite releases. See the following article for details: Known Issue: "Create license allocations from ImportedSoftwareLicenseAllocations" import step may fail with error: Violation of UNIQUE KEY constraint 'UQ_SoftwareLicenseAllocation'. Cannot insert duplicate key in object 'dbo.SoftwareLicenseAllocation_MT'. (IOK-931590)
Fix status
This issue has been fixed in the following FlexNet Manager Suite releases: 2017 R2 (On Premises), 2017 R2 / Aug 2017 (Cloud)
Other information
Affected components: Inventory import (read/write/export)
Master issue ID: IOJ-1818616
Also known as: FNMS-44380
Related Articles
Known Issue: “Create license allocations from ImportedSoftwareLicenseAllocations” import step may fail with error: Violati… 5Number of Views "Create license allocations from ImportedSoftwareLicenseAllocations" import step may fail with error: Violation of UNIQUE … 6Number of Views Known Issue: “WriteFileEvidence - Insert unmatched evidence” import writer step may fail with error due to NewFileEvidence… 65Number of Views AddVDIGroups inventory import step may fail with error when importing data from multiple VMware Horizon connections that h… 4Number of Views Import writer phase may fail with error on WriteContainerData step: "Violation of UNIQUE KEY constraint 'IX_ContainerInsta… 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago