Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Drop Database with Active Connections - SQL Server

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Fri, Aug 12, 2011, 9:37 AM


USE master
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'MyDatabase'
ALTER DATABASE MyDatabase SET  SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE MyDatabase

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.