A simple cursor to kill all process connections in one database. It reads sp_who into a temp table and runs KILL for each spid. Run it from another database.
SQL SERVER – Simple Cursor to Select Tables in Database with Static Prefix and Date Created
A simple cursor to select tables in a database by a static prefix like b_ or delete_ and by date created, so you can drop, print or index old tables.


