locked
merge replication error RRS feed

  • Question

  • i am trying to make a merge replication between tow network connected pcs
    it gives me the demonastrated errors in job history

    job history it stopped in step3 

    "detect non logged agent shutdown"

    String or binary data would be truncated. [SQLSTATE 22001] (Error 8152)

    and this message in replication monitor sync history

    the schema script "snapshot name" can't be propagated to the subscriber 


    Monday, August 27, 2018 8:23 PM

All replies

  • Can you elaborate at what point the error shows up? does it occur when the "Merge Agent" is run? if so, check the SQL agent job (for Merge) history and see if there are some more clues pointing to the root cause. 

    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Monday, August 27, 2018 8:53 PM
  • in job history it stopped in step3 

    "detect non logged agent shutdown"

     

    String or binary data would be truncated. [SQLSTATE 22001] (Error 8152)


    Monday, August 27, 2018 9:19 PM
  • in job history it stopped in step3 

    "detect non logged agent shutdown"

     

    String or binary data would be truncated. [SQLSTATE 22001] (Error 8152)

    Are you sure the first two steps ran fine? because by default, the second step "Run Agent" has "On Success" set to "Quit the job reporting Success" so it wouldn't go to the third step. Only if the second step fails is when the third step (Detect nonlogged agent shutdown) is executed. 

    Btw, have you looked into the following link? See if it helps.

    https://stackoverflow.com/questions/38470091/replication-merge-agent-string-or-binary-data-would-be-truncated/38471939


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Monday, August 27, 2018 10:21 PM
  • yes the second step failed also

    the link issue hasn't an answer up tell now  

    Monday, August 27, 2018 11:14 PM
  • yes the second step failed also

    the link issue hasn't an answer up tell now  

    Are there any inserts against the tables in replication that's inserting more than the max size of the column data type? for example, inserting 60 chars into a 50 char column or something?

    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Tuesday, August 28, 2018 5:36 AM
  • Hi,

     

    The error means that you put some values into a table that exceeds the data type, Could you please check which operation directly leads to the error. I found a similar thread, you can refer to these steps to ensure the cause.

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5bbf2c8c-a5c0-4a22-b30b-82b6ce4f1fea/an-error-prevents-replication-from-synchronizing-string-or-binary-data-would-be-truncated?forum=sqlreplication

     

    Best Regards,

    Emily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, August 28, 2018 7:22 AM