Summary
The “writer” phase of the inventory import process may fail with an error message like the following:
2021-10-24 19:12:29,746 [INFO ] WriteComputers - Insert new computers 2021-10-24 19:12:56,731 [INFO ] Failed to execute Writer 'WriteComputers - Insert new computers' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\Computer.xml, at step line 544 Error: The DELETE statement conflicted with the REFERENCE constraint "CloudServiceApplicationWithByol_ComplianceComputer". The conflict occurred in database "FNMSCompliance", table "dbo.CloudServiceApplicationWithByol_MT", column 'ComplianceComputerID'. Synchronized 0 row(s) of table 'ComplianceComputerPerOperator_PC' (234 ms) Synchronized 0 row(s) of table 'ComplianceComputerPerOperator_PC' (94 ms) The statement has been terminated.
Details
This error occurs due to a logic error related to removing inventory device records in the database that have a status of “awaiting inventory” when they need to be replaced with an active inventory device record.
If the following query returns any results when executed against the compliance database then the current state of data is liable to trigger this issue to occur:
SELECT * FROM dbo.ComplianceComputer cc JOIN dbo.CloudServiceApplicationWithByol csab ON csab.ComplianceComputerID = cc.ComplianceComputerID wHERE cc.ComplianceComputerStatusID = 4 /* awaiting inventory */
Mitigation
When this issue occurs, the following SQL statements can be executed against the compliance database to clean up problematic data.
UPDATE csi SET HostComplianceComputerID = NULL FROM dbo.CloudServiceInstance_MT csi INNER JOIN ComplianceComputer d ON d.ComplianceComputerID = csi.HostComplianceComputerID WHERE d.ComplianceComputerStatusID = 4 UPDATE csi SET ComplianceComputerID = NULL, MatchingRuleID = NULL, InventoryDate = NULL FROM dbo.CloudServiceInstance_MT csi INNER JOIN ComplianceComputer d ON d.ComplianceComputerID = csi.ComplianceComputerID WHERE d.ComplianceComputerStatusID in = 4 UPDATE csab SET ComplianceComputerID = NULL, SoftwareTitleID = NULL, CloudLicenseTypeID = NULL, Overridden = 0 FROM dbo.CloudServiceApplicationWithByol_MT csab INNER JOIN ComplianceComputer d ON d.ComplianceComputerID = csab.ComplianceComputerID WHERE d.ComplianceComputerStatusID = 4
Be aware that this is only a temporary mitigation, as new problematic data may arise and cause future imports to fail in the same way - in which case these statements can be re-executed.
Fix status
This issue has been fixed in the following FlexNet Manager Suite releases: 2022 R1.5 / Aug 2022 (Cloud), 2022 R2 (On Premises)
Other information
Affected components: Inventory import (read/write/export)
Master issue ID: IOJ-2228768
Also known as: FNML-74620
Related Articles
Import may fail at step "WriteComputers - Insert new computers" with error: The DELETE statement conflicted with the REFER… 4Number of Views RemoveMissingComputersAndAssociatedProperties import writer step may fail with error - 'The DELETE statement conflicted wi… 4Number of Views ApplicationDeletion import writer step may fail with error: DELETE statement conflicted with the SAME TABLE REFERENCE cons… 4Number of Views RemoveMissingComputers writer may fail with error: The DELETE statement conflicted with the REFERENCE constraint "FK_Virtu… 4Number of Views Import step "WriteComputers - Insert new computers" may fail with error "Violation of UNIQUE KEY constraint 'UQ_MemberEx'"… 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