Reputation: 905
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?
Upvotes: 1
Views: 2328
Reputation: 3765
@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.
Upvotes: 0
Reputation: 905
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.
Upvotes: 0
Reputation: 3075
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.
Upvotes: -2