Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Unanswered: Run DTS from query

    Is it possible to run a DTS package from a query? If so how?

    I would like to run a DTS from a webpage!



  2. #2
    Join Date
    Aug 2003
    Andover, MA
    Yes it is.

    You will need to execute the DTSRUN program at the operating system level, however, and exposing that type of system access to a web server can be dangerous, so be very very careful.

    The easiest way to get it to work, it to schedule your DTS package (the parameters you select are not important).

    Open the job, then the step, and copy the DTSRUN line.

    In your sproc, enter this line:

    EXEC master.dbo.xp_cmdshell '[Paste the DTSRUN line here]'

    Delete the schedule.

    You can do it without the schedule bit, but it is an easy shortcut to getting it right.

    Read up on DTSRUN on BOL for more information and the syntax of DTSRUN.

Posting Permissions

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