Transaction replication errors on sync

  • I setup transactional replication between SQL 2000 (Publisher, local distributor) and SQL 2005 (Subscriber).

    Run into error after completed the initial snapshot:

    {CALL sp_MSins_t_ReportImages (15, N'tt25234963', N'DataPlot_001', N'Data Plot 001', N'D:\gh_scada\reports\tt25234963_CalcsStage3_0_001.png', N'\reports\tt25234963_CalcsStage3_0_001.png', NULL, N'tt0000')}

    Transaction sequence number and command ID of last execution batch are 0x00001D5D00001322000300000000 and 1.

    Violation of PRIMARY KEY constraint 'aaaaat_ReportImages_PK'. Cannot insert duplicate key in object 'dbo.t_ReportImages'.

    Violation of PRIMARY KEY constraint 'aaaaat_ReportImages_PK'. Cannot insert duplicate key in object 'dbo.t_ReportImages'.

    (Source: Server2 (Data source); Error number: 2627)

    Can anyone help and advise!!

    THank you.

    Edwin

  • Those errors occur normally either when someone "modified" the replica and the snapshot does not "truncate or drop" the table at the destination


    * Noel

  • What is the fixed around.?

  • You can set the snapshot to "DROP" objects in the replica before applying it.

    In addition that replica should be protected from client writes ( this can be achived using security settings or instead of triggers marked as not for replication )


    * Noel

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

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