When automated systems go wrong you may need to cancel a backlog of pending or running Orchestrator jobs directly with SQL.
For reference, the StatusId field from Orchestrator’s Job table provides the current status of the job. These numeric represent:
0 = Pending
1 = Running
2 = Failed
3 = Cancelled
4 = Completed
The script may be run directly with SQL Management Studio.