Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?



Thats the best solution i have heard yet and ive been looking around
all day trying to figure this out. thanks! i can execute a simple SP
to store the params and then run the other to kick off the job.
David Browne wrote:
<amy.yerks@xxxxxxxxx> wrote in message
news:1159551250.404701.243660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a small ASP.NET 2.0 application that needs to be able to kick
off a long stored procedure (for importing and processing tables ) and
then allow the user to continue with the session, perform other tasks,
and log out without having to wait for the SP to complete. I read the
following article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/async2.asp

This looks very promising but I could not figure out what would happen
to the thread if the user logged out before it completed. The stored
procedure could take several hours depending on the parameters selected
so I need the command to be independant of the web Session. Will it
keep running or die when the user logs out? If it dies, can anyone
suggest a way to set it up so it will run until complete?


Several hours is way too long for Asyncronous Commands or background
threads. If nothing else, the applciation may bounce in that time, in which
case the database server will abort the batch.

If this is SQL Server, perhaps you can set up a SQL Agent job and kick it
off with the sp_start_job stored procedure. The user can check the status
periodically, but the execution won't depend on the web server or the user
hanging around that long.

David

.



Relevant Pages

  • How can I find out information about process based on spid?
    ... sometimes I cannot connect to the server using enterprise ... execute sp_who2 from query analyzer... ... This stored procedure provides me with the list of spids ...
    (microsoft.public.sqlserver.server)
  • DTS Data Transform Problem
    ... I try to import data from a stored procedure on another server. ... execute de SP and get results but when I try to make it work in a Data ... Regards! ...
    (microsoft.public.sqlserver.dts)
  • Re: Calling remote Stored Procedures
    ... I assume you have already created linked server. ... > When I try to execute the Stored Procedure 'Ten Most Expensive ... > Could not execute procedure 'Ten Most Expensive Products' on remote ...
    (microsoft.public.sqlserver.server)
  • RE: asp.net worker process grow tremendously
    ... Are you loading Excel on the server? ... > which will execute a MSSQL stored procedure to retrieve the data based on ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
    ... so I need the command to be independant of the web Session. ... If this is SQL Server, perhaps you can set up a SQL Agent job and kick it off with the sp_start_job stored procedure. ...
    (microsoft.public.dotnet.framework.adonet)

Loading