sql-server - SQL Server 2008 复制(避免重新初始化)

标签 sql-server sql-server-2008 replication

我正在尝试确定是否有比我们当前的处理方式更好的方法来处理复制。

我们本质上是想确定两件事:

  1. Is there any way to add an existing column from a table to replication without reinitializing the whole publication
  2. 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/

相关文章:

sql-server - 使用连接从左表中获取所有数据

sql-server - 如果 SELECT 中的一个或多个链接服务器脱机,则链接服务器 SELECT UNION 结果

mysql - MaxScale 故障转移后,先前从属服务器上的主从配置将被重置

sql-server - 数据库优化顾问 - 为什么它没有给我结果?

java - 如何在 AEM 中以编程方式获取复制代理?

单台服务器上的 MySQL 复制

sql-server - 陷入排名算法

sql-server - 在 CONTAINSTABLE 中找不到接近的匹配项

sql-server - SQL Server 2005/2008 : Identify current user

sql - 将来自三个不同查询的数字加在一起