|
|
|
|
|
|
|
|
|
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
|
|
|
|
About the Author
|
|
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
|
|
|
Good. Thanks!
|
|
|
Short and to the point. No unnecessary filling.
|
|
|
good information
|
|
|
good one
|
|
|
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.
|
|
|
nice
|
|
|
Great
|
|
|
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.
|
|
|
very good video to use kill thank you
|
Must Be Logged In
|
|
|
|
|