Database Replication is the creation and maintenance of multiple copies of the same 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.
Database 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, which results in a large performance advantage due to load sharing.
In addition, database replication can also improve availability because the slave database servers can be configured to take over the master role if the master database server becomes unavailable.
There are three types of replication supported by SQL SERVER:-
1. Snapshot Replication :Snapshot Replication takes snapshot of one database and moves it to the other database.
After initial load data can be refreshed periodically.
The only disadvantage of this type of replication is that all data has to copied each time the table is refreshed.
In short ,It is used when data at Publisher is static means not changing frequently and Subscriber need update data.
2. Transactional Replication :In transactional replication data is copied first time as in snapshot replication , but later only the transactions are synchronized rather than replicating the whole database.
You can either specify to run continuously or on periodic basis.
In short ,It is used when data is changing frequently at publisher and Subscriber need on line data from publisher.
3. Merge Replication :Merge replication combines data from multiple sources into a single central database.
Again as usual the initial load is like snapshot but later it allows change of data both on subscriber and publisher , later when they come on-line it detects and combines them and updates accordingly.
In short ,It is used when there is no constant connection between Publisher and Subscriber. When they come on line then data will replicate. In replication data can conflict and resolve this there is rule set up already.