我正在尝试确定是否有比我们当前的处理方式更好的方法来处理复制。
我们本质上是想确定两件事:
- Is there any way to add an existing column from a table to replication without reinitializing the whole publication
- Can you just select a specific article to reinitialize instead of all of the articles in a publication?
(我对复制有点陌生......试图加快速度,所以如果我的术语没有意义,我深表歉意)
现在我们有大约 30 个出版物,因此如果需要重新初始化任何出版物,影响也很小......因为我们的几个表非常大。我们希望只发表几篇文章。
任何想法将不胜感激。
更新
当我们尝试向文章添加专栏时,我们会收到消息:
You have changed one or more properties that require all subscriptions to be reinitialized. Saving these changes marks each subscription that supports automatic reinitialization to be reinitialized from a snapshot the next time its Distribution Agent runs. You must run the Snapshot Agent to generate the snapshot.
我们希望避免重新初始化所有订阅...我们正在使用事务复制...我们再次希望将现有列添加到现有发布中,而不必重新初始化所有订阅。
最佳答案
什么样的复制?快照、合并、跨机构、点对点?
1) 是的。请参阅Making Schema Changes on Publication Databases :
- To add a new column to a table and include that column in an existing publication, execute ALTER TABLE ADD . By default, the column is then replicated to all Subscribers. The column must allow NULL values or include a default constraint.
- To include an existing column in an existing publication, use
sp_articlecolumn
(Transact-SQL),sp_mergearticlecolumn
(Transact-SQL), or the Publication Properties - dialog box.
2) 这取决于复制类型。请参阅Reinitializing a Subscription :
Reinitializing a subscription involves applying a new snapshot of one or more articles to one or more Subscribers: transactional and snapshot replication allow individual articles to be reinitialized; merge replication requires all articles to be reinitialized.
关于sql-server - SQL Server 2008 复制(避免重新初始化),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1800591/