Transaction Replication Collation error

  • We have a Transaction Replication setup from a SQL Server 2012 instance to SQL Server 2016.  This was working and then I added another article and got the error below right after it delivered the snapshot.

    Cannot resolve the collation conflict between "Latin1_General_100_CI_AS_KS_WS_SC" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. (Source: MSSQLServer, Error number: 468)

    I was getting this error last week when editing articles so I removed the publication/subscription and rebuilt them and then it worked fine for several days.  This morning I removed an article and added another one and now even if I delete the entire publication and re-create I am still getting the error.

    The command attempted is:
    declare @event_type SMALLINT = 1, @distributor_major_version SMALLINT = 11, @distributor_minor_version SMALLINT = 0, @distributor_build_number SMALLINT = 6251, @totalruntime INT = 76235, @totalworktime INT = 21735, @totalnumtrans INT = 0, @numtranspersec REAL = 0.00, @totalnumcmds INT = 0, @numcmdspersec REAL = 0.00, @totalskippedcmds INT = 0, @totalidletime INT = 0 if object_id(N'sys.sp_repl_generate_subscriber_event') is not null exec sys.sp_repl_generate_subscriber_event @event_state = @event_type,@distr(Transaction sequence number: 0x0003836700005394002E00000000, Command ID: 1)

    I used sp_browsereplcmds to see what command was getting the error and it is always  SYNCSTAT as shown below (not sure how to format that better):
    xact_seqno    originator_srvname    originator_db    article_id    type    partial_command    hashkey    originator_publication_id    originator_db_version    originator_lsn    command    command_id
    0x0003836700005394002E    NULL    NULL    303    -2147483610    0    0    NULL    NULL    0x00000000000000000000    SYNCSTAT    1

    Is there a way to avoid this SYNCSTAT command when re-initializing?

    We have had these same tables replicated before and don't remember ever running into this issue.  I have tried Reinitializing, recreating several times.  What is weird is that last week I was getting this and then rebuilt from scratch and it started working until I changed an article today.  I have built the replication and subscription both with the UI and scripting it.  I have done both from SSMS 2012 and SSMS 2016 - not sure if it matters where it is created from.  I have verified that the tables all have matching collation settings - in fact I had the replication create the tables at the subscriber.  For each article the 'Copy Collation' is set to True.  

    EDIT: We are having the replication call custom stored procedures that were copied from the default ms ones.  They were modified to write to transaction log tables that were built off the replicated tables.

    Does anyone have any ideas about what could be causing this issue and how to fix?

    Thanks,
    Scott 

  • An update: I went back and created a subscriber to another SQL Server 2012 instance (so both Publication and Subscription were on the same version of SQL Server) and everything started up just fine.  The problem was intermittent but first time we have had any issue setting up replication.  I suspect there is some issue when replicating from 2012 to 2016 but can't totally prove it at this point.

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

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