Is there any way in which you can stop a stored procedure from running. i.e. If any stored procedure has been running for over 1 min, timeout the stored procedure?????
Which version of SQL Server? Any stored procedure or a specific stored procedure? Are you looking for a server setting or a client command? Which client are you using?
There are several options ranging from CommandTimeout or QueryTimeout values, to SQLCancel, to the KILL SPID command. More detail would help us answer your question. Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
I am really looking for a server setting (SQL Server 7), something that will monitor the sproc and disconnect if it is running for longer than a minute. Within the sproc I am running a program from a cmdshell. This is part of the sproc that takes the longest and this is the action I want to cancel.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.