Use the remote query timeout option to specify the number of seconds that must elapse when processing a remote query before the query times out (Microsoft® SQL Server™ assumes the query failed or took too much time to perform). The default is 0, which allows an infinite wait.
For heterogeneous queries, remote query timeout specifies the number of seconds (initialized in the command object using the DBPROP_COMMANDTIMEOUT rowset property) that a remote provider should wait for result sets before the query times out.
For remote stored procedures, remote query timeout specifies the number of seconds that must elapse after sending a remote “EXEC sp” before the remote stored procedure times out.
The setting takes effect immediately (without a server stop and restart).
To set a time limit for remote queries
RECONFIGURE | Setting Configuration Options |
Rowset Properties and Behaviors | sp_configure |