SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Idera SQL Check

Using the KILL Statement

Perhaps it's not named in a politically correct way, but KILL is the command we use in TSQL to end the work on a connection. Interestingly there are spids we cannot kill, and spids that even though we kill may take some time to rollback, and even restarting the service won't make it get done any sooner. We tend to think of KILL in the context of blocking, but it happen in simpler scenarios such as when you want to detach a database and someone has a connection open, even if it's doing no work.

Duration:
3 mins 25 secs
Skill Level:
100
Rating:
4.35 out of 5
Publish Date:
January 23, 2011
Using the KILL Statement You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References



Comments
Steve Harris on 1/24/2011
what are some of the other ways a process can be stopped

Derek on 1/24/2011
Good. Thanks!

Frank on 1/24/2011
Short and to the point. No unnecessary filling.

good information

manjeet on 1/24/2011
good one

Russell Tye on 1/25/2011
That was good, but I use a script, namely a cursor, to kill all spids in a particular database.

Maurice Ivory on 2/11/2011
I think I would need more training on Spids in order to fully understand the benefit of Kill 58 statement.

ravi on 4/17/2011
nice

sanjay on 6/8/2011
Great

ranga rao on 7/15/2011
Useful. Perhaps the script to loop thru all the spids for a db and kill all of them to change status of db would be nice to show.

mahaboob on 2/14/2012
very good video to use kill thank you



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions