简体   繁体   English

SQL Server 2008复制而无需重新初始化

[英]SQL server 2008 replication without reinitialize

I have two databases in different servers - center_db on siglv01\\sql2008 and center_db on sig\\sql2008 . 我在不同的服务器上的两个数据库- center_dbsiglv01\\sql2008center_dbsig\\sql2008

Can I restart replication without needing to reinitialize it? 我可以重新启动复制而无需重新初始化它吗? The connection dropped more than 3 days ago and is now too slow: so I want to start replication without a reinitialize. 连接已在3天前断开,但是现在太慢了:所以我想在不进行重新初始化的情况下开始复制。

Based on the brief conversation above, I don't think you can do this without a re-init. 根据以上简短的讨论,我认为您无需重新初始化就无法执行此操作。 Specifically, the distribution database only keeps so many commands before it starts trimming. 特别是,分发数据库在开始修剪之前仅保留了这么多命令。 The default is 72 hours. 默认值为72小时。 If the last command delivered to all of your subscribers is older than that, the distribution database doesn't have what it needs to play forward all of the activity that has happened since then. 如果传递给所有订阅者的最后一个命令早于该命令,则分发数据库将没有所需的内容来转发此后发生的所有活动。

Your only hope would be if the distribution agent is still running (it knows when the above situation happens and will give you an error saying as much). 您唯一的希望是分发代理程序是否仍在运行(它知道何时发生上述情况,并且会给您一个错误的提示)。 If so, try to figure out why delivery is slow (troubleshoot this like any other "slow application"; replication isn't magic) and see if it can get caught up that way. 如果是这样,请尝试弄清楚交付缓慢的原因(像其他任何“缓慢的应用程序”一样对它进行故障排除;复制不是魔术),并查看它是否可以被这种方式赶上。 Depending on how many commands are remain undelivered, it may be faster to just re-init. 根据仍未发送的命令数量,重新初始化可能会更快。

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

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