EM to DM Replication Problem for Custom Created Software Signature

Document ID : KB000098356
Last Modified Date : 01/06/2018
Show Technical Document Details
Issue:

Some custom softwares created at Enterprise level are not replicated to the Domains.

Following error appears in the Engine logs :
 
2018-06-01 21:50:07 Download - Replication Job Done. Warning: though the job was completed, an error occurred: A database constraint violation error occurred for table: ca_software_def. Please examine the log file for more details

ERROR  | cReplicationJob::DoTableUpdateInsertRow failed to execture db command pointer

ERROR  | GetActionOnError: MS SQL dbErrCat=-3, dbDetailedError=-6, errorInfo=ADO Version 6.3 - ExecuteCommandPointer  -COM Error: ErrorCode:-2147217873,WordErrorCode:3119, IDispatch error #3119, The INSERT statement conflicted with the FOREIGN KEY constraint "$ca_so_r000004cf00000000". The conflict occurred in database "mdb", table "dbo.ca_company", column 'company_uuid'., Microsoft SQL Server Native Client 11.0, (null)

ERROR  | SetIntermediateStatus2: Download: A database constraint violation error occurred for table: ca_software_def

ERROR  | DoTableUpdate - DB Constraint violated, record marked for later replication rc=[0] sql=[insert into ca_software_def (sw_def_uuid,name,sw_version_label,language,creation_user,creation_date,last_update_user,last_update_date,sw_version_number,replication_flag,software_type_id,source_type_id,description,manufacturer_uuid,bit_support_id,chip_set_id,domain_uuid,impact,severity,is_active,no_longer_available,family_sw_def_uuid,lang_code,class_id,linear_sequence_number,filter_from_view,drcs_content_type_id,requires_review,unsealed) values (?,?,?,?,?,1527882427,?,1527882427,'00001000000000000000',NULL,3,2,?,?,?,?,?,NULL,NULL,1,NULL,?,?,NULL,NULL,0,0,NULL,NULL)]


 
Cause:

This problem occurs if the custom Software is linked to a manufacturer of type "Heuristic'

Example :
This custom created release is linked to Manufacturer 'VideoLAN'
User-added image
 
But VideoLAN is a heuristic Manufacturer
User-added image


As heuristic manufacturer is not replicated from Enterprise to Domains, the replication of this release is not possible and gives an error.

 
Resolution:

This SQL Query could be executed in Microsoft SQL Server Management Studio to find the custom Software products and releases linked to a heuristic Manufacturer :
 
use mdb

SELECT name, sw_version_label, company_name, 
CASE d.software_type_id
  WHEN 3 THEN 'Product'
  WHEN 8 THEN 'Release'
END 'Software Type'
FROM ca_software_def d, ca_company c 
WHERE d.domain_uuid=(SELECT domain_uuid FROM ca_n_tier WHERE domain_type=1) 
and (d.source_type_id=2 or d.source_type_id=6 and d.software_type_id in (17,18)) 
and d.manufacturer_uuid=c.company_uuid and c.source_type_id=3

 
 
User-added image

With the list returned by this query, update the manufacturer of product or relase in DSM GUI to a another non heuristic manufacturer