January 9, 2006 at 3:01 pm
I am trying to detach, but it comes back a in use. I then run sp2_who, comes back as 'sa' only. I have also selected dbo only, this has not helped.I can drop the pubs.Not sure why this DB will not.
January 9, 2006 at 5:50 pm
Try setting the database to 'single user' mode before detaching. More info can be found here:
http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=169084
January 10, 2006 at 3:05 am
January 10, 2006 at 6:58 am
1. you have jobs running - stop SQLServerAgent then try the detach
or
2. you have more than one applicationo open. If you have Enterprise Manager and Query Analyzer open, that's two connections. Close one of those applications.
-SQLBill
January 10, 2006 at 9:30 am
Thanks Guys tried all of the above, WORK like CHARM!!!!!!!
January 10, 2006 at 7:27 pm
Also, the utility you're using has a connection open with SQL Server to a specific database (your default database if not otherwise specified). This can be enough to block SQL Server from perfoming some actions, such as detaching the database.
In Enterprise Manager, you may have to close the folder for a database and select another database. Then right-click on the database you want to detach (or restore or whatever).
The same thing happens in Query Analyzer when you're trying to do things via T-SQL to the database you're connnected to.
David Lathrop
DBA
WA Dept of Health
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply