What is Replication?

What is Replication?

- Replication is the process of distributing data from one database to another on the same server or servers connected through LAN or the internet.
- Replication is used to synchronize data between databases that may be at remote location.
- Using this, you can maintain copies of database at more than one locations.
- Maintaining copies of data at different location provide a standby server.
- It can be used for load balancing of server by maintaining area specific data independently and replicate later to have single version of data.

Components of Replications

Publisher
A publisher is any database unit that makes data available to other sources via replication. The publisher can have multiple publications which defines the data to replicate.

Subscriber
A subscriber is any database unit that receives the replicated data. It can receive data from multiple publishers or publications. Data can be republished to the other subscribers.

Article
Article is the basic unit of publication. It shows what is published. An article can simply be a table or a stored procedure. When tables are used as articles, filters can be used to restrict the columns and rows of the data sent to Subscribers.

Publication
It is a collection of one or more articles from one database.

Distributor
A distributor is any database unit that acts as a store for the data to be replicated. Each publisher is associated with a single database called as distribution database. Replication status data is stored in distribution database. A distributor can be local or remote.

Pull Subscription
In a pull subscription, changes to a subscriber cannot be publicized without any request from subscriber. This allows the user at the Subscriber to determine when the data changes are synchronized.

Push Subscription
In a push subscription, changes to a subscriber can be publicized without any request from subscriber. The changes can be pushed either periodically or on demand.

Snapshot Agent
A snapshot agent is used in snapshot replication. Snapshots can be created as soon as the subscription is created. The snapshot agent prepares snapshot files that contain details of the published data. The snapshot also assists in establishing connection from the Distributor to the Publisher.

Log Reader Agent
The replication Log Reader Agent is an executable that is used for monitoring transaction logs of each database. It c copies the transactions marked for replication from the transaction log into the distribution database.

Distribution Agent
The distribution Agent is an executable that is used to move the snapshot and the transactions held in the distribution database tables to the destination tables at the Subscribers.

Merge Agent
The replication merge agent is an executable that is used to apply the database snapshot to the subscriber. After the initial snapshot, any other changes if made are also merged.

Queue Reader Agent
The Replication Queue Reader Agent is an executable that is used to read messages stored in a Microsoft SQL Server queue or a Microsoft Message Queue and then applies those messages to the Publisher.
What are the types of Replication?
Snapshot Replication - In this kind, snapshot of entire data is copied from publisher to the subscriber's database on regular interval........
Define the terms used in Replication
Publisher is the database that transmits its data to another database.........
Replication agents that SQL Server supports
The Snapshot Agent creates snapshot files and stores on the distribution database. It also keeps track of synchronization status in the distribution database....
Post your comment