请选择 进入手机版 | 继续访问电脑版

技术控

    今日:35| 主题:61447
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Configure One Way Merge Replication for SQL Server

[复制链接]
青春定格在小冰屋 发表于 2016-12-1 13:10:30
273 2
Problem

  We are using SQL Server Merge replication and we have a need to setup a one way publication. We needed Data Manipulation Language (DML) changes on the publisher to get replicated to one of the subscribers, but not from that subscriber to the publisher.  In this tip we look at how this can be done.
  Solution

  Here is what the environment looks like.  DB1 is the publisher database and DB2 and DB3 are subscriber databases. We have Merge replication already configured on DB1 and DB2 and the data needs to go both ways.  Now we need replicate data from DB1 to DB3 and not from DB3 to DB1.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-1-技术控-databases,already,needed,called,create

  Steps to Configure one way Merge SQL Server Replication

  Let's create a new SQL Server Merge publication called OneWay. Right click on Local Publications and select New Publication.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-2-技术控-databases,already,needed,called,create

  Select the DB1 database.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-3-技术控-databases,already,needed,called,create

  Add table and finish the wizard.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-4-技术控-databases,already,needed,called,create

  We need to add the subscriber to this publication, so right click on the publication and select New Subscription.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-5-技术控-databases,already,needed,called,create

  Select the publication.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-6-技术控-databases,already,needed,called,create

  Specify where the Merge Agent will run.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-7-技术控-databases,already,needed,called,create

  Select the subscriber and subscription database and finish the wizard.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-8-技术控-databases,already,needed,called,create

  Now Launch Replication Monitor, by right clicking on Local Publications and selecting Launch Replication Monitor.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-9-技术控-databases,already,needed,called,create

  Go to the All Subscriptions tab and select View Details.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-10-技术控-databases,already,needed,called,create

  Go to the Merge Agent Job Properties.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-11-技术控-databases,already,needed,called,create

   In the job you need to add -Exchange Type 2 to the command as shown below.
   

Configure One Way Merge Replication for SQL Server

Configure One Way Merge Replication for SQL Server-12-技术控-databases,already,needed,called,create

  Restart the Merge SQL Server Agent Job and one way Merge replication should now be configured.
  Next Steps

  
       
  • Please test in a QA environment first.   
  • Check out these other SQL Server Replication Tips .  
Last Update:  12/1/2016
廖莉 发表于 2016-12-4 12:36:22
这是一个KB的故事,当你在半夜12点的时候穿着黑色的衣服对着镜子用梳子梳下就会看到…头皮…屑!
回复 支持 反对

使用道具 举报

a3d88 发表于 2016-12-4 14:30:08
占位编辑
回复 支持 反对

使用道具 举报

我要投稿

推荐阅读


回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表