SQL SERVER – Replication Keywords Explanation and Basic Terms

SQL Server replication has a vocabulary that can sound confusing when you first encounter it. I put this reference together after discussing the basics with database administrators who were new to replication.

Gouache painting of databases exchanging packages

Publisher

The Publisher makes data and database objects available for replication. A publishing database contains the objects selected for a publication. One Publisher can have multiple publications.

Article and Publication

An article identifies a database object included in replication. Depending on the replication type, an article can represent a table, view or another supported object. Filters can restrict which table rows or columns are sent.

A publication groups one or more articles from one database. Think of it as the set of objects and data you choose to distribute together.

Distributor

The Distributor stores replication metadata and helps move data between the Publisher and Subscribers. Depending on the configuration, it can be on the same server as the Publisher or on another server.

Subscriber and Subscription

A Subscriber receives a publication in a subscription database. A subscription defines the publication to receive and where it goes. Depending on the replication type and configuration, a Subscriber can also send changes back.

With a push subscription, the Distribution Agent or Merge Agent runs at the Distributor. With a pull subscription, the corresponding agent runs at the Subscriber. The right choice depends on the topology and operational needs.

Three Common Types of Replication

Snapshot replication distributes a snapshot of data at a point in time. Transactional replication delivers changes from the Publisher to Subscribers. Merge replication supports changes at both ends and synchronizes them when connections are available.

The behavior and supported configurations differ, so choose a type based on the application rather than on the name alone. A distributed transaction and two-phase commit are separate concepts, not a fourth type of SQL Server replication.

A Simple Example

Suppose a central database publishes a product table to a reporting database. The table is an article, the group containing it is a publication, and the reporting database receives it through a subscription.

Replication is useful for moving selected data, but it does not replace tested backups. A replicated copy can also receive unwanted changes. Monitor the agents and keep a recovery plan for each database.

Replication is not just copying a table, it is a set of roles and processes working together.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Replication, SQL Scripts, SQL Server
Previous Post
SQL SERVER – Restrictions of Views – T SQL View Limitations
Next Post
SQL SERVER – Random Number Generator Script – SQL Query

Related Posts

8 Comments. Leave new

  • Nitin Shetye
    May 10, 2007 6:45 am

    HI Pinal,

    Could you please post an article dedicated to replication..you can say in-depth article.

    thanks,

    nitin

    Reply
  • i would like that too..!

    Reply
  • HI Pinal,

    I would like to know more about the replication,Now i had set up a merge replication of one publisher and two subscribers at remote using vpn and its working fine and the log file size is growing like a blast… now i need a help that how to remove a un wanted article(Table) from the replication with out stoping the replication.b’cos the work is going 24 hours so that when we stop the replication the snap shot have to start . so that the data lose will be there … please do help me. plz do reply to my mail

    Reply
  • Hi! Pinal,
    I need your help to know the difference between Replication and Mirroring.

    Thanks

    Reply
  • Hi everybody.. who all asked regarding REPLICATION…

    REPLICATION-

    example:- If two servers are in two different zones,,say.. one server is in India and the other one is in USA… if the users all over the world updates their record, data should get updated in both the servers in India as well as in USA
    in a timely fashion….

    hence replications are enforced….

    Reply
  • hello,
    ————————————————————-
    “Mannoj Kumar

    Hi everybody.. who all asked regarding REPLICATION…

    REPLICATION-

    example:- If two servers are in two different zones,,say.. one server is in India and the other one is in USA… if the users all over the world updates their record, data should get updated in both the servers in India as well as in USA
    in a timely fashion….

    hence replications are enforced….
    ————————————————————————–
    how the replication is done in the above case,if the only available option.Please explain in detail. i’m having Sql server 2005 express edition.

    Thanks

    Reply
  • Very Nice!

    Reply
  • Hi Pinal…
    Please explain the overall concept of replication in detail..
    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.