Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Running stored procedures in parallel

Author  Topic 

cindi
Starting Member

3 Posts

Posted - 2008-11-11 : 04:34:41
I want to do something like:

exec sproc1 and sproc2 at the same time
when they are both finished exec sproc3

I can do this in dts. Is there a way to do it in transact sql? Or is there a way to do it with a batch script (eg vbs or powershell)?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-11-11 : 05:02:02
nope.
what you'll have to do is have an App with 2 connections that each executes one sproc. when both finish run the 3rd sproc from your app.
there's no way to do this directly in t-sql.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-11-11 : 06:18:45
All you can do is to hand-build in some trigger table, which proc3 scans on a loop. if proc3 finds records written by both proc1 + proc2 then it proceeds to execute, otherwise it goes back to sleep.

you will have to manage clearing the history records written by proc1+proc2, and also how cpu intensive proc3 is at "sleeping", yourself.
Go to Top of Page
   

- Advertisement -