Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Add new Package as new step in to an Existing Job

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?
3 Solutions
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.
amedexittAuthor Commented:
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.
Add a step that calls DTSRUN specifying the package name, server name, etc.  See dtsrun in Books Online
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Jay ToopsCommented:
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

Scott PletcherSenior DBACommented:
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.
Jay ToopsCommented:
not technically but ive found it extremely usefull .. and much simpler

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now