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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute DTS package from a Stored Procedure 1

Status
Not open for further replies.

vituja

Programmer
Oct 1, 2003
30
US
Hi All,

Can a DTS package be executed from a stored procedure? If so how would I go about writing the SP code to execute the package?

Any help would be appreicated. Thanks.
 
You can use xp_cmdshell to execute the dtsrun utility, something like:

Code:
EXEC master..xp_cmdshell 'dtsrun /Smyserver /E /Nmypackage'

This runs mypackage on myserver, using a trusted connection. Look up dtsrun in BOL for all info.

--James
 
You would do something like this ...


EXEC xp_cmdshell 'dtsrun /S /U /P /N PackageName'


Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top