I have a merge replication setup. for simplicities sake lets say the
publication has 4 articles(tables). The publishing database has 6
articles(tables). All 6 tables exist both at the publisher and subscriber
from previous repl setups. I make the publcation with the 4 articles...
create the new subscription and initialize it... including schema. Then a
few days later I realize I need to add those other 2 tables to this
publication. Currently the 2 tables on the subscriber end have data in them
and the one on the publishers end has no data. I wanted to add the 2 new
articles but bring back the subscriber data into the emtpy publisher's
table. I did not even know if I could add articles to an existing merge
publication without first dropping subscriptions so I figured I would just
try and EM would tell me if I couldn't. So, it did let me add the articles.
I created a new snapshot containing the new articles and performed a
reinitialize choosing to 'upload the changes at the subscriber before
reinitializing'... expecting the data in the 2 new tables to come back. The
data did not come back. I had empty tables on both ends after the
reinitialization took place. I'm sure that was supposed to happen, I just
didn't know it.
So what I need is to fully understand what data can actually come back from
the subsciber using this option upon a reinitialization? requirements?
('upload the changes at the subscriber before reinitializing')
1) I believe what I had done did not work because those 2 new articles were
NOT a part of the original snapshot and therefore changes to them were not
being tracked... is that correct?
2) the only data that could be brought back from subscriber upon
reinitialization using the 'upload the changes at the subscriber before
reinitializing' option are changes to articles that were a part of the
snapshot that that subscriber was last initialized with? TRUE/FASLE?
3) continuing from 2)... and the purpose of this option is just to get data
from a subscriber that may have 'expired' do to a loss of connectivity to
the publisher for an extended period of time? TRUE/FALSE?
any info is greatly appreciated... thanks.
You are pretty much correct. The "Upload changes first..." option is for
uploading any changes at the Subscriber since the last synchronization.
When you choose to reinitialize the merge agent will first upload changes
since the last synch, then it will start applying the snapshot again. This
time since you've added that article to the publication (you should have to
make a new snapshot) the table at the subscriber side will be overwritten
with what is in the table at the publisher. When the article(table) is
added to the publication you also tell it what to do in the case of
reinitializing (drop, truncate, etc...).
If you are familiar with scripting you could use the sp_addscriptexec stored
procedure to make a script to be propagated to the subscriber in order to
upload the data that exists there to the publisher table. These scripts are
run before anything else I believe when a synch is performed. If you are
using sp_addmergearticle to add the article to the publisher there is a
parameter @.creation_script that you might be able to use to upload the data.
I haven't done this but maybe it gives you a few ideas.
hope it helps,
nate
"djc" <noone@.nowhere.com> wrote in message
news:eIskd73XEHA.1144@.TK2MSFTNGP10.phx.gbl...
> I have a merge replication setup. for simplicities sake lets say the
> publication has 4 articles(tables). The publishing database has 6
> articles(tables). All 6 tables exist both at the publisher and subscriber
> from previous repl setups. I make the publcation with the 4 articles...
> create the new subscription and initialize it... including schema. Then a
> few days later I realize I need to add those other 2 tables to this
> publication. Currently the 2 tables on the subscriber end have data in
them
> and the one on the publishers end has no data. I wanted to add the 2 new
> articles but bring back the subscriber data into the emtpy publisher's
> table. I did not even know if I could add articles to an existing merge
> publication without first dropping subscriptions so I figured I would just
> try and EM would tell me if I couldn't. So, it did let me add the
articles.
> I created a new snapshot containing the new articles and performed a
> reinitialize choosing to 'upload the changes at the subscriber before
> reinitializing'... expecting the data in the 2 new tables to come back.
The
> data did not come back. I had empty tables on both ends after the
> reinitialization took place. I'm sure that was supposed to happen, I just
> didn't know it.
> So what I need is to fully understand what data can actually come back
from
> the subsciber using this option upon a reinitialization? requirements?
> ('upload the changes at the subscriber before reinitializing')
> 1) I believe what I had done did not work because those 2 new articles
were
> NOT a part of the original snapshot and therefore changes to them were not
> being tracked... is that correct?
> 2) the only data that could be brought back from subscriber upon
> reinitialization using the 'upload the changes at the subscriber before
> reinitializing' option are changes to articles that were a part of the
> snapshot that that subscriber was last initialized with? TRUE/FASLE?
> 3) continuing from 2)... and the purpose of this option is just to get
data
> from a subscriber that may have 'expired' do to a loss of connectivity to
> the publisher for an extended period of time? TRUE/FALSE?
> any info is greatly appreciated... thanks.
>
|||yes, it does help. Thank you.
"nate axtell" <naxtell at progeny dot net> wrote in message
news:OVsFx0CYEHA.1684@.tk2msftngp13.phx.gbl...
> You are pretty much correct. The "Upload changes first..." option is for
> uploading any changes at the Subscriber since the last synchronization.
> When you choose to reinitialize the merge agent will first upload changes
> since the last synch, then it will start applying the snapshot again.
This
> time since you've added that article to the publication (you should have
to
> make a new snapshot) the table at the subscriber side will be overwritten
> with what is in the table at the publisher. When the article(table) is
> added to the publication you also tell it what to do in the case of
> reinitializing (drop, truncate, etc...).
> If you are familiar with scripting you could use the sp_addscriptexec
stored
> procedure to make a script to be propagated to the subscriber in order to
> upload the data that exists there to the publisher table. These scripts
are
> run before anything else I believe when a synch is performed. If you are
> using sp_addmergearticle to add the article to the publisher there is a
> parameter @.creation_script that you might be able to use to upload the
data.[vbcol=seagreen]
> I haven't done this but maybe it gives you a few ideas.
> hope it helps,
> nate
> "djc" <noone@.nowhere.com> wrote in message
> news:eIskd73XEHA.1144@.TK2MSFTNGP10.phx.gbl...
subscriber[vbcol=seagreen]
a[vbcol=seagreen]
> them
just[vbcol=seagreen]
> articles.
> The
just[vbcol=seagreen]
> from
> were
not[vbcol=seagreen]
> data
to
>
Tuesday, March 20, 2012
reinitialization using option to bring back subsriber changes first
Labels:
articles,
back,
database,
merge,
microsoft,
mysql,
oracle,
publishing,
reinitialization,
replication,
sake,
server,
setup,
simplicities,
sql,
subsriber,
tables,
thepublication
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment