Peter Schreurs & Caz Smith
Peter Schreurs & Caz Smith
What is Database Replication? The ways that database replication can be done
Snapshot replication Merging replication Transactional replication
Database replication is the creation and maintenance of multiple copies of the database. In most implementations of database replication one database server maintains the master copy of the database and additional database servers maintain slave copies of the database. Databases writes are sent to the master database server and are then replicated by the slave database servers. Database reads are divided among all of the database servers, results in a large performance advantages due to load sharing.
Snapshot replication
. Snapshot replication simply takes a "snapshot" of the data on one server and moves that data to another server.
After the initial synchronization snapshot, replication can refresh data in published tables periodicallybased on the schedule you specify. Disadvantage of Snapshot replication
Although snapshot replication is the easiest type to set up and maintain, it requires copying all data each time a table is refreshed. Between scheduled refreshes, data on the publisher might be very different from the data on subscriber.
Merging replication
Merge replication combines data from multiple sources into a single central database. Merge replication uses initial synchronization by taking the snapshot of data on the publisher and moving it to subscribers. Merge replication allows changes of the same data on publishers and subscribers, even when subscribers are not connected to the network. When subscribers connect to the network, replication will detect and combine changes from all subscribers and change data on the publisher accordingly. Advantage of merging replication
Merge replication is useful when you have a need to modify data on remote computers and when subscribers are not guaranteed to have a continuous connection to the network.
Transactional replication
Transactional replication involves copying data from the publisher to the subscriber once and then delivering transactions to the subscriber as they occur on the publisher. The initial copy of the data is transported by using the same mechanism as with snapshot replication. As database users insert, update, or delete records on the publisher, transactions are forwarded to the subscriber. To make synchronizes your transactions as quickly as possible, you can make a configuration change to deliver transactions continuously. Alternatively, you can run synchronization tasks periodically. Advantages of Transactional replication
Transactional replication is most useful in environments that have a dependable dedicated network line between database servers participating in replication.