且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

查询超时会发生什么?

更新时间:2021-10-17 23:36:09

客户端向发出查询超时信号使用关注事件的服务器.注意事件只是一个TDS数据包的不同类型SQL服务器客户端可以发送给它.在除了连接/断开连接,T-SQL批处理和RPC事件,客户端可以向服务器发出注意信号.一个注意告诉服务器取消连接当前正在执行尽快查询(如果有)可能的.注意力不集中回滚未完成的交易,它不会停止当前正在执行一角钱查询-服务器中止为它所做的一切下一个可用的连接机会.通常会发生这种情况很快,但并非总是如此.

A client signals a query timeout to the server using an attention event. An attention event is simply a distinct type of TDS packet a SQL Server client can send to it. In addition to connect/disconnect, T-SQL batch, and RPC events, a client can signal an attention to the server. An attention tells the server to cancel the connection's currently executing query (if there is one) as soon as possible. An attention doesn't rollback open transactions, and it doesn't stop the currently executing query on a dime -- the server aborts whatever it was doing for the connection at the next available opportunity. Usually, this happens pretty quickly, but not always.

来源没有查询超时之类的东西...