Showing posts with label drop connections. Show all posts
Showing posts with label drop connections. Show all posts

Monday, January 4, 2010

drop database

-- 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