Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Identify and Stop stored proc from running

$
0
0

SQL 2005 & 2008

We have several servers where, using the sp_procoption system stored procedure, we've enabled and started the execution of a user stored procedure. While I'm aware of how to disable the startup of the user stored procedure, my question, in two-parts is: (i) How do I identify, using T-SQL, what stored procedures are currently running?, and (ii) How do I stop any one particular running stored procedure?

Another question: assuming a server list with the server name is created and stored in a table. Is there a way, again using T-SQL, to cycle through each server from that list (say, using a cursor) to connect to the server and run a series of commands?

Thanks.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>