Results 1 to 3 of 3

Thread: ** Resolved **Abort SQL Server 2000 Stored Procedure FROM VB.Net

  1. #1

    Thread Starter
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Question ** Resolved **Abort SQL Server 2000 Stored Procedure FROM VB.Net

    hi all,

    I have a stored procedure running every night on an SQL Server database which is triggered through a VB.Net App. Sometimes the process is very long and might take a few hours. My problem is that I need to stop it if its taking too much time to be able to run other applications. I want to know if this is possible to do from within the VB.Net App, thas is to abort the processing of a stored procedure and cause it to stop.

    All help appreciated thanx.
    Last edited by vbud; Apr 5th, 2005 at 11:31 PM. Reason: Resolved
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: Abort SQL Server 200 Stored Procedure FROM VB.Net

    Hi
    Instead of calling the stored procedure directly you and instead create a new job that executes your stored procedure using sp_add_job, then add a new step to the job you created with sp_add_jobstep.

    Then add a sp_job_jobschedule and to begin running sp_start_job. If it takes too long you can stop : sp_stop_job.

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  3. #3

    Thread Starter
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Re: Abort SQL Server 200 Stored Procedure FROM VB.Net

    Thanx mate i'll try this and see, but i'm sure this is the solution to my problem. thanx again, cheers.
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width