all groups > sql server replication > july 2004 >
You're in the

sql server replication

group:

Basic replication problem


Basic replication problem Paul Ibison
7/28/2004 3:44:36 AM
sql server replication:
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
Basic replication problem Paul
7/28/2004 11:28:43 AM
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

Re: Basic replication problem Paul
7/28/2004 12:43:39 PM
[quoted text, click to view]

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!!

AddThis Social Bookmark Button