I want to drop my DB and close all connections before it
When I try to do it I receive this message:
Cannot drop database "DBName" because it is currently in use.
Close all active connections:
ALTER DATABASE <DBName> set single_user with rollback immediate
Drop your database:
DROP DATABASE <DBName>
FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.
Boost your productivity with FavScripts.com!