网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

正确理解SQLServer配置timeout相关选项

正确理解SQL Server配置选项“remote login timeout”和“remote query timeout”

创新互联-云计算及IDC服务提供商,涵盖公有云、IDC机房租用、服务器托管、等保安全、私有云建设等企业级互联网基础服务,咨询热线:18982081108


查看配置选项的设置

sp_configure

正确理解SQL Server配置timeout相关选项

 

远程登录超时


参考:https://msdn.microsoft.com/en-us/library/ms175136.aspx

“The remote login timeoutoption specifies the number of seconds to wait before returning from a failed attempt to log in to a remote server. For example, if you are trying to log in to a remote server and that server is down, remote login timeouthelps make sure that you do not have to wait indefinitely before your computer stops trying to log in. The default value for this option is 10 seconds. A value of 0 allows for an infinite wait.

The default value for this option is 20 seconds in SQL Server 2008.

The remote login timeoutoption affects connections to OLE DB providers made for heterogeneous queries.

The setting takes effect immediately without restarting the server.”

正确理解SQL Server配置timeout相关选项

EXEC sp_configure 'remote login timeout', 35 ;
GO
RECONFIGURE ;
GO

 

远程查询超时


参考:https://msdn.microsoft.com/en-us/library/ms189040.aspx

“The remote query timeoutoption specifies how long, in seconds, a remote operation can take before SQL Server 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 Database Engine as a remote query. This value has no effect on queries received by the Database Engine. To disable the time-out, set the value to 0. A query will wait until it is canceled.

For heterogeneous queries, remote query timeoutspecifies 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 timeoutspecifies the number of seconds that must elapse after sending a remote EXEC statement before the remote stored procedure times out.

The setting takes effect immediately without restarting the server.

EXEC sp_configure 'remote query timeout', 0 ;
GO
RECONFIGURE ;
GO

 

远程服务器和链接服务器的对应选项


参考:https://msdn.microsoft.com/en-us/library/ms178532.aspx

sp_serveroption [@server = ] 'server'
,[@optname = ] 'option_name'
,[@optvalue = ] 'option_value' ;

connect timeout

Time-out valuein seconds for connecting to a linked server.            
If 0, use the sp_configuredefault.

query timeout

Time-out value for queries against a linked server.            
If 0, use the sp_configuredefault.

我只简单解释一句,这几个选项只是针对“outgoing connections”


本文名称:正确理解SQLServer配置timeout相关选项
网址分享:http://bjjierui.cn/article/iphsee.html

其他资讯