Kill All Active Connections To A Database
To kill all the connections to your database you can use the ALTER DATABASE command. Sometimes you want to restore the database from a backup but can't because people are connected. Here is one way which will kick off all the users immediately
TSQLLINE NUMBER OFF | HIDE | SELECT