简体   繁体   English

SQL Server 2005复制调试建议

[英]SQL Server 2005 Replication Debugging Suggestions

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. 发布者在域上,并通过VPN与订户(不在域上)对话。
  • I can ping the publisher from the subscriber and vice-versa. 我可以从订阅服务器ping发布者,反之亦然。
  • I can log in to MSSQL on the publisher from the subscriber. 我可以从订阅服务器上登录发布服务器上的MSSQL。
  • 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 发布者和订阅者都是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. 通过更正该问题,复制可以再次运行。

Can you execute T-SQL both directions? 您可以双向执行T-SQL吗? 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. 刚开始的地方。

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). 我要做的是运行分发代理(我记得它被称为distrib.exe……这是因为我经常键入它!),并且带有调试标志集日志(我只是在上查找了文档) BOL,然后看到一个参数OutputVerboseLevel。我不记得那个参数名称了,但是看起来很合理。

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. 确定正确的调用后,将其保存在批处理文件中,然后在出现无法从GUI调试的问题时从DOS提示符下运行它。

pjjH pjjH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM