none
How to Kill a long running query running on a background thread.

    Question

  •     
    If I start a long running query running on a background thread is there a way to abort the query so that it does not continue running on SQL server?

    The query would be running on SQL Server 2005 from a Windows form application using the Background worker component.  So the query would have been started from the background workers DoWork event using ado.net.  If the user clicks an abort button in the UI I would want the query to die so that it does not continue to use sql server resources.

    Is there a way to do this?

    Thanks
     
     
     

    Friday, September 01, 2006 7:55 PM

Answers

  • See if this could be one of the options.

    ms-help://MS.MSDNQTR.2003FEB.1033/tsqlref/ts_kf-kz_1zos.htm

    Also you might want to post this on ADO.NET forums.

     

     

    Saturday, September 02, 2006 9:20 AM