I must have a fundamental lack of understanding here as i can't believe
setting replication up can be so hard!
I'm setting up transactional replication, SQL 2000. I want to replicate a
whole database but for the moment i'm trying to get it working with one
table (or any combination of tables!). I've chosen push subscription.
The snapshot agent runs ok, generating a snapshot of all the required
articles. When i start the distribution agent to push out the subscription i
always get an error. I think its because of the settings in table article
properties (what to do 'If a table named xxx exists at the Subscriber').
But no matter what i do there is always a problem. If i say keep the
existing data unchanged then i get a duplicate primary key error (why does
it try to re-insert the rows again?). If i get rid of the existing data in
whatever way it doesnt work because of referential integrity rules. I tried
doing all tables at once (all the tables that have constraints between one
another) but that has no effect.
All i want to do is update the table(s) with any changes... can't be that
hard surely?
Paul
Paul Ibison wrote:
> Paul,
> leaving the table as it is can be used if you are
> replicating to a different tablename. As far as I can tell
> for your requirements, you should choose to drop the
> existing table (if you really want to leave the table
> there as it has the same data as the publisher, then try a
> nosync initialization.)
> HTH,
> Paul Ibison
Thanks Paul, I seem to have got it working now anyway... and after messing
about with this for 2 days an hour after i posted this message.. typical!
I changed the article snapshot setting to "delete data in the existing table
that matches the row filter statement" and that has done the trick. I
expected to have to type in SQL to select all the rows in the table but i
didn't have to. So what filter statement its using i have no idea! But it
works anyway!!
2012年2月9日星期四
Basic replication problem
标签:
basic,
believesetting,
cant,
database,
fundamental,
hardim,
lack,
microsoft,
mysql,
oracle,
replication,
server,
setting,
sql,
transactional,
understanding
订阅:
博文评论 (Atom)
没有评论:
发表评论