Advertisement
Beginner SQL Server, Replication

What are the three main types of replication in SQL Server, and how do they differ?

Short answer

Snapshot replication periodically copies an entire fresh snapshot of the published data, transactional replication continuously sends individual data changes as they happen for near real time synchronization, and merge replication allows changes to be made independently at both…

Save SQL Server mock interview
Advertisement
AModel answer
Snapshot replication periodically copies an entire fresh snapshot of the published data, transactional replication continuously sends individual data changes as they happen for near real time synchronization, and merge replication allows changes to be made independently at both the publisher and subscriber, later merging them together, which is useful for scenarios with occasionally connected clients.
-- Transactional replication continuously sends changes
-- as they occur in near real time
EXEC sp_addarticle @publication = 'SalesPublication', @article = 'Orders';
Real-world example
A company uses transactional replication to keep a reporting database nearly synchronized in real time with their main operational database, choosing it over snapshot replication because near real time data is important for their dashboards.
Likely follow-ups
  • When would snapshot replication be a better choice than transactional replication?
  • What kind of conflicts can occur with merge replication, and how are they resolved?
Related topics