Start stored procedures sequentially or in parallel

后端 未结 4 1240
自闭症患者
自闭症患者 2021-02-03 11:12

We have a stored procedure that runs nightly that in turn kicks off a number of other procedures. Some of those procedures could logically be run in parallel with some of the o

4条回答
  •  庸人自扰
    2021-02-03 11:24

    You might want to look into using DTS (which can be run from the SQL Agent as a job). It will allow you pretty fine control over which stored procedures need to wait for others to finish and what can run in parallel. You can also run the DTS package as an EXE from your own scheduling software if needed.

    NOTE: You will need to create multiple copies of your connection objects to allow calls to run in parallel. Two calls using the same connection object will still block each other even if you don't explicitly put in a dependency.

提交回复
热议问题