Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping a Stored Procedure From Running

Status
Not open for further replies.

elmo29

Programmer
Jul 28, 2000
50
0
0
GB
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.

Thanks

Elmo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top