BSA: Resolving Referential Integrity errors during BSA Database Cleanup

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BladeLogic Server Automation Suite


    APPLIES TO:

    BMC BladeLogic Server Automation Suite



    PROBLEM:

     

    While running the recommended BSA database cleanup commands (typically cleanupDatabase or hardDeleteAllSharedObjects) you man see errors in the appserver logs or blcli command output indicated a constrain violation integrity error similar to the below:
     

      

    Oracle:

      
    The reference SUpdateServerPropertyJob.SUpdateServerPropertyJob could not be resolved. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (BLADELOGIC.FK458_JOB) violated - child record found Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (BLADELOGIC.FK674_JOB_RUN) violated - child record found Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (BLADELOGIC.FK499_JOB) violated - child record found
       

     

      

    SQL Server:

      
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "FK2403_JOB". The conflict occurred in database "BladeLogic", table "dbo.batch_job_job". Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "FK1_COMP_ENTRY_RESULT". The conflict occurred in database "bladelogic", table "dbo.comp_entry_result", column 'compliance_rule_result_id'. Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "FK1_RSLVDSYSPKCDC_JOB_RESULT". The conflict occurred in database "bladelogic", table "dbo.prov_job_rslvd_sys_pkg_cdc", column 'result_id'. Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "FK767_COMPONENT". The conflict occurred in database "bladelogic",
       

    The name of the constraint listed in the error message can vary greatly but the error message will always contain one of the following depending on the DB Type:

      
    Oracle: ORA-02292: integrity constraint violated SQL Server: The DELETE statement conflicted with the REFERENCE constraint
       

     

     


    SOLUTION:

    Review the Pulse Blog article on Referential Integrity Errors During BSA cleanupDatabase for a solution to resolve the problem. 

    If the article does not help to resolve the problem, open a ticket with BMC Support and include the entire error message from the appserver log that shows the constraint error.

     

     


    Article Number:

    000095648


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles