Tuesday, March 6, 2012

about transaction replication initialization

Hi Guys,
In transaction replication, before seting up the replication, do we need to
keep same copy for Publisher and Subscriber. That is mean do we need to
create all objects in Subscriber database which need to replicate from
Publisher in advance or I don't need to create and init snap shot will create
those objects in Subscriber. for example, if I want to replicate a table, do
I neet to create this table in Subscriber ahead? Or init snap shot agent
will do that. Thanks.
By default, there is no requirement to create anything on the subscriber. It
is sometimes beneficial to do a nosync initialization, in which case what
you are saying is pertinent, but this is usually because the snapshot files
are so large and/or the data already exists onthe subscriber so we take
advantage of it.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Thank you very much. But I have other question is: I have test replication
environment, where it was worked fine. But after I delete one table in
subscriber, it causes error that the table in subscriber is not existed. why
it was not created again automately? Thanks.
"Paul Ibison" wrote:

> By default, there is no requirement to create anything on the subscriber. It
> is sometimes beneficial to do a nosync initialization, in which case what
> you are saying is pertinent, but this is usually because the snapshot files
> are so large and/or the data already exists onthe subscriber so we take
> advantage of it.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||It isn't really designed for you to be editing the subscriber's schema in
this way. To reinitialize this table, drop the subscription to the table
then drop the article. Add the article then add the subscription, start the
snapshot agent and it'll be sent over.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Hello Iter,
Schemas are not maintained but rather are modified when the schema at the
publisher changes.
It is assumed schema changes will not be modified at the subscriber.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
[vbcol=seagreen]
> Thank you very much. But I have other question is: I have test
> replication environment, where it was worked fine. But after I delete
> one table in subscriber, it causes error that the table in subscriber
> is not existed. why it was not created again automately? Thanks.
> "Paul Ibison" wrote:
|||Thank you guys. If I want to modify the schemas in the publisher, e.g. add
new columns, how can I make changes in subscriber to make them identical?
Thanks
"Simon Sabin" wrote:

> Hello Iter,
> Schemas are not maintained but rather are modified when the schema at the
> publisher changes.
> It is assumed schema changes will not be modified at the subscriber.
> Simon Sabin
> SQL Server MVP
> http://sqlblogcasts.com/blogs/simons
>
>
>
|||It largely depends on what version of SQL Server you are currently using.
There is also a difference between altering a table's existing column and
adding or dropping columns. For the latter on SQL Server 2000 please take a
look at sp_repladdcolumn/sp_repldropcolumn. For SQL Server 2005 or changing
existing columns please take a look at these articles:
http://www.replicationanswers.com/AddColumn.asp
http://www.replicationanswers.com/AlterSchema2005.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

No comments:

Post a Comment