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 7789991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:27:24+00:00 2026-06-01T21:27:24+00:00

Is there any way to configure SQL Server 2008 to kill a transaction if

  • 0

Is there any way to configure SQL Server 2008 to kill a transaction if it has neither been canceled nor committed for some time? (Say power, network connection or whatever gets cut to the computer having it open.)

Either so it happens automatically after some defined rule-sets or by making and calling a command line application that queries the SQL server for active transactions + time they have been running… and then instructs SQL Server to close those down that are “frozen”.

  • 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-01T21:27:25+00:00Added an answer on June 1, 2026 at 9:27 pm

    To quote Gail Shaw from here:

    SQL Server does not time queries out, the connecting application (in this case query analyser) does.

    Whichever tech that you’re using to connect (ADO, etc.) will probably have a connection timeout and and execution timeout property that you can change in your calling code. Defaults are usually 30 secs.

    You could potentially wrap something like this in a loop that kills each offending spid:

    select datediff(second, last_batch, getdate()) as secs_running, *
    from sys.sysprocesses
    where hostname != ''
        and open_tran = 1
    

    There would probably be many opinions on how to best find which processes are “safe” to kill, and I would certainly be a little worried about automatically doing such a thing based upon an arbitrary timespan. I’m also not sure that any data changes done in the process are guaranteed to be rolled-back.

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

Sidebar

Related Questions

Is there any way to configure a SQL server instance to not permit updates
Is there any way to configure an SVN server such that it does not
Is there any way to make all the applications on a server use SQL
Is there any way to configure IIS or Web app to automatically open a
Is there any way to configure Doxygen to include the log from SVN for
Is there any way (maybe directly editing resource files) to configure a Tab Control
Is there any way to configure NLog to log information per application session? As
Can anyone say is there any way to configure request filtering for WCF get
I want know is there any way to configure a SVN over a LAN
Is there any way to configure IIS 7 to transfer a request to another

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.