Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    58

    Question Unanswered: Exit DTS Package

    Is there a way to exit an executed DTS package using Microsoft TSQL without causing an error or does this need to be in VB?

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    The TSQL executes within the package, and thus I don't think there is a way to directly stop the package using TSQL. I suppose you could call system stored procedures to command shell out and stop the service, or even identify the executing process and kill it, but I would certainly never recommend anything like this.

    Your best be may be to have the TSQL return an error code or set an environment variable that your DTS package can respond to.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Oct 2005
    Posts
    58
    Okay thanks. I did raiserror but that makes the package a failure which is what I don't want.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    the handling of return codes inside DTS is a different animal from RAISEERROR
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Oct 2005
    Posts
    58
    I ended up writing it in VB but thanks guys.

Posting Permissions

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