In my recent project, I was required to drop a database while there where probably some open connections.
I googled it and came across this.
So the following is the command I use.
ALTER DATABASE DATABASE_NAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
DROP DATABASE DATABASE_NAME
GO
August 27, 2008 at 12:09 am |
Lovely…thanks!
November 12, 2008 at 7:32 pm |
Sweet, thanks
December 31, 2008 at 7:02 pm |
Very nice… Thank you so much.