Can we Pass Variables to SSIS Package

Can we pass variables to SSIS package. Which means that we send the values while executing package and use those values inside the package to accomplish some logic.
[164 byte] By [SureshBansal] at [2008-2-13]
# 1
In the new world there are a number of options

Configuration
DTExec
DTExec has a million things you can do with it and Configurations are something you definitely want to take a look at

To get you started have a look here

Start | Run | DTExecUI

Books Online is always good.

Our friend jamie has written a "Starter for 10" article here
Easy Package Configuration
(http://www.sqlis.com/default.aspx?26)

In the October/Novemeber edition of SQL Server statndard Magazine i hope to have an article on configurations as well.

Allan

AllanMitchell at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 2
Hi,
Yes. You can pass values into your package via the command line. This tells you how to do it: http://blogs.conchango.com/jamiethomson/archive/2004/12/13/451.aspx

[Apologies on behalf of my internal IT department if there is a fault with this link. They've been promising to move us to a new blogging engine where this won't happen for about 6 months now and still nada. Hopefully the link will work]

-Jamie

JamieThomson at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 3
Thanks Jamie & Allan,

I have implemented this thing now. I set up User Variables at the Package Level which are even available at the Data Flow Level. Used these variables there. And used the following command to pass variables at the run time.

"C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe" /f "C:\Program Files\SSIS\GetName.dtsx" /set \package.variables[CustName].Value;"Suresh" /set \package.variables[CustSex].Value;"M" \package.variables[CustAddress].Value;"Bangalore, India"

It runs great. Thanks all.

SureshBansal at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 4
Hi Suresh,
Why not click the "Yes" button next to the "Was this post helpful?" question. Let's see if this new fangled forum can really help us in this way?.

-Jamie

JamieThomson at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...

SQL Server

Site Classified