正確理解SQL Server配置選項(xiàng)“remote login timeout”和“remote query timeout”
創(chuàng)新互聯(lián)-云計(jì)算及IDC服務(wù)提供商,涵蓋公有云、IDC機(jī)房租用、服務(wù)器托管、等保安全、私有云建設(shè)等企業(yè)級互聯(lián)網(wǎng)基礎(chǔ)服務(wù),咨詢熱線:18982081108
查看配置選項(xiàng)的設(shè)置
sp_configure

遠(yuǎn)程登錄超時(shí)
參考: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.”

EXEC sp_configure 'remote login timeout', 35 ; GO RECONFIGURE ; GO
遠(yuǎn)程查詢超時(shí)
參考: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
遠(yuǎn)程服務(wù)器和鏈接服務(wù)器的對應(yīng)選項(xiàng)
參考: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. |
query timeout | Time-out value for queries against a linked server. |
我只簡單解釋一句,這幾個(gè)選項(xiàng)只是針對“outgoing connections”。
文章名稱:正確理解SQLServer配置timeout相關(guān)選項(xiàng)
轉(zhuǎn)載注明:http://www.chinadenli.net/article44/iphsee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司、網(wǎng)站內(nèi)鏈、外貿(mào)建站、動(dòng)態(tài)網(wǎng)站、服務(wù)器托管、用戶體驗(yàn)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)