-- default is 600 seconds = 10 minutes
sp_configure 'remote query timeout (s)'
sp_configure 'remote query'

Now the common misconception with this option is probably because of the following screen within SQL Server Management Studio (Server Properties -> Connections) where we see the following.

So the first checkbox allows remote connections to the server so we could assume that the remote query timeout value underneath (here set to 600, the default) is for incoming connections to the server. We might think that we could change this because we’re getting timeout errors within a client application when calling SQL and maybe changing this will help prevent the errors.

Here’s TechNet to explain why:
Use the remote query timeout option to specify how long, in seconds, a remote operation can take before Microsoft SQL Server times out. The default is 600, which allows a 10-minute wait. This value applies to an outgoing connection initiated by the Database Engine as a remote query. This value has no effect on queries received by the Database Engine.

That last line pretty much says everything we need to know, the value has NO EFFECT on queries RECEIVED by the Database Engine. None whatsoever, it is used purely for outgoing connections.

Note: This value applies to an outgoing connection initiated by the Database Engine as a remote query. This value has no effect on queries received by the Database Engine.

Sources:

http://sqlclarity.blogspot.com/2015/11/sql-server-misconceptions-remote-query.html

Last modified: October 8, 2020

Author

Comments

Write a Reply or Comment