November 18, 2007 at 12:53 pm
I am doing replication of a DB and certain tables, all without primary keys, will not replicate, the ones with PK does replicate and I get the following error from SQL...
This table cannot be published because it does not have a primary key column. Primary key columns are required for all tables in transactional publications.
Is there any way around this? Why does it need a primary key for each table to replicate?
I'm thinking maybe a non transactional publication? What do you think?
Thanks
November 19, 2007 at 12:12 am
For transactional replication, there must be a way to uniquely identify each row of a replicated table, so that, when changes to a row are replicated to the subscribers, there's no doubt as to which row the change must be applied.
Snapshot replication, since it just copies tables as they appeared at a specific point, does not have this requirement.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 19, 2007 at 7:36 am
You should have a primary key in any case. Even a surrogate to allow you to get to every row.
November 19, 2007 at 8:13 am
I would not replicate any thing unless you are using Pkeys.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply