Transactional replication to the rescue

Now, we can eliminate the need for merging by implementing transactional replication. What we can accomplish with transactional replication is to propagate the changes in the source database (publisher) to the target database (subscriber) in near real time.

To understand how replication works in SQL Server, think about how a newspaper publication works. Replication actually uses the metaphor in publishing.

Here are the main components of replication:

  • Publisher: This is the source database. It is where we need to replicate the data from. Your other data store is not SQL Server? No problem! You can use an Oracle database as a source.
  • Subscriber: This is the recipient or the target database. A subscriber can turn to be a publisher as well.
  • Distributor: In newspaper publishing, the publisher needs a distributor to distribute its publication to its subscriber. In replication, a distributor handles the command that is executed on the subscriber.
  • Publications: In the newspaper publishing metaphor, this is the actual newspaper. Publications in replication contain common objects that are to be propagated to the subscriber.
  • Articles: Just like a newspaper has articles in it, news, ads, editorial, essays, and many others, replication articles are objects that can be replicated from the source database to the target database such as functions, stored procedures, tables, views, and index views.

There are actually other types of replication, aside from transactional replication, but we're not going to discuss all those types here. The other types of replications are:

  • Snapshot replication
  • Peer-to-peer transactional replication
  • Merge replication
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.139.42