Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Restoring Database

Author  Topic 

ninel
Posting Yak Master

141 Posts

Posted - 2006-01-31 : 11:47:48
I am trying to delete a database because I need to restore it. But when I try deleting I get an error message stating "Error 3072: Cannot drop database because it is currently in use."

I closed query analyzer and browser windows using this database.
I cannot figure out what is still open.

Is there any way to restore the database without deleting it?

Thanks,
Ninel

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-01-31 : 12:03:56
run sp_who2 in QA and kill any connections to it, including your own..
Go to Top of Page

ninel
Posting Yak Master

141 Posts

Posted - 2006-01-31 : 12:12:51
Thank you.

Turns out there was a dts package executing in the background.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-01-31 : 13:49:47
See

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=RESTORE+syntax

for an example of syntax of the Restore command - including some "Force to single user" stuff - which can be handy when you just want to get the DB restored regardless!!

Kristen
Go to Top of Page
   

- Advertisement -