can't drop the database because it's currently in use

I am trying to delete a SQL Database and I keep getting the same error:

can't drop the database because it's currently in use

No one is using this or even connected to it.  What am I doing wrong?  I am using SQL Server 2000.
Who is Participating?
dreadyConnect With a Mentor Commented:
it always helps to just stop and restart the sql server (from.the sql server service managaer or from enterprise manager) Don't know if it is the most elegant way, and if it is a server where you can do that. But if it is a develpment machine that noone uses, that will do the trick. If restarting is not an option, i dont really know what to do.
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
run this (query analyzer) ...

alter database set read_only with rollback immediate (kills all connections)
use master
drop database <yourdb>

Hope this helps
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.