I have managed to set up SQL merge replication between two servers in different locations. The merging seems to be going perfectly, with one minor hitch. Just about every evening, the merge agent on my publisher doesn't seem to be able to find my subscriber. While this, in itself, is not too much of a problem, as there are tends to be no data to merge at these times, but it means that the identity ranges fill themselves up, and it becomes impossible to post records in one of the articles.
As far as I can tell, there are two potential work-arounds to this - either stop the servers from timing out, or set up a program or stored procedure to check if the agent is running, and if it isn't, start it again. In order to do either of these, need three pieces of information:
1) Is there a stored procedure to find the status of a merge agent?
2) Is there a stored procedure to start a merge agent?
3) Is there a setting somewhere, presumably in the merge agent profile, that detemrines how long it will attempt to conect to a subscriber before timing out?
Thanks in advance