Merge agent failing with “Cannot insert duplicates rows into table “tablename”. Violation of PRIMARY KEY constraint” during initialization.

Sateesh Yele Microsoft SQL Server Support Last week, I worked on replication case where the merge agent was failing with the above error message. Here is the merge agent verbose log with the error message. Message: Batch send failed 2011-04-20 13:53:00.546 [39%] [346 sec remaining] Bulk copied data into table ‘MSmerge_tombstone’ (0 rows) 2011-04-20 13:53:00.843
Read More »

Distribution agent failing with “procedure was called with an incorrect number of parameters”.

Sateesh Yele Microsoft SQL Server Support Transactional replication allows you to specify how data changes are propagated from the Publisher to Subscribers. For more information, please check this link. Specifying How Changes Are Propagated for Transactional Articles Recently, I worked on a case where the distribution agent failed with procedure was called with an incorrect
Read More »

Very Slow Data Repartitioning in SQL Server Replication with Precomputed Partitions

Here is a great posting by Kevin Locke on a problem he encountered when data modifications occurred near the top of a complicated replication filter configuration.  These changes can cause “partition change” which triggers re-evaluation of all child data; also known as “repartitioning”.  Kevin’s solution was to add an index to the Merge tracking tables,
Read More »

MSSQL_REPL-2147199360 Unable to decide if MakeGeneration is needed.

Error messages: Unable to decide if MakeGeneration is needed. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199360) Get help: http://help/MSSQL_REPL-2147199360 Query timeout expired (Source: MSSQLServer, Error number: 0) Get help: http://help/0 The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart
Read More »

Reducing Impact of Large Updates on Merge Replication

One key parameter to consider when performing batch updates against tables enabled for Merge Replication is ‘generation_leveling_threshold’.  This setting controls how many data changes should be grouped into one generations (or batch).  The Merge Agent then collect and sends those batches of changes based on the Merge Agent [-DownloadGenerationsPerBatch] parameter.  The default is to group
Read More »