Groups | Blog | Home
all groups > sql server replication > december 2003 >

sql server replication : HELP!!! Error when reinitializing publication subscription


Greg Simpson
12/31/2003 10:24:28 AM
HELP!

I have just taken over mgmt of a SQL Server warehouse
architecture that uses replication to propogate changes
from a staging server to a production server. The
replication has been broken since 04 Dec. When attempting
to reinitialize the subscription, SQL tells me that I must
drop and recreate the subscription. The 2 DBs are not that
much out of synch, so I don't want to do a full resynch
with bulk copy if it can be avoided (they are huge).
However, when I recreate the subscription with "generate
scripts and copy data" radio button OFF, I get the
following error:

Violation of PRIMARY KEY
constraint 'PK__@snapshot_seqnos__39924EC9'.
Cannot insert duplicate key in object '#389E2A90'.

I've researched and determined that the constraint in
question is against a temp table declared in the
replication SPs which run to begin the reinit process.
I've searched the MS knowledgebase with no significant
hits. The server is up to date on maint.

Any help with this would be much appreciated!!!

Raymond Mak [MSFT]
12/31/2003 5:09:15 PM
Greg, this is a known issue, please contact PSS for a QFE.

-Raymond
[quoted text, click to view]

Hilary Cotter
12/31/2003 7:55:24 PM
reboot your sever. Drop the subscriptions and then do a resync with the
option the subscriber already has the schema and data.

I would also try to do some binary checksum analysis against your tables to
see which rows if any are out of sync.

[quoted text, click to view]

Kevin J.
1/2/2004 7:25:09 AM
Hi Hilary,

I had a same problem that Greg had. It seems the option of
subscriber already has the schema and data has never
worked. Every time when I have to re-sync the database I
have to initialize the schema and data, which means I must
to create a new snapshot image to get the replication
process work.

I would really like to know how you did it and what
special (or advanced) options that you have to set to get
this work.

Thanks.

Kevin J.
[quoted text, click to view]
peter.hills NO[at]SPAM rciap.com
1/4/2004 11:15:41 PM
Any chance of the details of the Miocrosoft KB article number that we
can quote to Microsoft PSS for the fix for this?


Thanks

Peter



[quoted text, click to view]
AddThis Social Bookmark Button