Last active
August 29, 2015 14:20
-
-
Save GuyHarwood/655de8f6aca09e0bcd35 to your computer and use it in GitHub Desktop.
Kill Connections And Drop Database
This file contains hidden or 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
ALTER DATABASE [dbName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
GO | |
DROP DATABASE [dbName] | |
GO | |
DROP LOGIN <loginName> | |
GO | |
/** | |
to execute this from the command line add the following to a batch file... | |
@echo off | |
sqlcmd -i "dropdb.sql" | |
echo done | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment