Re: How to do async execution
From: David Gugick (davidg-nospam_at_imceda.com)
Date: 10/07/04
- Next message: biswa: "Re: SQL Server slows down every now and then"
- Previous message: David Gugick: "Re: When to use Stored Procedures!"
- In reply to: PeyoQuintero: "How to do async execution"
- Next in thread: Simo Sentissi: "Re: How to do async execution"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 7 Oct 2004 01:24:19 -0400
PeyoQuintero wrote:
> Is there any way to call several stored procedure asynchronously from
> within another SP ?
> I want to execute several SPs in paralle, calling them insidia a SP.
> Something like:
>
> stored proc sp1
> begin
> ....
> exec mySP1 (async)
>
> exec mySP2 (async)
>
> exec mySP3 (async)
>
>
> end
>
> so SP2 doesn;t have to wait unit SP1 finishes.
>
> Thanks.
Asynchronous operation is really the domain of the client library and
would normally require multiple connections to the server. You can kick
off three separate jobs from SQL Server Agent that would call the three
SPs. You could also kick off three separate tasks from Windows task
manager that start OSQL sessions.
You could define the jobs interactively inside a SP and kick them off
one after the other. Each job would use a separate connection and they
would run simultaneously. To do this, create the jobs from SQL
Enterprise Manager and then script them out to see the TSQL to use. I
think you can define the jobs to auto-delete once they are finished.
-- David Gugick Imceda Software www.imceda.com
- Next message: biswa: "Re: SQL Server slows down every now and then"
- Previous message: David Gugick: "Re: When to use Stored Procedures!"
- In reply to: PeyoQuintero: "How to do async execution"
- Next in thread: Simo Sentissi: "Re: How to do async execution"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|