我在不同位置有两个SQL Server数据库,我想做类似复制的事情. 这是我的情况: 在第一个数据库中,我有一个具有以下结构的表:
I have two SQL server databases in different locations.I want to do something like replication. this is my scenario: In the first data base I have a table with following structure:
tbl_worker _Name nvarchar(10) family nvarchar(20) State int city int在第二个数据库中,我有下表:
and in second data base I have following table:
tbl_employee _Name nvarchar(20) family nvarchar(15) Address nvarchar(30) Tell nvarchar(14) State int city int如您所见,我在两个不同数据库中的表结构是不同的. 但我只想复制State and city字段. 如果必须更改在第一个数据库中更改的第一个数据库中的state and city,反之亦然. 我该怎么做?我可以复制吗?
as you see the structure of my tables in two different data bases are not the same. but I want to replicate just State and city fields. if the state and city in the first data base changed in second data base must be changed and vice versa. How can I do it? Can I do it with replication and how?
推荐答案定义文章时,必须将@vertical_partition参数设置为true,然后使用sp_articlecolumn添加所需的列.
When you define the article, you'll have to set the @vertical_partition parameter to true and then add the columns that you want with sp_articlecolumn.
更多推荐
如何复制具有不同结构但相同字段的两个表?
发布评论