About Transactional Replication

  • Dear all,

    We just want to know why we need to have a primary key in order to implement transactional replication. Since it is going to use log file transactions to run the show

    why it is having the dependecy for primary key fo the table.

    Regards

    Kokila K

  • Transactional replication does not just re-apply T-SQL statements, it inserts, updates, and deletes records based on activity on these records. Yes, it gets this information from the transaction log, but it needs to be able to uniquely identity the records it must update. The only way it can uniquely identify each record is to have a primary key defined.

    This can be illustrated by creating a simply publication and subscription using all of the defaults. If you look at the subscriber, you will find that replication creates a stored procedure for inserting, updating, and deleting a record for each article. The update and delete procedures use the primary key to determine which record is being updated or deleted.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply