1 Reply Latest reply on Jul 20, 2016 11:41 AM by cwinning

    Help understanding this error message during database maintenance

    darelpeder Rookie
      Statement conflicted
        with constraint. SQL exception message: The DELETE statement conflicted with
        the REFERENCE constraint "FK_AgentAttachment_Agent". The conflict
        occurred in database "ShavlikProtect"  table "dbo.AgentAttachment"  column 'agentId'.
        • 1. Re: Help understanding this error message during database maintenance
          cwinning CommunityTeam

          Hello,

           

          The database maintenance is trying to remove historical agent data and the stored procedure isn't able to.  I've attached a SQL script that will update the stored procedure in your database.  This will allow the maintenance to run.

           

          1. Extract AgentDeleteHistorical.zip
          2. Open SQL Server Management Studio
          3. Connect to the database for Protect.
          4. Backup the database.
          5. Open AgentDeleteHistorical.sql into a query window.
          6. Read disclaimer at the top.
          7. Select the Protect database.
          8. Execute the script.
          9. Run the Database maintenance in Protect to verify it corrected the issue.

           

          Thanks,

          Charles