--- title: "Configure the remote query timeout Server Configuration Option | Microsoft Docs" ms.custom: "" ms.date: "03/08/2017" ms.prod: sql ms.prod_service: high-availability ms.reviewer: "" ms.suite: "sql" ms.technology: configuration ms.tgt_pltfrm: "" ms.topic: conceptual helpviewer_keywords: - "time limit for remote queries [SQL Server]" - "remote query timeout option" ms.assetid: 888c8448-933b-41e3-8aa1-c206bc0cdb78 caps.latest.revision: 26 author: MikeRayMSFT ms.author: mikeray manager: craigg --- # Configure the remote query timeout Server Configuration Option [!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)] This topic describes how to configure the **remote query timeout** server configuration option in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The **remote query timeout** option specifies how long, in seconds, a remote operation can take before [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] times out. The default value for this option is 600, which allows a 10-minute wait. This value applies to an outgoing connection initiated by the [!INCLUDE[ssDE](../../includes/ssde-md.md)] as a remote query. This value has no effect on queries received by the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. To disable the time-out, set the value to 0. A query will wait until it completes. 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. This value is also used to set DBPROP_GENERALTIMEOUT if supported by the remote provider. This will cause any other operations to time out after the specified number of seconds. For remote stored procedures, **remote query timeout** specifies the number of seconds that must elapse after sending a remote `EXEC` statement before the remote stored procedure times out. **In This Topic** - **Before you begin:** [Prerequisites](#Prerequisites) [Security](#Security) - **To configure the remote query timeout option, using:** [SQL Server Management Studio](#SSMSProcedure) [Transact-SQL](#TsqlProcedure) - **Follow Up:** [After you configure the remote query timeout option](#FollowUp) ## Before You Begin ### Prerequisites - Remote server connections must be allowed before this value can be set. ### Security #### Permissions Execute permissions on **sp_configure** with no parameters or with only the first parameter are granted to all users by default. To execute **sp_configure** with both parameters to change a configuration option or to run the RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. The ALTER SETTINGS permission is implicitly held by the **sysadmin** and **serveradmin** fixed server roles. ## Using SQL Server Management Studio #### To configure the remote query timeout option 1. In Object Explorer, right-click a server and select **Properties**. 2. Click the **Connections** node. 3. Under **Remote server connections**, in the **Remote query timeout** box, type or select a value from 0 through 2,147,483,647 to set the maximum number seconds for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to wait before timing out. ## Using Transact-SQL #### To configure the remote query timeout option 1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. 2. From the Standard bar, click **New Query**. 3. Copy and paste the following example into the query window and click **Execute**. This example shows how to use [sp_configure](../../relational-databases/system-stored-procedures/sp-configure-transact-sql.md) to set the value of the `remote query timeout` option to `0` to disable the time-out. ```sql USE AdventureWorks2012 ; GO EXEC sp_configure 'remote query timeout', 0 ; GO RECONFIGURE ; GO ``` For more information, see [Server Configuration Options (SQL Server)](../../database-engine/configure-windows/server-configuration-options-sql-server.md). ## Follow Up: After you configure the remote query timeout option The setting takes effect immediately without restarting the server. ## See Also [RECONFIGURE (Transact-SQL)](../../t-sql/language-elements/reconfigure-transact-sql.md) [Rowset Properties and Behaviors](../../relational-databases/native-client-ole-db-rowsets/rowset-properties-and-behaviors.md) [Server Configuration Options (SQL Server)](../../database-engine/configure-windows/server-configuration-options-sql-server.md) [sp_configure (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-configure-transact-sql.md)