Knowledge.ToString()

How Cancelling the DTEXEC (or Any Other Executable) From Command Prompt/Automic UC4 Works

When we start executing the SSIS package using DTEXEC from command prompt/Automic UC4, it creates an individual process DTEXEC which runs on its own. You can see that process in Task Manager. When you cancel the job from command prompt using Ctrl+C or cancel it  from Automic UC4, it sends the SIGINT (interruption) signal to DTEXEC. As per my experiment, DTEXEC will log “DTEXEC: Stopping the package execution” into the console but it will wait for the current step to complete. If the step takes longer (for example long running stored procedure), it will wait for the task to complete. As you can see in the image below, I pressed Ctrl+C as soon as the task started but the task was canceled once the step (execute long running Stored Procedure) was completed

DTEXEC interrpution log
DTEXEC interrpution log

Automic UC4

This situation causes an issue in Automic UC4 because the user interface will immediately report that the job is cancelled but the underlying job is still running. If the user tries to execute the same job again through UC4, it will spawn another instance of that job. If the job is hung, it will never complete and the orphan instance would reside within the server.

Best Practice

If you want to cancel the DTEXEC job from Automic UC4, cancel it from UI and then log into the server and make sure the DTEXEC is not running. If it is running, either wait for that process to gracefully terminate itself or kill it using Task Manager

Share

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *