Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ozgunnew
Starting Member
13 Posts |
Posted - 2006-09-21 : 09:29:30
|
Hi;I am trouble again.How "not for replication" works?I mean i have one identity column (identity property is "Yes" not "Yes (Not for the replication)")But when replicating from publisher to subscriber new rowid is not assigned to data, original identity value of publisher is preserved. So primary key conflict occurs because subscriber has data having the same identity.I think that "not for replication" choice is required to do the job above. Why new rowid is not assigned to replicated new row inspite of i did not select "not for replication"?Thank you so much. |
|
Rishi Maini SQL2K5 Admin
Yak Posting Veteran
80 Posts |
Posted - 2006-09-21 : 11:41:57
|
Are you talking about "rowid" Column on the table (i.e the Identity Column that was created by you) or you are talking about the "rowguid" column that Merge Replication creates automatically on each Replicated Table.If its "rowguid" column then its needs to be same across each replica and this column is not the culprit, the problem should be with the identity column that you created in the table and yes recommended way is to mark the identity column "not for replication"ThanksRishi Maini |
|
|
ozgunnew
Starting Member
13 Posts |
Posted - 2006-09-21 : 14:56:38
|
I am talking about an ordinary identity column. If i do "NOT" mark it as "not for replication", how the behaviour should be.I was assuming that the value of identity column at subscriber to be last value at subscriber plus one, but i saw that this assumption is wrong. SQL Server tries to insert original value at the publisher so primary key conflict occurs. I think not for replication option should provide preserving original value.Thank you so much.. |
|
|
|
|
|