How to Suspend or Kill or Resume an Integration Job
Did you kick off an integration job (integration batch) and now want to kill the job? Is the execution engine showing a job is suspended and now you want to kill it?
Watch this video for instructions on how to suspend and/or kill an integration job.
NOTE: This is not for load jobs. This is only for integration jobs.
- Open the Execution Engine. You should see your suspended job highlighted in red.
- Right-click the suspended queue. Click on Cancel Job
- You should see the integration job is now canceled and the status should be set back to READY.
Attempt to cancel the integration job using the UI first before you try the methods below. Only use the SQL updates if absolutely necessary or if the Semarchy support team asks you to.
NOTE: READ THIS!!! You should not kill an integration job with SQL unless it is the worst-case scenario. The SQL below is only for if the job hasn’t been running for days or weeks and you need to force Semarchy to update the integration job status.
How to cancel jobs with a direct SQL update (not using the Workbench UI)
NOTE: Only use the SQL updates if you have already tried canceling the integration job using the UI following the instructions above or if you have been directed by Semarchy support.
- Confirm the list of running integration loads in the repository, using the following query. Note the Batch ID number that you want to cancel.
select * from MTA_INTEG_BATCH where status = 'RUNNING';
- Update the Integration Batch table (MTA_INTEG_BATCH) to cancel this integration job
Be sure to update the BATCHID to use the Batch ID number in step #1
update DEV4_REPO.MTA_INTEG_BATCH set status = 'ERROR' where BATCHID = 4170 ;
How to cancel a stuck job where the top level job has the status of error, but there is a rogue sub-step running
- Find the integration job in the repository, using the following query. Note the R_JOBINSTANCE ID, e.g. A1A5AE26089143FFBB91E27A177F6F5F.
select * from MTA_INTEG_BATCH where status = 'RUNNING';
Update the Job Log table (MTA_JOB_LOG) to cancel this sub-step.
update dev4_repo.mta_job_log set status = 'ERROR' where r_jobinstance = 'A1A5AE26089143FFBB91E27A177F6F5F' and status = 'RUNNING' ;
How to cancel all jobs in a queue
Run the following SQL script with the appropriate data location and queue names, then restart the Execution Engine to flush queued jobs memory.
update (select b.status from MTA_INTEG_BATCH b inner join mta_data_location d on b.o_datalocation = d.UUID where b.status in ( 'SCHEDULED' , 'PENDING' ) and d.name = '<your_datalocation_name>' and b.job_queue_name = '<your_queue_name>') t set t.status ='DONE';
More important information about killing, suspending or resuming jobs:
Q: What is correct procedure to stop and purge jobs? Is killing Tomcat processes the only way?
A: When you stop tomcat, the engine that executes the jobs is stopped as well, because it's part of the application.
Q: Is there any way to “resume” a load?
A: The default behaviour is to restart a hung/suspended job where it was hung, so you don't have anything to do to resume the load. If you happen to get an Oracle error or if you choose to suspend, then you can restart a job.
Q: How do I interact with a running job to cancel it?
A: The only possible interactions with a running job are found in the administration console --> Execution Engine perspective.
Q: How do I cancel everything – kill all jobs/tasks (as a last resort)? Especially because I submitted over 100 jobs in the queue and they are all blocked from running.
A: You can only stop the currently running job in the queue. The following "scheduled" jobs will stay in the queue, ready to be processed as soon as the queue is restarted.
A: This is not possible.
A: This is the default behavior. A suspended job can be canceled or restarted / resumed.
A: Each queue has its own status. Read our support docs to find more information.
A: Stop tomcat. Start tomcat. Restarting tomcat is the last resort but it will work effectively to get the execution engine going again. Make sure you don't have other users using xDM when you restart Tomcat or else you''ll boot them off.