SQL 复制中的同步在手动同步时有效,但不能自动同步
我使用 SQL Server 2005 创建主数据库的复制副本,以便报告可以指向复制副本,而不是锁定我们的主数据库。
我已经将 3 个数据库设置为出版物,然后 3 个订阅者将交易转移给订阅者,我希望能立即完成!
似乎发生的情况是,当使用“插入跟踪器”功能时,复制将发布者带到分发者< 2 秒,但复制到订阅者可能需要 7 分钟以上(这些是 SAN 上的本地数据库)。这可能有两个原因:
- 用于查询数据库的 SQL 语句正在获取锁,从而阻止更新订阅者的事务。
- 订阅者太忙,无法进行复制以应用更改。
似乎更让我困扰的是,虽然复制监视器/插入跟踪器显示了这些统计信息,但如果您使用“查看订阅详细信息”,然后单击“开始”,它将在几秒钟内同步。
我的目标是让数据同步(理想情况下)连续同步,或者每分钟同步一次,也许我应该减少事务的批量大小?
我做错了什么?
[请注意,-Continuous 标志已设置!]
I'm using SQL Server 2005 to create a replication copy of the main databases, so that the reports can point to the replication copy instead of locking out our main databases.
I have set up the 3 databases as publications and then 3 subscribers moving the transactions over to the subscribers, instantaneously I hope!
What seems to be happening is that when using the "Insert Tracer" function, replication take publisher to distributor < 2 seconds, but to replicate to the subscribers can take over 7 minutes (and these are local databases on a SAN). This could be for 2 reasons:
- The SQL statements used to query the database are obtaining locks which are stopping the transactions updating the subscribers.
- The subscribers are just too busy for the replication to apply the changes.
What seems to trouble me more, is that although the Replication Monitor / Insert Tracer are showing these statistics, if you use the "View Subscription Details" and then click Start, it will sync within seconds.
My goal would be to have the data syncing (ideally) continuously, or every minute, perhaps I should reduce the batch size of the transactions?
What am I doing wrong?
[Note that the -Continuous flag is set!]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番调查后,我注意到典型的本地发布/订阅作业每个订阅有 3 个任务:
这与以下作业相关:
(3) 配置为每天运行一次。由于这是推送模型,我希望它能够持续运行,但事实并非如此。命名约定是:
我希望这对那里的人有帮助
After some investigating, I noticed that a typical Local Publication/Subscription jobs have 3 tasks per subscription:
This related to the following jobs:
(3) was configured to run once a day. Since this was a push model, I expected it to run continuously, but this was not the case. The naming conventions were:
I hope this helps someone out there