Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 execute a ssis package using sql

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-07-30 : 05:59:16
Hi,
Using SSIS, how is it possible to execute another ssis package and pass a parameter to it?
For example, I would like to have a sql code that runs the package say "d:\sysappl\CEM\SSIS\CSA.dtsx" and pass a parameter of fileName because the CSA.dtsx package requires a filename.

Something like:
execute "d:\sysappl\CEM\SSIS\CSA.dtsx", varfileName

Thanks

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-30 : 07:33:51
xp_cmdshell 'dtexec.exe ...'

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-07-30 : 07:37:35
Yes, I found that but not sure how to pass a parameter i.e. filename
Thanks
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-07-30 : 08:49:29
quote:
Originally posted by spirit1

xp_cmdshell 'dtexec.exe ...'

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp


I would like to run a ssis package and pass the filename as the parameter to the package.
This is what I have worked out so far but notice the error message:

xp_cmdshell 'dtexec.exe /f "d:\sysappl\CEM\SSIS\Imports\Trades\CounterPartyExposureEquitiesImport.dtsx\EqRonnieHK.csv"'

p.s. If I run the package manually, it runs without error.

Error:
Description: Failed to open package file "d:\sysappl\CEM\SSIS\Imports\Trades\CounterPartyExposureEquitiesImport.dtsx\EqRonnieHK.csv" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.



Thanks

Go to Top of Page
   

- Advertisement -