Are you running this from Query Analyzer pointed to that database? If so, then set your "window" pointed to the master database. Should be fine then.
-----Original Message-----
From: Zelli Brian
[mailto:mssqldba-ezmlmshield-x75817021.[Email address protected]
Sent: Thursday, April 27, 2006 1:35 PM
To: LazyDBA Discussion
Subject: sp_detach
Ok, I am trying to detach a test database and when I execute the command
Exec sp_detach_db 'test2'
It tells me that the db is in use. Nobody is using it. What am I doing
wrong?
Brian
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
_________________________________________________________________________
This message and any attachments may be confidential or privileged and are for the exclusive use of the intended recipient. If you are not the addressee or intended recipient, please do not read, copy, use, or disclose this communication to others. If you have received this in error, please notify the sender by replying to this message, and then delete it entirely from your system. Delivery of this message and any attachments to any person other than the intended recipient(s) is not intended in any way to waive confidentiality or a privilege. All personal messages express views only of the sender, which are not to be attributed to Finish Line and/or any of its subsidiaries or affiliates, and may not be copied or distributed without this statement.
MS Sql Server LazyDBA home page