Monday, March 19, 2012

Can't detach database

1. Trying to detach in EM but get message 'can't detach while db being
replicated'. OK button is disabled.
2. Replication has been disabled vua Enterprise manager and
sp_removedbreplication.
3. I know that at one time a user had tried unsuccessfullt to set up
replication between this db and a SQLServer installation on her workstation.
I don't know the details of that except that she couldn't get it to work.
4. Is there anything I can do in a system table to clean out everything
related to this replication attempt. so I can detach?
Thanks.
Alan
Alan,
try using sp_dboption to reset the database status:
sp_dboption 'dbname', 'published', 'false'
sp_dboption 'dbname', 'merge publish', 'false'
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thanks for your reply.
I get following message after
sp_dboption 'Contacts', 'published', 'false'
Server: Msg 208, Level 16, State 1, Procedure sp_dropsubscription, Line 78
Invalid object name 'syssubscriptions'.
Would that be due to fact I tried cleaning out things in EM and
sp_removedbreplication already?
No luck in detaching. EM still says 'Database being replicated - Yes'.
Thanks.
Alan
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ObTG0HpxEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Alan,
> try using sp_dboption to reset the database status:
> sp_dboption 'dbname', 'published', 'false'
> sp_dboption 'dbname', 'merge publish', 'false'
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Alan,
this shouldn't be related. It looks as though things are
very wrong here. If you don't have any other
publications, I'd consider disabling publishing on this
instance and DTS out the data from the database - perhaps
a copydatabase would also work. Then try dropping the
database.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thanks again for your reply.
I will try your suggestions.
Fortunately, it's a test machine. I can even re-intstall SQLServer if I
have to.
If I do re-intall, do you know if there is anything in registry that might
get left over from existing problem?
Needless to say, my client will have to rope in employees who stab around at
things.
Regards,
Alan
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:59a001c4c749$2945b230$a301280a@.phx.gbl...
> Alan,
> this shouldn't be related. It looks as though things are
> very wrong here. If you don't have any other
> publications, I'd consider disabling publishing on this
> instance and DTS out the data from the database - perhaps
> a copydatabase would also work. Then try dropping the
> database.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

No comments:

Post a Comment