Replication problem or "By design"?

  • 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

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You should have a primary key in any case. Even a surrogate to allow you to get to every row.

  • 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