How to cancel integration loads with direct SQL update

There is a public version of this guide here, How to Cancel Running Load Jobs, especially when blocking deploy model changes. Should this one be deleted?


When trying to deploy a model you might encounter this warning : "Integration load(s) still running for data location. Putting this data location in "Maintenance" mode will prevent them from being submitted as integration batches".

In development environment, these loads are usually the result of failed integration, or api tests...


The obvious workaround would be to use the maintenance mode, but if you don't want to waste time you might want to cancel these loads.

The clean way of doing it would be to use the CANCEL_LOAD function from the SQL API, but you may also use direct SQL update.

Step-by-step guide

  1. Confirm the list of running integration loads in the repository, using the following query

    select * from MTA_INTEG_LOAD where status = 'RUNNING' and classname='IntegrationLoad';
  2. Update these loads to cancel them

    update MTA_INTEG_LOAD set status = 'CANCELED' where status = 'RUNNING' and classname='IntegrationLoad';
    commit;
  3. You can now redeploy your application without using maintenance mode


Make sure you use the CANCELED status and not the FINISHED one, especially in version 4.3+

If you previously used direct SQL update on the MTA_INTEG_LOAD table and set statuses to FINISHED, you will run into this issue  MDM-7384 - Getting issue details... STATUS  (check the issue details for a workaround)