Effectively troubleshoot latency in SQL Server Transactional replication: Part 1


High level transactional replication architecture

The initial stage of transactional replication is initializing the subscriber. Although this can be done via backup, the typical approach generating a snapshot by the Snapshot Agent and storing it in the snapshot folder. It’s C:Program FilesMicrosoft SQL Server<INST>MSSQLReplData by default and configurable. Then, the Distribution Agent transfers the snapshot to the subscriber.

Afterwards, incremental changes in the published database are tracked and replicated to subscriber database. This replication process is done in three phases:

Transactions are marked « for replication » in the transaction log. The Log Reader Agent reader thread scans through the transaction