Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:04:35+00:00 2026-06-15T23:04:35+00:00

When calling SQL Server from a client using ODBC, if a long-running query is

  • 0

When calling SQL Server from a client using ODBC, if a long-running query is run causing the time specified in SQL_ATTR_QUERY_TIMEOUT to be exceeded, I see that control is returned to the application. My question is does the work continue within the SQL Server engine. If it does continue what can be done to abort/cancel/stop the request on the server? Is there a best practice consideration to keep in mind?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:04:36+00:00Added an answer on June 15, 2026 at 11:04 pm

    The client sends an Attention signal to the server:

    The client can interrupt and cancel the current request by sending an Attention message. This is also known as out-of-band data, but any TDS packet that is currently being sent MUST be finished before sending the Attention message. After the client sends an Attention message, the client MUST read until it receives an Attention acknowledgment.

    The engine will abort the batch at the first opportunity (for all practical reasons, right away) and send back the Attention ack. In certains states a batch cannot be interrupted, eg. while rolling back a transaction. In such case a client may request an abort, but the response will come only after the server terminates the non-interruptible work.

    The above is true for any SQL Server client stack, eg. exactly the same is how SqlCommand.CommandTimeout works.

    The KILL command works in a very similar manner except that is not a client-server communication, but killing-SPID -> victim-SPID communication.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am calling a SQL Server stored procedure from my C# code: using (SqlConnection
I am using NHibernate and calling a stored procedure via a named query: <sql-query
When calling a stored procedure from vb.net is there a default SQL timeout time
I am calling an 2005 MS SQL Server stored procedure using the MS JDBC
In a Silverlight app. when calling an SQL Server stored procedure from Entity Framework
Calling all Oracle heads, I've got a weird problem with a sql query... Running
I am calling a table-valued function, of my database in SQL server 2008, from
I am using SQL Server 2008R2. I've got the following setup: -- Query #1
In the documentation for calling a SQL Server stored procedure with parameters from PHP
I am calling an Oracle packaged function from SQL Server 2008 R2 and am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.