Sql-server – How to increase the -QueryTimeOut parameter in MS SQL 2008

merge-replicationsql server

I have two servers running Microsoft SQL 2008 and I am using Merge replication. It uses a push subscription. The other day there was an event that would have caused more rows to be inserted into the database then normal. Between 5,000 and 10,000 rows would have been inserted into three tables over the course of 5 minutes. In the next 14 hours I got about 80 e-mails with this error message:

The Merge Agent failed to retrieve
article information for publication
'Lynx'. Increase the -QueryTimeOut
parameter and restart the
synchronization. When troubleshooting,
use SQL Profiler or restart the agent
with a higher value for
-HistoryVerboseLevel a

After I restarted the agent and reinitialized replication, the errors stopped.

So, how do I increase the -QueryTimeOut parameter? And, will it help prevent this in the future?

Best Answer

It appears you can do this from Replication Monitor (right-click the "Replication" node in Management Studio, and choose Launch Replication Monitor).

Select your publication, right click the subscription in the list to the right, and choose "Agent Profile". You can either edit the "Default agent profile" or create a new one. Either way, you can modify the -QueryTimeout parameter if you click the little ellipsis button to edit the profile.

Disclaimer: I've never had to actually change this, but it certainly looks promising.

Related Topic