[thelist] Stopping Stored Procedure execution in MS SQL

Anthony Baratta anthony at baratta.com
Tue Jan 22 11:28:11 CST 2008


Do you have MS SQL Studio Manager?

Open a Query Windows and type:

exec sp_who

This will list all the users and what they are doing. You should see your SP in the CMD Column. Then you can use the spid with the kill command to nuke that session.

kill 3847

Use carefully. You can't kill your own session, you might need to open another instance of MS SQL Studio Manager and login, then kill the other session.

-----Original message-----
From: "Eduardo Kienetz" eduardok at gmail.com
Date: Tue, 22 Jan 2008 06:55:16 -0800
To: "thelist at lists.evolt.org" thelist at lists.evolt.org
Subject: [thelist] Stopping Stored Procedure execution in MS SQL

> Suppose I ran an stored procedure that is taking forever to finish...
> how could I tell Microsoft SQL Server to stop it? I mean, identify it
> (unique identifier) and then stop that one. Or, at least, see the
> execution progress.
> I'm using SQL Express 2005, I have searched MSDN, google, etc, but no
> luck with that specifically.
> 
> Thank you in advance,
> 
> -- 
> Eduardo Bacchi Kienetz
> http://www.noticiaslinux.com.br/eduardo/
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 



More information about the thelist mailing list