none
How does a pull subscription know what commands (data changes) in distribution db to retrieve since its last successful synchronization RRS feed

  • Question

  • We have publisher A (sql 2016), distributor B (sql 2019), and subscriber C(sql 2016) in our env and each resides in its own vm box.   The subscription in the subscriber is a pull one.   We are using the transactional replication.   I like to understand when a pull subscription is trying to get the data changes(commands) from the distribution db:

    1. how does the subscription process determine where the starting point from previous successfully sync to get the next batch of commands in the dist db?   

    2. Does the subscriber have any replication system tables residing locally that would store some kind of record seq no so it knows the last successful sync point?

    OD


    Ocean Deep

    Wednesday, May 6, 2020 8:23 PM

All replies

  • Pull subscription the Subscriber scheduled to check at the Distributor regularly if any new changes are available as all changes available in distribution database, and then updates the data in the subscription database itself. 

    The only difference from Push subscription is SQL Server creates SQL Server Agent job to run the Distribution Agent on the Subscriber rather than Distributor.


    http://uk.linkedin.com/in/ramjaddu

    Wednesday, May 6, 2020 8:52 PM
  • Hi OD,

    Subscriptions are synchronized by the Distribution Agent (for snapshot and transactional replication) or the Merge Agent (for merge replication). Agents can run continuously, run on demand, or run on a schedule. For a pull subscription, the Distribution Agent runs at the Subscriber. The subscription subscriber regularly checks the distribution server for any new changes, and then updates the data in the subscription database itself.

    The MSdistribution_history table contains history rows for the Distribution Agents associated with the local Distributor. This table is stored in the distribution database.

    More details you can refer to following articles:
    Subscribe to Publications

    Specify Synchronization Schedules

    Using the Replication Monitor to  monitor the the Distributor to Subscriber History

    Replication Tables

    Best Regards,
    Cris


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 7, 2020 4:30 AM
  • Hi OD,

    Was your issue resolved?
    If you have resolved your issue, please mark the useful reply as answer. This can be beneficial to other community members reading the thread.
    In addition, if you have another questions, please feel free to ask.
    Thanks for your contribution.

    Best regards,
    Cris


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 11, 2020 12:58 AM