Thursday, March 22, 2012

Changing the data schema in Transactional replication

I am using concurrent snapshot - transactional replication. If I need to add
the column to the replicated table, do I need to drop and re-create
subscription everytime? The database is about 20Gb, it takes up to 4 hours to
re-create two subscriptions. Is there any easier way of changing the data
schema with this configuration?
Please look at sp_repladdcolumn in BOL. If you are using SQL Server 2005,
ALTER TABLE will do it.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Nope, it will not help. The column need to be added into the table through
differnet software and then populated. I was doing drop article -
subscribtion then addarticle- subscription. But I had tables locked during
the snapshot creation. Then I unchecked the tables lock and received
concurrent snapshot. Drop article-subscription wokrs well, then add article
works too, but then when I add this article to the subscription I receive an
error message: needed to specify all articles? what about if I have about
100 tables-articles?
"Paul Ibison" wrote:

> Please look at sp_repladdcolumn in BOL. If you are using SQL Server 2005,
> ALTER TABLE will do it.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||Please can you post up the entire error message. Also, in order for me to
repro, can you tell me if there are any extra parts to the setup eg
anonymous subscribers that I need to know about. In fact, can you script out
the publication and I'll set up something similar tomorrow.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

No comments:

Post a Comment