SQL Server 2005 复制调试建议
我有一个复制设置,它昨天已启动并运行,现在我无法连接到分发服务器,我不知道为什么。
- 发布者位于域上,并通过 VPN 与订阅者(不在域上)进行通信。
- 我可以从订阅者处 ping 通发布者,反之亦然。
- 我可以从订阅者登录到发布者上的 MSSQL。
- 发布者处于错误状态,因为订阅者没有记录任何活动。
- 订阅者无法连接到分发者。
- 跟踪器令牌为分发者报告时间,但仅为订阅者报告待定时间。
- 假设第三方的数据库更改可能会造成麻烦,我删除了订阅和发布并重新创建了它们。
- 我可以确认昨天使用相同的表/用户帐户/服务器等复制正在工作并复制数据。
如果您有任何建议来尝试缩小问题范围,我们将不胜感激。
问题解答:
- 我正在使用单向事务复制
- 分发者与发布者位于同一台计算机上。
- 发布者和订阅者都是 2003 SP2
似乎又可以工作了
我仍然不知道为什么原来的工作设置停止工作。 但当我重新订阅时,我的其中一个连接的凭据错误。 通过纠正该问题,复制将再次正常工作。
I have a replication setup it was up and running yesterday, now I can't connect to the distributor and I don't know why.
- The publisher is on a Domain and talks to the subscriber (not on the domain) via VPN.
- I can ping the publisher from the subscriber and vice-versa.
- I can log in to MSSQL on the publisher from the subscriber.
- The publisher is in an error state because no activity is being logged from the subscriber.
- The subscriber can't connect to the distributor.
- Tracer tokens report a time for the distributor but only pending for the subscriber.
- Assuming db changes by a third person might be causing troubles, I deleted the subscription and the publication and recreated them.
- I can confirm that yesterday using the same tables/user accounts/servers etc the replication was working and replicating data.
If you have any suggestions to try to narrow down where the problem is, they would be most appreciated.
Answers to questions:
- I am using one way transactional replication
- The distributor is on the same machine as the publisher.
- Both the publisher and the subscriber are 2003 SP2
Seems to be working again
I still don't know why the original working setup stopped working. But when I re-subscribed I had the wrong credentials for one of the connections. By correcting that problem the replication is working once again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可以双向执行 T-SQL 吗? 你说订阅者无法连接到分发者,但是分发者可以看到两者吗? 分发器是在您的网络还是远程网络上? 我只是想知道分发器上的东西是否正在批量处理,并且断开连接是在分发器和订阅者之间,或者断开连接是否是发布者 -> 分发者,特别是如果所有三个都位于不同的服务器上。
只是从某个地方开始。
Can you execute T-SQL both directions? You say that the subscriber can't connect to the distributer, but can the distributer see both? Is the distributer on your network or the remote network? I'm just wondering if things are batching up on the distributer, and the disconnect is between there and your subscriber, or if the disconnect is publisher -> distributer, especially if all three are on different servers.
Just somewhere to start.
我从未需要调试日志读取器的问题,但经常需要调试订阅者的问题。 我要做的就是运行分发代理(我记得它被称为 distrib.exe ...那是因为我经常输入它!),并设置大量调试标志日志(我刚刚查找了BOL 并看到一个参数 OutputVerboseLevel。我不记得该参数名称,但它看起来似乎合理)。
您可以通过查找复制向导设置的作业定义来确定要向代理提供什么样的参数。其中一个步骤应该是“运行外部命令”,并且将包含一堆参数名称和值。
一旦我找到了适当的调用,我就把它保存在一个批处理文件中,然后每当出现无法从 GUI 调试的问题时就从 DOS 提示符运行它。
pjjH
I have never had to debug problems with the log-reader but often had to debug issues with the subscriber. What I would do is run the distribute agent (I remember it being called distrib.exe ... that is because I typed it in so often!) with a heck of a log of debugging flags set (I just looked up the docs on BOL and see an argument OutputVerboseLevel. I don't remember that argument name directly but it looks plausible).
You can figure out what kind of arguments to provide to the agent by looking up the job definition that was set up by the replication wizard .. one of the steps should be a 'run an external command' and that will have a bunch of the argument names and values.
Once I had figured out the appropriate invocation, I saved it in a batch file and would then run it from the DOS prompt whenever there was a problem that was not debuggable from the GUI.
pjjH