April 15, 2014

I was trying to kill all spid that points my database but I kept getting the error message "Cannot Use Kill to kill your own Process". The error message was a bit strange as I have done this a number of times without any issues. So, basically this is what I tried.

  1. sp_who;
  2.  
  3. --got 53 as the spid I wanted to kill
  4. kill 53;


After some trial and error, I figured that Sql Server Management Studio was pointing to the database I was trying to kill instead of "master". I changed the selected back to "master", re-ran "sp_who" and "kill" process and it worked perfectly.

image

0 comments:

Reference: Shahed Kazi at AspNetify.com