博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
正确理解SQL Server配置timeout相关选项
阅读量:7194 次
发布时间:2019-06-29

本文共 2414 字,大约阅读时间需要 8 分钟。

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

查看配置选项的设置

sp_configure

 

远程登录超时

参考:

“The remote login timeout option 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 timeout helps 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 timeout option affects connections to OLE DB providers made for heterogeneous queries.

The setting takes effect immediately without restarting the server.”

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

 

远程查询超时

参考:

“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 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 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.

The setting takes effect immediately without restarting the server.

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

 

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

参考:

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_configure default.

query timeout

Time-out value for queries against a linked server.            

If 0, use the sp_configure default.

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

转载地址:http://dlvkm.baihongyu.com/

你可能感兴趣的文章
Linux 之Shell for循环
查看>>
Unicode 转换成 Ascii (把Unicode 中文字符串输入到文本中)
查看>>
mysql 安装学习
查看>>
windows phone 8.0 app 移植到windows10 app笔记
查看>>
阿基米德三角形中的最值问题--------2019届成都二诊第16题
查看>>
haproxy配置监控redis主备切换(转)
查看>>
Gradle 修改 Maven 仓库地址(转)
查看>>
Gradle digest
查看>>
分享一段js,判断是否是在iPhone中的Safari浏览器打开的页面
查看>>
ubuntu11.10 搭建lnmp服务器
查看>>
Python学习【第22篇】:线程理论基础
查看>>
在servlet连接mysql下的最简单增删查改
查看>>
第15章 套接字
查看>>
.Net Attribute详解(上)-Attribute本质以及一个简单示例
查看>>
leetcode------Same Tree
查看>>
c++第五次实验报告
查看>>
laravel 项目 配置 nginx
查看>>
POJ-1797 Heavy Transportation(最大生成树)
查看>>
BZOJ-1407: [Noi2002]Savage (扩展欧几里得)
查看>>
Android快捷便利但不常被使用的原生工具类
查看>>