官术网_书友最值得收藏!

Understanding Transactional Replication

In this section, we'll look at how transactional replication works. The following diagram describes how transactional replication works:

Figure 2.1: Transactional replication example

This diagram shows the AdventureWorks database being replicated using transactional replication. Once transactional replication is configured, the snapshot agent, log reader agent, and distribution agent are created as part of the replication. The agents then work together, as described here, to replicate the transactions.

The snapshot agent is used once to initialize the subscriber database schema with that of the publisher. This isn't shown in the diagram, however, it's the first thing that happens when the transactional replication starts.

The subscriber database can be initialized using the publisher database backup, which is covered later in this lesson.

Once initialized, the transactions are replicated as follows:

  • Steps 1 and 2: The log reader agent continuously scans for committed transactions in the publisher database transaction log and inserts the transactions to be replicated into the distribution database.

    The log reader agent is at the distributor or at the publisher if the publisher acts as its own distributor.

  • Steps 3 and 4: The distribution agent reads the transactions from the distribution database and applies them to the subscriber. The distribution agent is at the distributor if it's a push subscription and at the subscriber if it's a pull subscription.
主站蜘蛛池模板: 大埔区| 陆丰市| 仪陇县| 玉门市| 洛扎县| 田东县| 政和县| 伊宁县| 南乐县| 通州区| 兴业县| 资中县| 湾仔区| 全椒县| 乐都县| 吉安市| 和田市| 调兵山市| 临朐县| 巴里| 新龙县| 滁州市| 泰和县| 阿拉善右旗| 剑川县| 山阴县| 揭西县| 墨竹工卡县| 大冶市| 郁南县| 阿拉善左旗| 棋牌| 武邑县| 克东县| 宣化县| 青岛市| 五寨县| 崇文区| 卫辉市| 东乡| 万盛区|