更改在 SQL Server 2008 R2 中复制的表 [英] Alter Tables that are replicated in SQL Server 2008 R2

查看:48
本文介绍了更改在 SQL Server 2008 R2 中复制的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个数据库,其中的一些表被复制了.
我们想将新行添加到表中,并将它们包含在复制中.
我们该怎么做?

We have two databases and some tables in them are replicated.
We want to add to table new rows and also include them in replication.
How can we do this?

示例:
我们有 [dbo1].Table1[dbo2].Table2,它们与所有列一起复制并具有相同的结构.
我们想向两个表添加新列 Column1 并将此列包含到复制中.

Example:
We have [dbo1].Table1 and [dbo2].Table2 that are replicated with all columns and have identically structure.
We want to add new column Column1 to both of the tables and include this column to replication.

推荐答案

文章 对发布数据库进行架构更改" 应涵盖您需要了解的大部分内容.与旧版本的 SQL Server 不同,您应该能够进行 DDL 更改(假设您没有取消设置复制默认值).

The article "Making Schema Changes on Publication Databases" should cover most of what you need to know. Unlike older versions of SQL Server, you should just be able to make the DDL changes (assuming you haven't unset the replication defaults).

如文章所述,您将无法使用 SSMS 进行这些更改.

As the article mentions, you won't be able to use SSMS to make these changes.

这篇关于更改在 SQL Server 2008 R2 中复制的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆