Log reader reads unwanted transactions in transactional replication

  • Hi,

    We have a transactional replication setup. where we are have horizontal filtering done on some columns. for eg. @filter_clause = <>.primary_key in (1,2,3,4, ... ). this leads to only (almost) half the table getting copied in initial snapshot. So the subscriber table needs only certain values from primary key of that table.

    now whenever there is an update on published table for a primary key which the subcriber does not need, this update/delete is picked up by log reader and then it fails at subscriber due to "error 20598: row was not found at the Subscriber when applying the replicated command". Currently I have used "Continue on data consistency errors" profile for Distributor agent, and have included error # 20598.

    having done that I have checked that inserts (for primary keys not in filetring criteria) are also going to subscriber.

    Is there a way where I can configure Log Reader agent to read logs based on the custom filtering criteria?

    Thanks in advance.

    Cheers,

    Amit

    -------------------------------------------------
    -Amit
    Give a man a fish and he'll ask for a lemon. Teach a man to fish and he wont get paged on weekends !! :w00t: - desparately trying to fish [/size]

  • i think the problem with primary key is a composite key and not used in filtering

    -------------------------------------------------
    -Amit
    Give a man a fish and he'll ask for a lemon. Teach a man to fish and he wont get paged on weekends !! :w00t: - desparately trying to fish [/size]

  • Is there any composite key involved in the filtering criteria?

     

    Cheers,

    Puneet

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

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