Hi,
I need to detach a DB, but need to force any current connections to be
disconnected as I am getting an error saying that I cannot detach the DB as
it is being used.
What is the best way of doing this?
I am using DMO to detach at the moment.
ThanksALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
(Why are you detaching the database? Why are you detaching a database that
is in use?)
"Jason Fischer" <jason.fischer@.micropay.com.au> wrote in message
news:OTM174ZkFHA.1948@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I need to detach a DB, but need to force any current connections to be
> disconnected as I am getting an error saying that I cannot detach the DB
> as it is being used.
> What is the best way of doing this?
> I am using DMO to detach at the moment.
> Thanks
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment