-- drop kick any connections to database "foo" and roll back their transactions
ALTER DATABASE foo
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
-- Drop the database "foo"
USE MASTER
GO
DROP DATABASE foo
Monday, January 4, 2010
Subscribe to:
Post Comments (Atom)
1 comment:
As exepcted, this will also remove the underlying mdf, ndf and ldf files from hard drive, freeing up space.
Post a Comment