Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    4

    Unanswered: 2 questions.. DTS and job scripting

    1st question. Is there any way to start a DTS package through a SQL job by using the DTS name? The only way I can run a DTS through a job is to schedule the DTS, go to the new job that was created, copy out the line of code that was produced (DTSRun /~S 0x4F0F69A91E...) and put this in my job.

    2nd question. Is there a way to script out multiple SQL jobs at the same time? I can only seem to do one at a time. You can select multiple jobs, and then choose All Tasks, Generate SQL Script, but this only scripts the first job.

  2. #2
    Join Date
    Mar 2003
    Posts
    3

    DTS Job

    You can run a DTS package via a job using the dtsrun command. This is a DOS command which can be run via the xp_cmdshell stored procedure.

  3. #3
    Join Date
    Mar 2003
    Posts
    3

    Scripting jobs

    Whoops forgot to answer question 2...

    If you right-click on the pane which displays the list of jobs in enterprise manager (but not on a specific job) you can script all the local jobs. You can then edit the script later to remove any of the jobs you don't want to include...

    HTH,
    Katherine

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245

    Re: 2 questions.. DTS and job scripting

    To run a DTS package using the name, try the /N switch:

    Code:
    DTSRun /S MyServer /E /N "My DTS Package"


    Originally posted by mclark8797
    1st question. Is there any way to start a DTS package through a SQL job by using the DTS name? The only way I can run a DTS through a job is to schedule the DTS, go to the new job that was created, copy out the line of code that was produced (DTSRun /~S 0x4F0F69A91E...) and put this in my job.

    2nd question. Is there a way to script out multiple SQL jobs at the same time? I can only seem to do one at a time. You can select multiple jobs, and then choose All Tasks, Generate SQL Script, but this only scripts the first job.

Posting Permissions

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