繁体   English   中英

如何在SQL Server2012中的对等复制中添加文章(表)

[英]how to add an article (table) to peer-to-peer replication in sql server2012

我已经在2个节点之间配置了对等复制。 我已逐步按照以下说明进行操作: http : //www.databasejournal.com/features/mssql/article.php/3814591/Peer-to-Peer-Replication-in-SQL-Server-2008-150-Configure -a-两个节点topology.htm

然后我在向复制添加新文章(新表)时遇到了问题。 我已按照以下说明进行操作: http : //msdn.microsoft.com/zh-cn/library/ms146867.aspx

它可以工作,但是对于具有许多表更改的环境不切实际。 有谁知道更好的解决方案? 我想要一种快速自动的添加文章的方法。

更新:我已经添加了一个表到发布,只是sp_addarticle。 我没有停止并启动日志读取器代理。 它似乎有效。 以后会引起问题吗?

管理对等拓扑(复制Transact-SQL编程)中对此进行了介绍:

向现有配置添加文章

 1. Quiesce the system. 2. Execute the CREATE TABLE statement to add the new table at each node in the topology. 3. Bulk copy the data for the new table manually at all nodes by using the bcp utility. 4. Execute sp_addarticle to create the new article at each node in the topology. For more information, see Define an Article. After sp_addarticle is executed, replication automatically adds the article to the subscriptions in the topology. 5. Restart the Distribution Agents at each node in the topology. 

暂无
暂无

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

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