The Snapshot Agent prepares snapshot files containing
schema and data of published tables and database objects, stores the files in the snapshot folder, and records synchronization jobs in the distribution database on the distributor. The Log Reader Agent : The Log Reader Agent monitors the transaction log of each database configured for transactional replication and copies the transactions marked for replication from the transaction log into the distribution database. The Distribution Agent : The Distribution Agent moves the initial snapshot jobs and the transactions held in the distribution database to Subscribers. The Merge Agent : The Merge Agent applies the initial snapshots to the Subscribers. It also merges incremental data changes that occurred at the Publisher or Subscribers after the initial snapshot was created, and detects and resolves any conflicts according to rules you configure. Queue Reader Agent: The Queue Reader Agent is used by transactional replication to synchronize/read from queued transaction to update subscribers. It moves changes made at Subscriber back to Publisher
How does the Snapshot and Transactional, Marge Replication
works? Snapshot Replication: Snapshot Agent establishes a connection from distributor to publisher and generates fresh snapshot into snapshot folder by placing locks. Snapshot agent writes copy of the table schema for each article to .sch file. Copies data from published table at the Publisher and writes data to the snapshot folder in the form of .bcp file. Releases any locks on published tables. Transactional Replication: With Transactional replication, SQL Server captures all changes that were made in the articles and stores INSERT, UPDATE, and DELETE statements in the distribution database. Transactional replication is best used when the replicated data changes frequently or when the size of replicated data is not small and is not necessary to support autonomous changes the replicated data on the Publisher and on the Subscriber. Merge Replication: Merge replication allows making autonomous changes to replicated data on the Publisher and on the Subscriber. With Merge replication, SQL Server captures all incremental data changes in the source and in the target databases, and reconciles conflicts according to rules you configure or using a custom resolver you create. Merge replication is best used when you want to support autonomous changes the replicated data on the Publisher and on the Subscriber.
WHY and WHEN and When I should do this ? Interview Questions