3

We have multiple subscriptions (merge pull) at our subscriber for only 1 "real" subscription. I think we actually broke it like this by adding and removing the subscription from the subscriber side, and then trying to replicate it... multiple times.

Now the problem is not that the replication does not work, I'm pretty confident that I the answer for that. The problem is that I can't drop/delete the broken subscriptions at the subscriber anymore. It just does not work.

When trying to run sp_dropmergepullsubscription at the publisher, it tells me "No subscription is on this publication article".

When trying to run sp_dropsubscription at the publisher, it tells me "This database is not enabled for subscription"

Yes I've checked that I was running all these scripts on the correct database and all that.

Has anybody had a problem like this before ? Do I need to re-do the publication and the subscription ?

Thanks guys and gals ! :)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Master Zang
  • 77
  • 2
  • 8

1 Answers1

4

Try the following on the publisher:

EXEC sp_dropmergesubscription 
  @publication = '<publicationName>', 
  @subscriber = '<subscriberName>',
  @subscriber_db = '<dbName>;
GO

delete sysmergesubscriptions where subscriber_server = '<subscriberName>'

use distribution
go 
delete msmerge_Agents where subscriber_name = '<subscriberName>'

delete msmerge_subscriptions where subscriber = '<subscriberName>' 

...then try setting the pull subscription back up

Quantum Elf
  • 752
  • 4
  • 9
  • I had an orphaned record for one of my subscriptions in `MSmerge_agents` even after calling `sp_dropmergesubscription`. This caused the record to continue showing up in the Replication Monitor. To solve this, as stated in this answer I deleted the record from `MSmerge_agents`. – Ryan Kirkman Apr 10 '13 at 06:06