How to Kill Active Connections to SQL Server database

Posted by & filed under SQL Server.

ALTER DATABASE databasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE

ALTER DATABASE databasename SET MULTI_USER