Transactional Replication

  • Hi,

    I've implemented transactional replication (from publisher to subscriber only) between two databases on the same SQL Server instance.  The subscriber tables have triggers which insert details into another table which is not part of replication and which only exists on the subscriber.

    I've replicated about 8 tables with horizontal filtering on some of the tables.  Replication works perfectly on all of the tables but the subscriber trigger does not fire when replicating to one particular table, although the table is updated through replication.

    I can't think of any reason why this should happen as it works perfectly for all other tables.  The update trigger on the problem table does not use the WITH ENCRYPTION or NOT FOR REPLICATION commands.

    There is no information in the event log, SQL server logs or replication alerts which indicate that an error is occurring.

    I'm aware that triggers are disabled when the initial snapshot is being applied.  The snapshot agent has finished running so this cannot be the cause of the problem.

    I'm running SQL Server 2000 on Windows 2000 Server.

    Thanks

  • Depending of how you configured your publication, the snapshot might drop and recreate the tables at subscriber, so you should check after the snapshot is applied the all the triggers are created and enabled. You could also add a post snapshot script to automatically do this.

    If you are sure that the NOT FOR REPLICATION option is not affecting your trigger, and also that the trigger is enabled, then there is no reason for not to work. Maybe the error is in the code of the trigger wich isn't doing what you are expenting.

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

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