Introduction

The remote query timeout option specifies how long, in seconds, a remote operation can take before SQL Server times out. The default value for this option is 600, which is a 10-minute wait. Setting this value to 0 disables the time-out. 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. A query waits until it completes.

Problem

Set remote query timeout to 0 (indefinite)

Solution

https://github.com/steverezhener/DBA/blob/master/Procedures/bestpractices.usp_change_server_remote_query_timeout.sql

Example

Based on

https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-remote-query-timeout-server-configuration-option?view=sql-server-ver16