Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS global variable

Tags:

ssis

Is there anything similar to global variable in SSIS? I have 4 variables (FromAddress, ToAddress,...) which will be used in all packages (32). So if I can set them only once it will be very easy to use in all packages and will save my time. Please advise.

like image 949
pramodtech Avatar asked Mar 18 '10 13:03

pramodtech


2 Answers

SSIS has variables that can be global to a package, but to span multiple packages, I can think of the following options

Passsing Variables

Have Main Package define a variable and pass the value as a parameter to all packages that it calls. Call the variable the same name in all packages for easy identification.

Config File

Use the same SSIS configuration file across packages and store the value in there.

Environment Variable

Use a windows environment variable that is read from other packages

Registry Value

Store in Windows registry and read for each package - make sure you store under a tree that all packages can see otherwise you may run into permissions issues. Eg HKLM

Database Lookup

Store the value a table structure.

like image 115
Raj More Avatar answered Sep 22 '22 20:09

Raj More


You can create local variables in your scripts. Any variable you create in a script is local just to that script. You can also create global variables (via the Variables slideout window) which can be scoped for the entire package, or a subset of the package.

like image 38
Randy Minder Avatar answered Sep 22 '22 20:09

Randy Minder