Re: How to do async execution

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: David Gugick (davidg-nospam_at_imceda.com)
Date: 10/07/04


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


Relevant Pages

  • RE: Second request! Select two records from same table, autopopulate f
    ... If so you can use two separate combo boxes and set up a query ... Clients, Jobs, and Real Estate ... use a dropdown list to look up TWO separate Real Estate agents (one for the ... I can write the autolookup query for the form if using just one record from ...
    (microsoft.public.access.forms)
  • Re: Britain for the British
    ... They're taking jobs away ... Then we can kick all those from the north/south/east/west of England ... jobs away from true Londoners! ... NuLav and Tory contempt for honesty and integrity is ...
    (uk.politics.misc)
  • Re: Anyway to Run Code Not Associated with Loading a Page?
    ... Basically your application puts a "Job Ticket" into MSMQ and Windows Service application that monitors this queue picks it up and processes. ... The benefits are that this approach is very scalable, and you can have separate boxes for Web Server and your processing application. ... And the only option you have to "timer" your jobs is to use Cashe object. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OT: Looks Like Im Voting For A Demmy.....
    ... kick those who are already here out of the country. ... And do you really want to live in a country that would do what is ... taking jobs away from Americans, they're primarily doing jobs that no ... There are no jobs americans refuse to do. ...
    (alt.sports.football.pro.ne-patriots)
  • Re: Web Application/Service for executing long running tasks
    ... >> Can someone point me to a code sample that illustrates executing long>> running tasks from a web application in ASP.NET? ... >> the web application kick off the generation of all the jobs and then>> receive ...
    (microsoft.public.dotnet.framework.aspnet)