Last active
April 17, 2017 17:18
-
-
Save ignas-sakalauskas/33bec463973ad5ab242b57759bc169ba to your computer and use it in GitHub Desktop.
Force drop database when in use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master | |
ALTER DATABASE YourDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
DROP DATABASE YourDatabaseName | |
-- https://ignas.me/tech/force-drop-database-when-in-use/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment