• Hi Jay,

    Ok, we have restored the database and published one article (tblACNAcntCodes). The snapshot and creating the subscription worked fine.

    See below for the two triggers involved. AAAA is our own trigger and BBBB was added when we published the table.

    The "EXEC master.." was added to both triggers so we could log what happens.

    We use EM to change an existing record and we get the error:

    "Another user has modified the contents of this table or view; the database row you are modifying no longer exists in the database.

    Database error: '[Microsoft][ODBC SQL Server Driver][SQL Server]Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)."

    Nothing is in the event log so neither of the "Master exec.." statements fired.

    New records can be added in EM without error and they are correctly replicated to the subcriber. Any suggestions would be appreciated.

    Cheers, Peter

    AAAA----- This is our own trigger------------------------

    CREATE TRIGGER ACNUpdate ON dbo.tblACNAcntCodes

    FOR UPDATE

    NOT FOR REPLICATION

    AS

    DECLARE @ID nvarchar(50)

    SELECT @ID = ACNID from INSERTED

    UPDATE tblACNAcntCodes SET

    ACNUpdated = GETDATE(),

    ACNUpdateCount = ACNUpdateCount + 1

    WHERE ACNID=@ID

    EXEC master..xp_logevent 60000,'ACN Update Trigger', informational

    BBBB-----This is the trigger added at the Publisher when the---

    ----- table was replicated (exec master.. is our own addition--

    ------to this trigger -----------------------------------------

    CREATE trigger [sp_MSsync_upd_trig_tblACNAcntCodes_1] on [dbo].[tblACNAcntCodes] for update as

    declare @rc int

    select @rc = @@ROWCOUNT

    if @rc = 0 return

    if update (msrepl_tran_version) return

    update [dbo].[tblACNAcntCodes] set msrepl_tran_version = newid() from [dbo].[tblACNAcntCodes], inserted

    where [dbo].[tblACNAcntCodes].[ACNID] = inserted.[ACNID]

    EXEC master..xp_logevent 60000,'ACN Replication Trigger', informational