SQL Server Performance

Conditional Deletion in Replication

Discussion in 'SQL Server 2005 Replication' started by emreeves, Mar 30, 2006.

  1. emreeves New Member

    I am developing a transactional replication plan. I have one table
    that most of the time I do not want to replicate deletions. There is
    an exception to this rule. If the status_id of another table is false,
    then the deletion should be replicated.

    I have been having difficulty trying to put this condition in place. I
    have tried modifying the sp_MSdel_dboTable stored procedure. I have
    removed the if @@rowcount check and replication errors with the
    messages:


    -- Error executing a batch of commands. Retrying individual commands.


    Eventually, it will fail with the message: if @@trancount > 0 rollback
    tran


    Any ideas on how to get around this issue?


    Publisher: SQL 2000
    Distributor: On a separate server
    Subscriber: SQL 2005


    Thanks for any help I can get.


Share This Page