Below is a little script to kill all the processes which are currently connected to your SQL Server database. I’m posting this mostly for myself for future reference. The preferable way to do this is to use the alter database set single_user thing, but that doesn’t always work, so this is the “drastic measure” option.
