Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a Windows 2003 server with SQL Server 2005 and when I log into the Management Studio, right-click on a Database and choose "Delete" I get the Delete Object dialogue. I then click OK at the bottom and it grays out the dialogue and shows a spinning indicator but doesn't finish. I've let it run for 5 or 10 minutes and it seems to eat up the CPU, but not do anything. The database I'm trying to delete is very small (a few tables with maybe 1-3 mb of data). Any ideas?

share|improve this question
up vote 5 down vote accepted

When you drop the database the UI is going to also try and delete the backup and restore history for the database from the MSDB database. Dry using the DROP DATABASE statement from a query window, then clean up the database backup history manually.

share|improve this answer
I tried that and got this error: Cannot drop database "Calendar" because it is currently in use. – Austin Jul 31 '09 at 19:26
Okay, I got DROP DATABASE to work. You can't have the database you want to delete selected when you run the DROP DATABASE call in the Query Editor. Thanks for the help. That is bothersome that the delete was hanging in SQL Server though – Austin Jul 31 '09 at 19:30
How long has the server been online? Do the databases on the server get backed up regularly? I'll bet is you check the tables in the msdb database you'll find quite a few records for the Calendar database. – mrdenny Jul 31 '09 at 19:43

you can also use this command:





Where foo is the db name

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.