sql server 复制_SQL Server复制配置:点对点和合并复制

sql server 复制

This article will cover SQL Server replication configuration including Peer to peer replication and merge replication, initial configuration, adding nodes and data verification.

本文将介绍SQL Server复制配置,包括对等复制和合并复制,初始配置,添加节点和数据验证。

配置对等SQL Server复制 (Configuring Peer to Peer SQL Server Replication)

SQL Server Peer to Peer replication is a replication type where the publisher server replicates data to multiple subscriber servers at the same time.

SQL Server对等复制是一种复制类型,其中发布服务器将数据同时复制到多个订阅服务器。

Peer to peer SQL Server replication is useful for multiple data center locations across the globe. One centralized data center manages the data on the other datacenter data.

对等SQL Server复制对于全球多个数据中心位置非常有用。 一个集中式数据中心管理其他数据中心数据上的数据。

先决条件 (Pre-requisites)

Before configuring SQL Server replication, we need to sync the database which needs to replicate, with all other nodes. We will make the database in sync with other peer nodes by taking a backup of the database on the publisher server and restore it on the peer nodes.

在配置SQL Server复制之前,我们需要将需要复制的数据库与所有其他节点同步。 通过在发布服务器上备份数据库并将其还原到对等节点上,我们将使数据库与其他对等节点同步。

After restoring the database on the peer nodes, there should not any changes in the published database before configuring SQL Server replication; otherwise, it may occur conflict. If there are any data changes in the database, then we need to take a new backup and specify a new backup file path.

在对等节点上还原数据库之后,在配置SQL Server复制之前,发布的数据库中不应有任何更改; 否则,可能会发生冲突。 如果数据库中有任何数据更改,那么我们需要进行新的备份并指定新的备份文件路径。

We will use the following server configuration to configure Peer to Peer replication-

我们将使用以下服务器配置将点对点复制配置为-

  • SQL1 – The Publisher SQL1 –发布者
  • SQL2 – The Subscriber act as a 1SQL2 -认购充当1 st peer node 对等节点
  • SQL3 – The Subscriber act as a 2SQL3 –订阅服务器充当nd peer node 第二个对等节点
  • Database – AdventureWorksLT2012 数据库 – AdventureWorksLT2012

配置发行版 (Configure the Distribution)

In the Peer to Peer replication, we need to configure the Distribution database on all the peer nodes.

在点对点复制中,我们需要在所有对等节点上配置分发数据库。

Note: Configure the Distribution database on all the peer nodes in the same way as per the Steps PART-1 Configure the Distribution from the SQL Server replication: Configuring Snapshot and Transactional Replication article.

注意: 按照与步骤 PART-1配置 SQL Server复制中 的分发 相同的方式在所有对等节点上配置分发数据库 :配置快照和事务复制

对等节点上的数据库备份还原 (Database backup restore on the peer nodes)

Once the distribution database configured on each node, before setting the publication on the SQL1, we need to restore the backup of the published database AdventureWorksLT2012 on each peer nodes. Once a backup is restored, we will proceed to configure the Publication.

在每个节点上配置了分发数据库之后,在SQL1上设置发布之前,我们需要在每个对等节点上还原已发布数据库AdventureWorksLT2012的备份。 恢复备份后,我们将继续配置发布。

配置发布者 (Configure the Publisher)

  1. New Publication and新出版物,然后 Select 选择 New Publication 新出版物
  2. Peer-to -Peer publication as a publication type and click 对等发布”作为发布类型,然后单击“ Next 下一步”。



    SQL Server replication - New publication wizard

  3. Next, kindly proceed to the next steps as per the standard configuration steps of the publication as per PART-2 Configure the Publisher from the SQL Server replication: Configuring Snapshot and Transactional Replication article
  4. 接下来,请按照PART-2的发布的标准配置步骤继续进行下一步,从SQL Server复制中配置 发布者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值