January 16, 2008 at 10:27 am
I have a sql 2005 database that I want to drop (or at least detach). When I try, I get an error stating that the database is in use...... I checked with sp_who2 and can not find any traces of it being used. The command "dbcc checkdb " just seems to hang but I can issue queries against tables in the DB.
Are there any other ways to deal with this issue, short of restarting the sql server?
TIA,
barkingdog
January 16, 2008 at 11:51 am
Expand Management and double click on the "Activity Monitor". If you see the database name under the "database" column, right click on it and choose "Kill Process" to kill the process (Unless you shouldn't kill the process). Then try to drop the database.
January 16, 2008 at 11:57 am
This is the simplest way.
use master
alter database MyDatabase set offline with rollback immediate
drop database MyDatabase
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply