cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

When running the Compliance Importer, the following error may occur.

Symptoms

When running the Compliance Importer, the following error may occur:
 

Failed to execute Reader 'ReadClusterGroups' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\managesoft\Cluster.xml

Error: Violation of PRIMARY KEY constraint 'PK__#Cluster__XXXXX'. Cannot insert duplicate key in object 'dbo.#ClusterGroup'. The duplicate key value is (xxxx, xxxxx, xxxxx, xxxxxx).

 

Cause

As the error suggests, the duplicate values to be inserted into table "ClusterGroup" has violated the primary key constraint.

Workaround

Add "DISTINCT" to the select query for reader "ReadClusters" in file "ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\managesoft\Cluster.xml".
 
So it becomes:
 

SELECT DISTINCT

NULL

AS ExternalID,

CAST(NULL AS nvarchar(256))

AS ExternalName,
....
 
Rather than:
 

SELECT

NULL

AS ExternalID,

CAST(NULL AS nvarchar(256))

AS ExternalName,
....
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎May 01, 2020 12:00 AM
Updated by: