Applies To: SQL Server 2016
|Product Name||SQL Server|
|Message Text||The merge process could not replicate one or more INSERT statements to the '%1'. A stored procedure failed to execute. Troubleshoot by using SQL Profiler.|
This error is raised because a failure occurred while inserting a row at the destination. There should be additional server errors that provide more information about the failure. The Merge Agent calls the insert procedure for the article to insert rows on the destination. You can find the name of the insert procedure in the insert_proc column of sysmergearticles table.
Run SQL Server Profiler and examine replmerg.log for failures. If you are using Web Synchronization, elevate the severity of the websync log, rerun the scenario, and check for errors in the websync.log file.
If you are using Web Synchronization, you can start Replmerg.exe and pass the -T 106 option to use trace flag 106. This enables you to see the messages that are sent to and from the Publisher. By adding the trace flag to the Replmerg.exe agent command line, the agent writes the client's input messages to a file that is named ExchangeID(guid).IN.XML, and writes the output messages to a file that is named ExchangeID(guid).OUT.XML. (In these file names, guid is the GUID of the Exchange Server session.) These files are created in the directory from which Replmerg.exe was invoked. For security, you should delete these files after you are finished.