Planning a transactional replication

  • Hello,

    I need to plan a transactional replication in the following scenario:

     

    Server A (Publisher and Distributor)

    Server B (Subscriber)

    After the initial snapshot, i want to insert a row in the server A, then the Server A will replicate to the server B. After, i want to create a routine that deletes this row in the server A.

    Conclusion: I need the data to be replicated to server B, after, the data be deleted on the server A.

    Can you help me?

    Thanks a lot! 

  • > I need the data to be replicated to server B, after, the data be deleted on the server A.

    I didn't think this was still replication, because the rows that are on B will be deleted as well. well i don't know much about replication


    Everything you can imagine is real.

  • All you have to do is modify the replication delete proc on the subcriber for that table. Replication creates three procs, one each for insert, update, delete, on the subscriber. Just add a 'return' as the first line of code in the stored proc and essentially replication will process the delete normally from the publisher, it will think it has been deleted, but it will still be in the table. Two things to keep in mind; one is that if you resnapshot you need to remember to remodify the proc again (or set it up to modify automatically in the post snapshot script), and that you won't be able to use the built in validation to compare publisher to subscriber since you're deliberately having them not match.

    Easy to do and works fine.

  • Andy,

    Thaaaaaaaank you very muuuuch!!!! really works fine!!

    Regards,

    Leonardo

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

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