Database Synchronization job - constraint violation error occurred for table ca_discovered_software
search cancel

Database Synchronization job - constraint violation error occurred for table ca_discovered_software

book

Article ID: 402275

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager

Issue/Introduction

Database Synchronization job generates some error like :
Warning: A database constraint violation error occurred for table: ca_discovered_software

2025-05-24 01:08:07 Table: ca_discovered_software (15 of 19), Update records to process: 443
2025-05-24 01:08:07 Warning: A database constraint violation error occurred for table: ca_discovered_software
2025-05-24 01:08:07 Table: ca_discovered_software (15 of 19), Records updated: 0, Elapsed time: 00:00:00

 

In TRC_<engine_name>*.log there are errors like :

240525-01:08:07.0960975L|002056|00001a00|SystemEngi|amLog           |                    |000000|ERROR  | BulkCopySoftwareSignature: Software Def (sw_def_uuid=<uuid>) not exists on Target -> constraint violation error, skipping replicating
240525-01:08:07.0961701L|002056|00001a00|SystemEngi|amLog           |                    |000000|ERROR  | SetIntermediateStatus2: Sync: A database constraint violation error occurred for table: ca_discovered_software
240525-01:08:07.0967406L|002056|00001a00|SystemEngi|amLogAndNotify  |cAmoLog.h           |000387|ERROR  | Warning: A database constraint violation error occurred for table: ca_discovered_software

Environment

Client Automation - All Versions

Cause

Some Software definitions defined in source mdb database (in table ca_software_def) are not present in target mdb database

Resolution

  1. On Target mdb execute following SQL Query on mdb database to find the domain uuid :

    SELECT set_val_uuid FROM ca_settings WHERE set_id=1


  2. Then execute this SQL Query on source mdb to force a full synchronization of ca_software_def
    UPDATE ca_synchronization_status
    SET extlstat=NULL
    WHERE synchronization_conf_uuid=
    (SELECT synchronization_conf_uuid FROM ca_synchronization_conf WHERE table_name='ca_discovered_software' and direction>0 and (where_clause='' OR where_clause is NULL)
    and domain_uuid=(select set_val_uuid from ca_settings where set_id=1) and enterprise_uuid=UUID_FOUND_IN_STEP1)

    Replace UUID_FOUND_IN_STEP1 by the domain uuid of target mdb

Additional Information

Remark :
This article is for Database Synchronization job and not for Enterprise replication job