Replication deadwood | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Replication deadwood

I have two SQL replication problems I can’t seem to fix (fortunatelky they are in test companies not live)<br /><br />One is that I am showing a nonfunctional publication from a database that no longer exists, and another is a publication going to a database that no longer exists?<br /><br />I can’t just simple delete these, and I am stuck.<br /><br />help the neophyte out ok <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br /><br />Thanks!

— you can choose stored procedure depending on your situation/ requirment..
sp_removedbreplication Removes all replication objects from a database without updating data at the Distributor. This stored procedure is executed at the Publisher on the publication database or at the Subscriber, on the subscription database. Syntax
sp_removedbreplication [ @dbname = ] ‘dbname’ Remarks
sp_removedbreplication is used in all types of replication.
sp_removedbreplication is useful when restoring a replicated database that has no replication objects needing to be restored.
sp_droppublication
Drops a publication and its associated articles. This stored procedure is executed at the Publisher on the publication database. Syntax
sp_droppublication [ @publication = ] ‘publication’
[ , [ @ignore_distributor = ] ignore_distributor ]
sp_dropsubscription
Drops subscriptions to a particular article, publication, or set of subscriptions on the Publisher. This stored procedure is executed at the Publisher on the publication database. Syntax
sp_dropsubscription [ [ @publication = ] ‘publication’ ]
[ , [ @article = ] ‘article’ ]
[ @subscriber = ] ‘subscriber’
[ , [ @destination_db = ] ‘destination_db’ ]
[ , [ @ignore_distributor = ] ignore_distributor ]
[ , [ @reserved = ] ‘reserved’ ] sp_dropsubscriber
Removes the Subscriber designation from a registered server. This stored procedure is executed at the Publisher on the publication database. Syntax
sp_dropsubscriber [ @subscriber = ] ‘subscriber’
[ , [ @reserved = ] ‘reserved’ ]
[ , [ @ignore_distributor = ] ignore_distributor ]
Deepak Kumar –An eye for an eye and everyone shall be blind
You need to run the above statements on both the databases.
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>