Wednesday, March 21, 2012

Getting rid of deleted subscriptions in EM

We have a T-SQL script that enables replication on a server, creates a publication on that server, and pushes a subscription. We also have a script that deletes the subscription and publication and disables replication. The problem is that, in EM, when
the deletion script is run, there is still information in Replication > Subscriptions. How can we get rid of this subscription information so that it doesn't display?
Stephanie,
if you delete the subscription before deleting the publication usually these
entries are removed - however, this is not always the case. Where you want
to keep other replication settings (eg the subscriber is also a publisher)
you need to locate the subscription information and remove it manually, but
in your case you are removing replication settings generally so you can
remove the remaining metadata tables using sp_removedbreplication.
HTH,
Paul Ibison
|||Thanks for the info. sp_removedbreplication did clean up the subscription information in EM. If I needed to keep other replication settings, where can I locate this subscription information to delete it manually?
|||Stephanie,
you can have a look at sp_MSenumsubscriptions to see what is happening when
you click on the subscriptions folder. The key tables in each subscribing
databases are sysmergesubscriptions and MSreplication_subscriptions.
Regards,
Paul Ibison

No comments:

Post a Comment