removing publications

  • Hi, I've inherited replication both merge and transactional. Right now, I've known that much of it is not in use, so I'm not quite ready to remove replication per se. In a few months I might be able to remove replication completely.

    My Requirement is -

    Right now, if I needed to remove some transactional and merge subscriptions and publications, is it sufficient to right click subscriptions and delete and then publications too? Does that take care of replication cleanup for these publications, subscriptions?

    Additionally, do I also go to each database that is no longer being replicated and run the sp_removedbreplication?

    I was trying to make sure I cleanup good, and not leave behind replication related objects or even properties like articles left as marked for replication etc. Please let me know.. Thank you.

  • Hey there,

    If you want to delete all publications and remove all replication objects, you should execute sp_removedbreplication at the Publisher level. However, this does not remove objects from other databases (e.g., distribution database).

    You should use:

    sp_removedbreplication [ [ @dbname = ] 'dbname' ]

    [ , [ @type = ] type ]

    dbname is the sysname and type is the type of replication from which you are removing the database objects. The possible values are:

    - tran: Removes transactional replication publishing objects

    - merge: Removes merge replication publishing objects

    - both: Removes all replication publishing objects

    Note that sp_removedbreplication cannot be used for a database that is marked as read-only.

    Now, execute sp_subscription_cleanup on the on the subscription database to remove any remaining replication metadata in the subscription database.

    Hope this helps some, good luck 😎

    Natali

    "Press any key to continue, where's the ANY key?" 😛 Homer Simpson

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply