Showing posts with label detach. Show all posts
Showing posts with label detach. Show all posts

Tuesday, March 27, 2012

Cannot drop/restore or detach db

Hi ALL
There are no connections or processes running against one
database yet I can't restore over it, detach it or drop it
because it says that it is in use. How is this possible'
Thanks
JUser DB or system DB?
>--Original Message--
>Hi ALL
>There are no connections or processes running against one
>database yet I can't restore over it, detach it or drop
it
>because it says that it is in use. How is this
possible'
>Thanks
>J
>.
>|||Make sure that you don't use the db from the connection where you want to drop it.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"J" <anonymous@.discussions.microsoft.com> wrote in message
news:045f01c3aef9$12df4e20$a501280a@.phx.gbl...
> Hi ALL
> There are no connections or processes running against one
> database yet I can't restore over it, detach it or drop it
> because it says that it is in use. How is this possible'
> Thanks
> Jsql

Sunday, March 25, 2012

Cannot detach the database for previous publications

I had replication job in one database. Since I need to detach the database
and move it somewhere else, I deleted all publications. However when I tried
to detach the db, the error message says that the database cannot be detached
because it is replicated. I updated the statistics of both that database and
distribution database. However the error remains. Please advice.
Thanks,
Charts
Try using sp_dboption to set 'published' and 'merge publish' to false.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Great ! It works. Thanks so much.
"Paul Ibison" wrote:

> Try using sp_dboption to set 'published' and 'merge publish' to false.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>

Cannot detach suspect db

A db is flagged as suspect. I tried to detach it or take
offline but was unable to as the db is replicated (merge
replication). At the same time I was unable to cancel the
replication because the db wasn't found.
The suspect status was caused by the db failing to close
cleanly after a failed back-up. I also haven't been able
to succesfully run sp_resetstatus.
Any ideas onhow to break out of this catch 22 situation?
RegardsHere's an old post i found that explains how to fix a suspect db :-
http://groups.google.co.uk/groups?q=sql+2000+suspect+fix&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=dcde2a5a.0309151952.424b43cb%40posting.google.com&rnum=1
--
HTH
Ryan Waight, MCDBA, MCSE
<japan11@.hotmail.com> wrote in message
news:074901c39147$f819ece0$a301280a@.phx.gbl...
> A db is flagged as suspect. I tried to detach it or take
> offline but was unable to as the db is replicated (merge
> replication). At the same time I was unable to cancel the
> replication because the db wasn't found.
> The suspect status was caused by the db failing to close
> cleanly after a failed back-up. I also haven't been able
> to succesfully run sp_resetstatus.
> Any ideas onhow to break out of this catch 22 situation?
> Regards