Kill Connection and Drop SQL Server Database

It is important to kill database connection before dropping it. It is important because open conenction locks database and prevents it from being dropped. Here is simple SQL Statement that let you do just that.

USE master
GO
ALTER DATABASE [database-name]
SET OFFLINE WITH ROLLBACK IMMEDIATE
GO

DROP DATABASE [database-name]