Thursday, March 22, 2012

Adding a column to tables in merge replication.

Hi, we need to add a column to the table that is used as the subscriber table
in a merge replication, will this break the replication.
We also need to add a column to the table that is used as the publisher
table in a merge replication, will this also break the replication?
Thanks,
Pingx
You should not touch the subscriber tables - they will be locked and you
will be unable to make modifications to them.
Use sp_repladdcolumn to add the column in SQL 2000. In SQL 2005 is the
replicate_ddl statement is set to true table modifications will be
replicated.
http://www.zetainteractive.com - Shift Happens!
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Pingx" <Pingx@.discussions.microsoft.com> wrote in message
news:2E4682B7-BD3D-4765-984F-2EC1A83C3BD0@.microsoft.com...
> Hi, we need to add a column to the table that is used as the subscriber
> table
> in a merge replication, will this break the replication.
> We also need to add a column to the table that is used as the publisher
> table in a merge replication, will this also break the replication?
> Thanks,
> Pingx
|||I used the statement
ALTER TABLE table_name ADD <column> at the publisher.
It got replicated to the subscriber.
Is this OK? do I need to use replicate_ddl statement ?
Thanks.
Pingx
"Hilary Cotter" wrote:

> You should not touch the subscriber tables - they will be locked and you
> will be unable to make modifications to them.
> Use sp_repladdcolumn to add the column in SQL 2000. In SQL 2005 is the
> replicate_ddl statement is set to true table modifications will be
> replicated.
> --
> http://www.zetainteractive.com - Shift Happens!
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Pingx" <Pingx@.discussions.microsoft.com> wrote in message
> news:2E4682B7-BD3D-4765-984F-2EC1A83C3BD0@.microsoft.com...
>
>
|||It appears that you are using SQL 2005 where replicate_ddl is enabled by
default.
http://www.zetainteractive.com - Shift Happens!
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Pingx" <Pingx@.discussions.microsoft.com> wrote in message
news:1991127A-39EC-492C-8FBE-EAAB44EE0C3C@.microsoft.com...[vbcol=seagreen]
>I used the statement
> ALTER TABLE table_name ADD <column> at the publisher.
> It got replicated to the subscriber.
> Is this OK? do I need to use replicate_ddl statement ?
> Thanks.
> Pingx
> "Hilary Cotter" wrote:

No comments:

Post a Comment