Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 15: Achieving High Availability Through Replication.

Similar presentations


Presentation on theme: "Chapter 15: Achieving High Availability Through Replication."— Presentation transcript:

1 Chapter 15: Achieving High Availability Through Replication

2 Introduction  Use replication to copy data to different locations in your enterprise  There are several reasons Move data closer to the users To reduce locking conflictsTo allow site autonomy To remove the impact of read- intensive operations © Wiley Inc. 2006. All Rights Reserved.

3 Publisher/Subscriber Metaphor  There are several key terms used in replication Publisher  the source database where replication begins. It makes data available for replication Subscriber  the destination database where replication ends Distributor  the intermediary between the publisher and subscriber. It receives published transactions or snapshots and then stores and forwards these publications to the subscribers Publication  is the storage container for different articles. A subscriber can  subscribe to an individual article or an entire publication. Article  the data, transactions, or stored procedures that are stored within a publication. This is the actual information that is going to be replicated. © Wiley Inc. 2006. All Rights Reserved.

4 Articles  An article is data in a table  It can be the whole table or just a subset Horizontal partitioning  Rows are filtered out Vertical partitioning  Columns are filtered out © Wiley Inc. 2006. All Rights Reserved.

5 Publications  A publication is a logical collection of articles  Subscribers subscribe to a publication They do not need to read all of the articles though © Wiley Inc. 2006. All Rights Reserved.

6 Replication Factors  Factors that affect replication are Autonomy  Level of subscriber independence Will the replicated data be considered read-only? How long will the data at a subscriber be valid? How often do you need to connect to the distributor to download more data? Latency  Frequency of data updates Transactional Consistency  Do all the transactions that are stored need to be applied at the same time and in order? What happens if there is a delay in the processing? © Wiley Inc. 2006. All Rights Reserved.

7 Using Transactional Replication  Transactions from the publisher are stored on the distributor  Subscribers receive and apply transactions They should treat data as read-only  Some latency and autonomy can be introduced  Subscribers do not need to be in contact with publishers at all times © Wiley Inc. 2006. All Rights Reserved.

8 Using Snapshot Replication  Moves an entire copy of the published items © Wiley Inc. 2006. All Rights Reserved.

9 Snapshot With Updating Subscribers  Initial replication works just like snapshot replication  Subscribers use 2PC to update the publisher  Publishers must approve subscriber updates © Wiley Inc. 2006. All Rights Reserved.

10 Using Merge Replication  This allows subscribers to make changes to their local data  All changes are merged with all other subscribers When all subscribers have the same data, they are in convergence © Wiley Inc. 2006. All Rights Reserved.

11 Using Queued Updating  Used with transactional and snapshot replication  Allows subscribers to update publishers  Updates are queued, not immediate  There are other Restrictions © Wiley Inc. 2006. All Rights Reserved.

12 Replication Internals  There are two types of subscriptions  Push Configured and maintained at the publisher  Pull Configured and maintained at the subscriber © Wiley Inc. 2006. All Rights Reserved.

13 Publication Issues  Timestamp datatype This is replicated as binary data in transactional and snapshot Data is not replicated in merge  Identity values You can assign a range of values to replicate  User-defined datatypes These must be created on each subscriber  Not for replication Prevents objects from being replicated © Wiley Inc. 2006. All Rights Reserved.

14 Publication Restrictions  Replicated tables must have a primary key. Except in snapshot replication.  Publications cannot span multiple databases.  Varchar(max), nvarchar(max), and varbinary(max) data is not replicated in transactional or merge replication. Because of their size, these objects must be refreshed by running a snapshot.  You cannot replicate from the master, model, MSDB, or tempdb databases. © Wiley Inc. 2006. All Rights Reserved.

15 Distributor Issues  Ensure you have enough hard disk space for the Distribution working folder and the distribution database.  Do not let the distribution database’s transaction log fill up.  The distribution database will store all transactions from the publisher to the subscriber. It will also track when those transactions were applied.  Snapshots and merge data are stored in the Distribution working folder.  Be aware of the size and number of articles being published.  Text, ntext, and image datatypes are replicated only when you use a snapshot.  A higher degree of latency can significantly increase your storage space requirements.  Know how many transactions per synchronization cycle there are. © Wiley Inc. 2006. All Rights Reserved.

16 Replication Backup  There are four possible strategies Publisher only Publisher and distributor Publisher and subscriber(s) Publisher, distributor and subscriber(s) © Wiley Inc. 2006. All Rights Reserved.


Download ppt "Chapter 15: Achieving High Availability Through Replication."

Similar presentations


Ads by Google