Categories
Sql Server

What Is Replication And Its Types

What Is Replication And Its Types

Replication is a set of technologies for copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency. Using replication, you can distribute data to different locations and to remote or mobile users over local and wide area networks.

Why we use Replication:

  1. Improving scalability and availability.
  2. Integrating data from multiple sites.
  3. Data-warehouse and reporting.
  4. Integrating heterogeneous data.

Components of Replication:

Article:- An article can be a whole table or a database object, or a part of one. It can be filtered horizontally, restricting the rows it contains, or filtered vertically, restricting the columns it contains.

Publications:- A publication can contain one or many articles. It can only have articles from the same database, but there can be many publications in a database. A publication is both the unit of subscription and the unit of replication.

Subscriptions:- A subscription is created against a publication; it cannot be directly created against an article.

Their are two types of subscriptions :-  1. Pull Subscriptions        2. Push Subscriptions

Server Role in Replication:

Publishers create and modify the data.

Distributors store replication-specific data associated with one or more publishers.

Subscribers receive the data. With merge replication, this situation is altered slightly because modifications occur at both the publisher and the subscribers.

sql server replication

Types of Replication:

  1. Snapshot replication sends the entire data set to the subscriber.
  2. Transactional replication only sends modifications to the data.
  3. Merge replication items are modified at both the publisher and subscribers.
  4. Heterogeneous replication allows access to other database products.
  5. Peer to Peer Transactional Replication.