Transaction Replication setting Identity Property and Triggers

  • Guys,

    I am setting up the transaction replication for that I have update the identity property to set 'Not for Replication' to Yes by using the following.

    EXEC sp_msforeachtable @command1 = '

    declare @int int

    set @int =object_id("?")

    EXEC sys.sp_identitycolumnforreplication @int, 1'

    on the same token how can set the triggers to allow replication so that when record is inserted on subscriber database the trigger does not fire.

    Any suggestions and inputs would help.

    Thanks

  • The CREATE/ALTER TRIGGER statement has a "Not for Replication" clause. Just add this to your triggers.

    [font="Verdana"]Markus Bohse[/font]

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

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