Best method to call a long stored proc with WCF

  • Thread starter Thread starter Cindy Lee
  • Start date Start date
C

Cindy Lee

Say have a stored procedure that takes about 10min to 1 hour to run
and I need to call it with WCF (silverlight).

I'd basically want to fire off the query, have the wcf service fire
off the query in a thread or something. Then have the wcf return to
the silverlight program and say 'Ok the SP is running'

The silverlight app would then make some wcf calls that would count
the rows in table x, to see what the progress is. Or the SP could
update another table with the status. Could the WCF service just call
a thread return 'OK running', and still have the SP running on the
database? I don't want to keep the connection open for 10 min to 1
hour.

I'm a little shy about making a synchronis WCF service that will post
back to the silverlight wcf client. Would that be easy to do, it
sounds a lot more complicated.
 
Say have a stored procedure that takes about 10min to 1 hour to run
and I need to call it with WCF (silverlight).

I'd basically want to fire off the query, have the wcf service fire
off the query in a thread or something.  Then have the wcf return to
the silverlight program and say 'Ok the SP is running'

The silverlight app would then make some wcf calls that would count
the rows in table x, to see what the progress is.  Or the SP could
update another table with the status.  Could the WCF service just call
a thread return 'OK running', and still have the SP running on the
database?  I don't want to keep the connection open for 10 min to 1
hour.

I'm a little shy about making a synchronis WCF service that will post
back to the silverlight wcf client.  Would that be easy to do, it
sounds a lot more complicated.

Maybe I need to use a sql server agent and use sp_start_job to fire
it off.
 
Maybe I need to use a sql server agent and use sp_start_job  to fire
it off.- Hide quoted text -

- Show quoted text -

Thing is I'd rather not use sql server agent, and I think if I break
connection to the WCF Service it will stop the stored procedure from
running.
 
Back
Top