How to check if Merge Replication is really complete or not

…衆ロ難τιáo~ 提交于 2019-12-13 03:33:00

问题


Hopefully some SQL replication genius can help on this one.

We've got some handheld devices that are using merge replication on our SQL 2008 R2 database to keep their local database in synch.

This works most of the time but the client is requesting a report that shows the status of the synch as it progresses.

Now I'm watching the msmerge_history and msmerge_session tables during the merge and I'm noticing that they state complete long before the device itself has completed.

So the client is seeing that a synch has been successful only for it to fail 5 minutes later due to one reason or another.

How can I see when the client has finished it's merge?


回答1:


@Gavin Mannion - Try using sp_replmonitorhelpmergesession. Keep in mind that you'll also want to inspect the Status, ErrorMessages, and ErrorID column values in the result set while monitoring, along with the PercentageDone/Duration.




回答2:


It's not exactly an answer but Microsoft has confirmed to us that we can't monitor subscriber progress in real time from the server. It can only be monitored from the subscriber.

So we are going to have to change the way our subscriber works to notify the server of it's progress.




回答3:


This is a problem for a bad configuration of the Agent, because he need to start automatically with the server. The most common situacion is when you see the Warning Status when you create the reports.

So you need to reconfigure the agent:

sp_configure 'show advanced options',1 
reconfigure with override 
go 
sp_configure 'xp_cmdshell',1 
reconfigure with override 
go 
sp_configure 'Agent XPs',1 
reconfigure with override 
go

Then check it if is ok:

net start sqlserveragent

or 'Start' the agent from Management folder.



来源:https://stackoverflow.com/questions/10103042/how-to-check-if-merge-replication-is-really-complete-or-not

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!