all groups > sql server replication > november 2003 >
You're in the

sql server replication

group:

replicate table with a timpstamp as part of primary key


replicate table with a timpstamp as part of primary key Thomas
11/6/2003 10:40:41 AM
sql server replication: Has anyone managed to replicate a table that has a
timestamp as part of its primary key?

We are able to replicate (snapshot, merge, transactional)
tables with timestamps and are aware of the issues with
that. However, it seams that when the timestamp is part of
the primary key, non of the replication methods work.

If you have managed to setup a replication with a table
with a combined primary key with one part of the primary
key a timestamp, please let me know how you did that.

Thanks,

Re: replicate table with a timpstamp as part of primary key Hilary Cotter
11/6/2003 8:36:12 PM
no, because a timestamp or rowversion column is incremented per database.
So the value of it on your publisher could be 1, while on the subscriber it
could be 23425654. So when your 1 value comes to the subscriber it is
replaced by a 23425654+1=23425655.

What you can do is have a timestamp on your publisher and then a
varbinary(16) (IIRC this is the equivalent datatype of the rowversion column
in SQL Server), on the subscriber.

It all depends on what you are trying to accomplish.
[quoted text, click to view]

AddThis Social Bookmark Button