Remove data from Publisher after replication

  • Currently, transactional replication with updatable subscription is configured on our web application so that data will be replicated from "external" DB to "internal" DB and vice versa. We are now thinking whether it is possible to remove the data from the "external" DB as much as possible to reduce the rick of being hacked and lost sensitive data from it. Is there any option in replication can achieve this? Or should it be done in a way other than replication? Thanks in advance. 🙂

    Kenneth

  • Hi,

    Is replication right for you here then ?

    Do you need just some of the data replicated ?

    Need a little more..

    Graeme

  • Simply speaking, we want to remove those data from "external DB" after replicating to "internal DB". 🙂

  • Could you turn off replicating deletes?

    Tara Kizer
    Microsoft MVP for Windows Server System - SQL Server
    Ramblings of a DBA (My SQL Server Blog)[/url]
    Subscribe to my blog

  • Tara, any hints to achieve that? Thanks.

  • You would do it in the article properties. What I'm wondering though is if you need to replicate delete statements. If you need to, then you can't turn the option off.

    Tara Kizer
    Microsoft MVP for Windows Server System - SQL Server
    Ramblings of a DBA (My SQL Server Blog)[/url]
    Subscribe to my blog

  • In the article property screen, I can find a "Commands" tab which define the SP for Insert / Update / Delete on subscriber. Is this where you mean? And how should I input for disabling the Delete on subscriber?

  • Let's not go too far yet. I'm wondering if you need to replicate delete statements. If a delete happens at the publisher, do you need that same delete replicated to the subscriber? Or can you turn off deletes? If you can turn off deletes, then you can consider adding a delete trigger to the tables being replicated. This will only work if you don't need deletes replicated.

    Tara Kizer
    Microsoft MVP for Windows Server System - SQL Server
    Ramblings of a DBA (My SQL Server Blog)[/url]
    Subscribe to my blog

  • We need to take further investigation to see if "delete replication" is not required for all those affected tables. But anyway, I believe that we can modify the tables a bit so that "delete replication" will become not necessary on those replication tables to subscriber.

    So, how could I disable the "delete replication"? Should I input "NONE" on the article property screen as it does in previous version of SQL Server?

  • Still not sure this is the right way to go. The whole updateable subscriber scenario implies you want to modify records both ends. If you delete records from the external DB, what happens if you modify those records on the internal DB.

    Perhaps you could offload the internal replicated table to a static archive table on a regular basis and just leave the replication to keep the Internal and External replicated tables in synch.

    Regards

    Graeme

Viewing 10 posts - 1 through 9 (of 9 total)

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