Hello,
We are running merge replication using SQL Server 2008 R2. Our servers are always on and synchronizing, however our clients go online and offline for random time periods. We have it set up for a 45 day publication retention period, and I believe a 14 day snapshot retention period. If our clients are offline for long periods, we have them come online within their 45 days so they can get caught up.
What I am seeing on one of our clients is they came up to get caught up being down for 40 days. They took a while to get caught up, which is normal, however, every sync after that was extremely slow. When I go in to view the snapshot agent status, I see it going through "Enumerating inserts and updates in article'...' (generation batch X), starting at 1, going up to 243, skipping some numbers along the way. This takes about 25 minutes, then it says 'Merge completed with no data changes processed.' (which is what I expect). The next time it runs, it goes through all the inserts and updates again that it had just gone through, again taking 25 minutes. (Sometimes it will download a little data, sometimes upload a couple rows, which I expect).
If no data was uploaded/downloaded, when I go to replication monitor, it says that it spent 25 minutes in 'Initialization', if there was data uploaded, it seems to divide the time between the uploaded rows. Note that the tables it enumerates inserts and updates to is not limited to the rows it uploads data for. Also, I'm not sure if it is related, but just in case, while the client was doing its first sync to get caught back up, a relatively large number of entries were added to the database
This is the second or third time we have seen this over a couple years. All of our other clients seem to be going fine. Is there any reason or troubleshooting I can do to try to figure out why replication keeps enumerating the same inserts and updates every time?
Thank you for your time and help.