Call DTS Package From Stored Procedure

I figured this out a LOOONNG time ago, but couldn’t find it quickly when I needed it today. Like many things I post, I do it for myself so that I can easily find it later.

So, if you want to call a DTS Package from a sproc, here’s the code:


//Replace DTS_NAME with the real package name
exec master..xp_cmdshell 'dtsrun /s localhost /e /n DTS_NAME' 

Leave a Reply

Your email address will not be published. Required fields are marked *