SQL Server Performance

Transactional Replication

Discussion in 'General DBA Questions' started by prabhabk, Apr 27, 2007.

  1. prabhabk New Member

    Hi Everyone,
    Can you please anyone tell me what is the SQL Server Internal Concept behind that can't replicate the tables which doesn't have the primary key.
    What way Primary key related with Transactional Replication.

    Any help would be Greatly appreciated.

    Thanks,
    Prabhakaran
    MS SQL Server DBA
  2. Adriaan New Member

    If your table does not have a primary key, then how do you expect to find a specific row in the data? You need to have a unique key for each row in a table, even without replication.

    It may be sufficient to have a unique constraint on a (set of) column(s), but in that case why not make life a lot easier by making that the primary key.
  3. MohammedU New Member

    quote:Originally posted by prabhabk

    Hi Everyone,
    Can you please anyone tell me what is the SQL Server Internal Concept behind that can't replicate the tables which doesn't have the primary key.
    What way Primary key related with Transactional Replication.

    Any help would be Greatly appreciated.

    Thanks,
    Prabhakaran
    MS SQL Server DBA
    What is your main requirement...

    You have to have PK to participate table in transactional replication...reason is to replicate the row based on constraint and to make sure you are updating and deleting correct row other wise you may end up with inconsistent and incorrect data...
    It is by desing...

    If your don't have the PK you can add one column with identity property...if you don't want to use identity column you can add GUID colum with default value NEWID()...


    MohammedU.
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.

Share This Page