Often DBAs need to delete old databases. As soon as I receive a list of databases that can be deleted the first thing I would check is if there are any active connections to the databases and know the spids of the active connections and notify the appropriate user about the database. Active connections will not let us delete a database quickly. They can be identified by running queries against the sql server system table sys.sysprocesses. Below is one such query that will help us identify active connections to a database:
SELECT * FROM sys.sysprocesses WHERE dbid = DB_ID('Databasename')
If you identify any active connections and get confirmation to kill those spid’s then just execute:
After killing the appropriate spid try deleting the database and it will get deleted quickly.
Hope this helps!