<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Attention Event on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/attention-event/</link><description>Recent content in Attention Event on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Thu, 19 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/attention-event/index.xml" rel="self" type="application/rss+xml"/><item><title>Track Application Query Timeouts with the Attention Event</title><link>https://www.sqlserver70.com/post/track-application-query-timeouts-with-the-attention-event/</link><pubDate>Thu, 19 Nov 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/track-application-query-timeouts-with-the-attention-event/</guid><description>
&lt;p&gt;An application reports &amp;quot;Timeout expired.&amp;quot; The client waited out its command timeout, typically 30 seconds, and cancelled the query. On the server, that cancel shows up as an Attention event, error 3617. The script below creates an Extended Events session that writes every attention event from user sessions to a small rolling file, along with the SQL text, database, user name, host and application for each one.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="8593449130"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;A query timeout is different from a connection or login timeout. A connection or login timeout happens when the first connection to the server reaches its timeout period. At that point the client has not sent any query. If an application sets its query timeout to 0 (no time limit), the Database Engine runs the query until it finishes, so that application never produces a timeout attention event.&lt;/p&gt;</description></item></channel></rss>