This script kills all the user sessions except its own.
This T-SQL block can be converted into a stored procedure by adding following lines in the begining of the script -
Create Proc Kill_Sessions
SQL Blocking and Blocked Proc + Notifi - Part2
Based on the script by Paul Delmarche ( http://www.sqlservercentral.com/scripts/contributions/1482.asp ).Updated to now include the spid, username, blocked and blocking SQL statements in the email (still logged to table).Schedule the procedure to run at defined intervals (I use 2 minutes)
2005-05-12 (first published: 2005-05-02)