Introduction to Replication Tom Davis Software Architects, Inc.
Overview Introduction to Distributed Data Introduction to Replication Replication Agents Replication Types Physical Replication Models
Introduction to Distributed Data The Need for Distributed Data Considerations for Distributing Data Methods to Distribute Data
The Need for Distributed Data Brings Data Closer Together Allows Site Independence Separates OLTP Read Intensive Applications Can Reduce Conflicts
Distributed Data Considerations
Methods to Distribute Data
Introduction to Replication The Publisher-Subscriber Metaphor Publications and Articles Filtering Data Subscriptions
The Publisher-Subscriber Metaphor
Publications and Articles The basis of a subscription A collection of one or more articles Can have one or more publications per database Article Data from a whole or filtered partition of a table or a database object Part of a publication
Filtering Data
Subscriptions
Replication Agents Snapshot Agent Distribution Agent Log Reader Agent Prepares initial snapshots and stores them on the distributor Distribution Agent Moves snapshot and transactional data to Subscribers Log Reader Agent Copies data from transaction log to the distribution database Merge Agent Merges changes from multiple sites Queue Reader Agent Applies changes from a queue and applies them to multiple subscribers Cleanup Agents Complete scheduled and on-demand maintenance of replication
Replication Types Overview of the Replication Types Considerations for Using Merge Replication
Overview of the Replication Types Snapshot Replication Periodic bulk transfer of new snapshots of data Transactional Replication Replication of incremental changes Merge Replication Autonomous changes to replicated data are later merged
Considerations for Using Merge Replication Changes to the Schema Identifies a unique column Adds several system tables Creates triggers at Publisher and Subscriber Conflict resolution Tracks updates Compares values and resolves conflicts Replicates only synchronized data
Physical Replication Models Overview of the Physical Replication Models Combining Physical Replication Models and Types Central Publisher/Remote Distributor Example Central Subscriber/Multiple Publishers Example Multiple Publishers/Multiple Subscribers Example
Overview of the Physical Replication Models
Combining Physical Replication Models and Types The Model is the Physical Implementation The Type Provides the Functionality Any of the Models Can Use Any of the Types
Central Publisher/Remote Distributor Example
Central Subscriber/Multiple Publishers Example
Multiple Publishers/Multiple Subscribers Example
Recommended Practices Determine the Acceptable Degree of Data Latency Select an Appropriate Replication Type Select the Physical Replication Model Determine Whether to Allow Updates to Replicated Data