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?


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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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