dbTalk Databases Forums  

Re: Cancel Stored Procedure execution

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Cancel Stored Procedure execution in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew John
 
Posts: n/a

Default Re: Cancel Stored Procedure execution - 11-06-2003 , 12:59 AM






Lenny,

sp_who, followed by exec kill.

( run in a separate connnection for obvious reasons ).

Did you need to multipost so much? Both .server and .programming newsgroups
are widely read, and so would be enough by themselves.
Which is why I'm being mean, and only giving you the commands rather than
a complete stored proc

Regards
AJ

"Lenny" <sayno (AT) tospam (DOT) com> wrote

Quote:
Hello,

Is there a way to stop stored procedure execution upon user requests.
A stored procedure is called from APS.NET page. Actually a new thread is
started that calls sp, the page is then reloaded every 5 seconds and
progress bar is displayed. Usually it takes a few seconds to 10 mins to
execute due to the task-intensive nature of the process.

Users want to be able to click cancel button to stop a process. How can
client app notify SQL Server to kill specific sp?

I anticipate people replying that we should really optimize queries in sp.
However, Almost always SP must do full table scans and lots of inserts. SP
has been optimized already. We just need functionality to cancel sp from the
browser.

Please help.

Thank you!





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.