Skip to content

Control Framework Stop Queue

Generates a SQL Server script that stops the DIRECT Framework data-logistics state-machine queue — the counterpart to the Start Queue template.

For controlled maintenance — applying a registration update, redeploying changed modules, or pausing data movement during a database upgrade — you want to stop the DIRECT queue jobs cleanly. This template emits a script that calls sp_stop_job for Queue_Batch and Queue_Module, but only if each job is currently active.

  • SQL Server family databases with SQL Server Agent enabled.
  • DIRECT Framework deployments only.

N/A — operational control.

  • All Metadata
  • SQL

The script targets msdb and checks sysjobactivity to determine whether each queue job is currently executing. Only running jobs are stopped — the script is safe to run unconditionally.

After the stop completes, in-flight modules will continue running to completion, but no new work will be dispatched until the queue is restarted.

  • Requires SQLAgentOperatorRole or higher on the deploying account.
  • In-flight modules complete normally — this is a graceful stop, not a kill.
  • Pair with Start Queue for the maintenance-window pattern.
  • If your DIRECT deployment renames the queue jobs, edit the generated SQL or the template to match.

N/A — the template is static SQL.