How to Pass parameters dynamically to SSIS package

Hi Folks,
Here is the scenario: By executing SP i want load the results into flatfile
but the SP is having 2 input parameters
how can i pass the parameters dynamically to this SSIS package so that i can collect the results into flatfile.

Thanks,
2575069Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Reza RadConsultant, TrainerCommented:
use package variables,
add two variables , set datatypes,
use them in your sql statement, like this:
execute yoursp ?,?
then click on parameters button, and set parameters.
0
Reza RadConsultant, TrainerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
2575069Author Commented:
Thanks for your reply reza.
We are planning to put this SSIS package in a SP & define parameters to SP
Do you have any idea how can i pass SP parameters to SSIS pckage

Thanks,
0
Reza RadConsultant, TrainerCommented:
ok.
you can use DTEXEC for run the package from SP,
and you can set your sp parameters to package variables with this syntax:

dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.