question

Fatherjack avatar image
Fatherjack asked

When is a published database not published?

I have a database that was the published part of a working replication setup. It worked well for a considerable length of time however, when there were schema changes to be made the replication was not successfully removed. The database is now in a state where we cannot remove replication with any scripts as the results returned state the database is 'not taking part in replication' or they simply complete with a success message. We are not able publish the database either as we get errors stating that the database is already published. Catch22 it would seem. When I query `DATABASEPROPERTYEX(dtb.name, 'IsMergePublished')` the value returned is 1, indicating that somewhere inside the server thinks the database is still involved. Does anyone have any ideas on what I can try to alter this please?
sql-server-2008sql-server-2005replicationdatabase-property
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
WilliamD avatar image
WilliamD answered
First off, have you tried removing replication completely (if possible)? Disable Publication and Distribution runs a set of sprocs that clean up the meta data that can be missed otherwise. The problem can occur if you dropped a publication, but not cleanly (remote drop has done this for me before). If that doesn't work, there is the option of running the sprocs by hand. This [MSDN Link][1] talks about forcibly dropping subscriptions/publications. I recall there being a way of using @force parameters somehow. If these hints don't work, I will try and dig that out for you. [1]: http://msdn.microsoft.com/en-us/library/ms147833.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image Fatherjack ♦♦ commented ·
Yes, have tried the scripts one by one. They either error(create ones) or say they completed (drop ones) but neither changes the result of the other to a point where I can either get rid or establish replication. It isnt a biggy as I have implemented Log Shipping in its place but I'd just like to tidy away the details. OCD=DBA
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.