Removing Subscription information at a Subscriber
I'm trying to implement Merge Subscriptions between two servers. The question is, how can I programmatically remove the subscription information from the subscriber?
I can call sp_dropmergesubscription at the Publisher but this does not affect the Subscriber server. Deleting rows from the sysmergesubscriptions, sysmergearticles, and sysmergepublications tables will remove the subscription item in the server's Replication folder.
There is a dependency between each replicated table and a set of system sprocs/triggers, all of which I can remove programmatically. I've can also drop rows from MSmerge_replinfo and MSmerge_genhistory.
However, even after doing this I am unable to drop the table despite there being no apparent dependencies.
Can anyone help? I would have thought this would be a fairly common task - surely at least as common as removing a subcription on the publisher side, which warrants its own system sproc.
Thanks
|