You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SQL Server Agent单步骤作业中多个存储过程调用是并行还是串行执行?

你的存储过程调用是串行执行的

Hey there, let’s get straight to the point: those four exec calls in your single SQL Server Agent job step run one after another—completely sequentially, not in parallel.

Here’s why that’s the case, and how it ties to your temp table scenario:

  • SQL Server executes statements in a single batch (which is exactly what your job step’s command window content is) in the order they’re written. The first exec fb_GetDateSource will run to completion, fully populating your temp table, before the server even starts executing the first fb_DeliverFile call.
  • Each subsequent fb_DeliverFile will also finish entirely before the next one begins. Since all these calls are in the same session, the temp table created by the first proc is accessible to the ones that follow—this wouldn’t work reliably if they ran in parallel, because the temp table might not be ready when the later procs tried to use it.

If you ever wanted to run these procs in parallel (though it doesn’t make sense here given the temp table dependency), you’d need to split them into separate job steps configured to run in parallel, or use more advanced methods like Service Broker or asynchronous CLR procedures. But for your current setup, it’s strictly serial execution.

内容的提问来源于stack exchange,提问作者LarryG

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:24:43