Transactional Replication - How to purge data from Publisher but not Subscriber

  • Hi Experts,

    We have a transactional replication between OLTP and RPT. Every quarter, we need to archive/purge data older than 3 years from OLTP, but we want this data remained on the RPT. What's proper steps to accomplish this w/o re-initializing subscriptions?

    Thanks much in advance.

    Thanh Nguyen

  • I'm thinking one way to do this is modifying the system stored proc sp_MSdel_xxx at the subscriber's db to simply "RETURN" (or do nothing) during my archive/purge maintenance window. But the challenge will be how would I distinquish between app's DELETE and my maintenance's DELETE 'cuz I still want DELETE (done by app) replicated down to subscriber. Geez... the more I think about this, it's getting more hairy....

    Anyways... please help.

    Thanh Nguyen

  • change replication configuration not to replicate deletes to subscriber

    In SSMS go to Replication -> Local Publications and right click on your publication and select Properties. In the Publication Properties window click on 'Articles' and select the relevant article. Go to "Article Properties" and select "Set Properties of Highlighted Table Article". In the article properties window, change the "DELETE delivery format" to "Do not replicate DELETE statements".

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

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