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?
Who is Participating?
Kevin HillSr. SQL Server DBACommented:
Add a step that calls DTSRUN specifying the package name, server name, etc.  See dtsrun in Books Online
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.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.