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

发布于 2024-08-12 09:53:31 字数 621 浏览 4 评论 0原文

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

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

  1. 有什么方法可以将表中的现有列添加到复制中 无需重新初始化整个 出版物
  2. 您可以只选择特定文章而不是全部文章来重新初始化吗 出版物中的文章数量?

(我对复制有点陌生......试图跟上速度,所以如果我的术语没有意义,我很抱歉)

现在我们有大约 30 个出版物,因此如果有任何需要重新初始化,影响也很小...因为我们的几张桌子都非常大。我们希望只发表几篇文章。

任何想法将不胜感激。

更新

当我们尝试向文章添加列时,我们会收到以下消息:

您已更改一个或多个 需要所有属性 要重新初始化的订阅。 保存这些更改标记每个 支持自动订阅 重新初始化 重新初始化 从下次的快照 分发代理运行。你必须跑 快照代理生成 快照。

我们希望避免重新初始化所有订阅...我们正在使用事务复制...我们再次希望将现有列添加到现有发布中,而不必重新初始化所有订阅。

I'm trying to determine if there's a better way to handle replication than the way we're currently doing things.

We're essentially trying to determine 2 things:

  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?

(I'm a bit new to replication... trying to get up to speed, so I apologize if my terminology doesn't make sense)

Right now we have about 30 publications so that if any have to be reinitialized there's a minimal impact... because several of our tables are pretty massive. We'd prefer to only have several publication.

Any ideas would be greatly appreciated.

Update

When we try to add a column to an article we receive the message:

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.

We want to avoid reinitializing all subscriptions.. we're using transactional replication... again we want to add an existing column to an existing publication without having to reinitialize all subscriptions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我三岁 2024-08-19 09:53:31

什么样的复制?快照、合并、跨机构、点对点?

1)是的。请参阅对发布数据库进行架构更改

  • 向表中添加新列并
    将该列包含在现有的
    发布,执行 ALTER TABLE
    添加 。默认情况下,
    然后将列复制到所有列
    订阅者。该列必须允许
    NULL 值或包含默认值
    约束。
  • 将现有列包含在
    现有出版物、使用
    sp_articlecolumn (Transact-SQL),
    sp_mergearticlecolumn (Transact-SQL),
    或出版物属性 -
    对话框。

2) 这取决于复制类型。请参阅重新初始化订阅

重新初始化订阅涉及
应用一个或多个的新快照
向一个或多个订阅者发布的文章:
事务和快照复制
允许个别文章
重新初始化;合并复制
要求所有文章都
重新初始化

What kind of replication? Snapshot, Merge, Transacitonal, Peer-to-Peer?

1) Yes. See 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) It depends on the replication type. See 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
.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文