配置事物分发复制

环境如下

  1. testdb2为发布服务器, pub2为发布的数据库,发布其中的表ta
  2. testdb3为分发服务器,分发数据库为distribution
  3. testdb4为订阅服务器,订阅数据库为sub2

现在要建立从testdb4到testdb2的拉模式的订阅

  1. 三个数据库实例的启动账户和代理启动账户都是域账户(domain1\xxx),该域账户在OS没有显示授权,在SQLSERVER中也无法登陆,没有任何权限.
  2. 还有三个域账户,用于配置snapshot agent,log reader agent和 distribution agent
    1. domain1\snapshotAgentAdmin
    2. domain1\logreaderAgentAdmin
    3. domain1\distAgentAdmin.
    4. 如果想了解具体的权限配置参见 <Replication Agent Security Model> http://msdn.microsoft.com/en-us/library/ms151868.aspx
  3. http://www.cnblogs.com/stswordman/admin/file://testdb3/rep上的一个共享目录,用于存放snapshot产生的文件, domain1\snapshotAgentAdmin用于该目录的读写权限, domain1\distAgentAdmin拥有该目录的读权限

1

在分发服务器(testdb3)配置分发

请替换圈住的部分

 

配置账户相关

clip_image004_thumb[3]

在实际操作中,需要为distribution agent的帐号显示在distributor中创建登录。 这一点<Replication Agent Security Model>文档中并没有提到,如果略过,会出现无法正常同步的现象。 如果查看分发代理对应的作业的历史记录,会查看到如下信息:

 Agent message code 20084. The process could not connect to Distributor 'XXXXX'.

在distributor的errorlog也会找到distribution agent帐号登录失败的信息。

 从分发复制监视器中会出现一定数量的"未分发的命令"

 

 

2 配置发布服务器(testdb2)

image_thumb[2]

image_thumb[11]

image_thumb[19]

配置账户相关

clip_image010_thumb[1]

3 配置订阅(testdb4)

clip_image012_thumb[3]

账户相关

image

https://files.cnblogs.com/stswordman/configuration_REPL.zip

posted on 2011-04-07 22:42  stswordman  阅读(2004)  评论(4编辑  收藏  举报