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.
| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-09-04 : 18:09:09
|
| I have a web page that will call a stored procedure. I'd like to return immediately to the user and have the procedure run in background. Results of the procedure will be stored in a table. No return value for the user is needed.Is there a way to submit a procedure to run autonomously?SamC |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-09-04 : 18:14:19
|
| Create a job that executes that procedure and then run the job using sp_start_job from your ASP page. |
 |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2002-09-07 : 13:09:07
|
| Sp_start_job will work although a user who can execute this procedure and is a member of the sysadmin fixed role can start any job. A user who is not a member of the sysadmin role can use sp_start_job to start only the jobs he/she owns. In large corporate environments this is typically not the case. Also, calling this SP, via sp_start_job, directly from ASP could potentially cause problems if a user reloads the page multiple times.I feel this method would require alot of unnecessary error checking.An alternative might be to send a request message to MSMQ via ASP (this is an async alternative to sp_start_job and would allow better control and security of job or SP executiuon)If this interests you, check out http://www.sqlservercentral.com/products/xp_msmq/ for a pre-built MSMQ extended procedure which could be used for this solution as a listener on the queue. |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-09-08 : 04:46:27
|
| Why not call the asp through a hidden frame???? |
 |
|
|
|
|
|