Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute a DTS package via some SQL

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
GB
Is it possible to execute a DTS package via some SQL?

Cheers
 
I create a stored procedure that runs a DTS Package and pass a parameter into the stored proc to be used as a parameter in the DTS package.

CREATE PROCEDURE sp_exec_DTS
@ID int
AS
Declare @DTS_string varchar(200)
Select @DTS_string = 'DTSRun /S /E /N "DTS Package Name" /A "ID":"3"="' + Convert(char, @ID) + '"'
exec master.dbo.xp_cmdshell @DTS_string
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top