Replication and Triggers

  • Hello,

    I have setup a Merge Replication between Server 1 and

    Server 2. There are only 2 tables(TableA & TableB)

    involved in this Replication. Both Tables are created

    with IDENTITY PROPERTY SET with NOT FOR REPLICATION option.

    TableA is populated directly (thru a GUI), whereas TableB

    is populated based on an Update Trigger on TableA.

    Replication works fine, unless an update happens on

    TableA. Whenever an update happens on TableA. TableB is

    populated with

    some big IDENTITY value which does not conforms to the

    INCREMENT value set for the table(TableB). Can anyone

    tell me why it happens and how to avoid it.

    I am giving a summary of the setup:

    I have unchecked the USER Trigger option during the Merge

    Replication Setup(i.e. during New Publication creation)

    SERVER 1                  SERVER 2

    tableA(with trigger)    tableA(without trigger)

    tableB                      tableB

    Whenever UPDATE happens on tableA of SERVER 1,

    tableB next IDENTITY value conforms to the INCREMENT

    rule.

    However when UPDATE happens on tableA of SERVER 2

    tableB next IDENTITY value misbehaves.

    I tried the same thing with the USER Trigger Option

    checked, but the problem is that the

    trigger is fired at both places(which I don't want)

    Kindly help me.

    Thanks in advance

    Anand

  • This was removed by the editor as SPAM

  • is the trigger set up with "NOT FOR REPLICATION" option?

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

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