Add new Package as new step in to an Existing Job

Posted on 2005-05-05
Last Modified: 2010-03-19
I have a Job that has diffrent steps and I would like to run (Add) a new package in to this job. How can I do this?
Question by:amedexitt
    LVL 5

    Expert Comment

    What do you mean by "package"? another step in the job? If so, then simply drill into the job gui (by double clicking it), goto the steps tab, and then add a new step. Please provide more info.

    Author Comment

    I need to add a new step in to an existing Job. The new step will be a Package that I just created. I have done this before adding SQL Queries but no adding Packages.
    LVL 21

    Accepted Solution

    Add a step that calls DTSRUN specifying the package name, server name, etc.  See dtsrun in Books Online
    LVL 10

    Assisted Solution

    by:Jay Toops
    here this might prove VERY usefull to you this EXECUTES A dts package from a stored procedure
    exec sp_DtsExec('PACKAGE NAME')
    so for example you can create a SQL Statement that will fire this package BY NAME
     .. not by that irritating ID no


    ALTER   PROCEDURE [dbo].[sp_DtsExec]
    @dtspack varchar (50)
    -- This SP executes a dts package by name
    -- exec sp_DtsExec('PACKAGE NAME')
    declare @dtscmd as varchar(1024)
    declare @dtspackid as varchar(256)
    --declare @dtspack as varchar(100)
    --select @dtspack='DTS_DYNA_FLIST'
    select @dtspackid = versionid  from msdb.dbo.sysdtspackages
    where name = @dtspack
    and createdate = (select max(createdate) from msdb.dbo.sysdtspackages where name = @dtspack )

    select @dtscmd = 'dtsrun /S(LOCAL) /E /N "'+@dtspack+'" /V "{'+@dtspackid+'}"'
    print @dtscmd
    EXEC master..xp_cmdshell @dtscmd

    LVL 68

    Assisted Solution

    I don't think you have to specify the name and version of the pkg to be run, you can just specify the name, so you don't really need a separate sp.
    LVL 10

    Expert Comment

    by:Jay Toops
    not technically but ive found it extremely usefull .. and much simpler

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to shrink a transaction log file down to a reasonable size.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now