Many people are quite confused on how parameters and variables work. However to clearly demonstrate the differences, you need to deploy a package in the SQL server.
Parameters
There are 2 types of Parameters: Package Parameters and Project Parameters.
The only thing to that differentiates in these 2 types is the scope. Project parameters are used by the entire project whereas package level parameters are used only by the packages.
Parameters in SSIS are pretty similar to parameters in a normal code.
Parameters allow you to pass values into the package when executing a package. So they enable you to configure different values.
You cannot evaluate parameters using any expressions.
Variables (NOT Environment Variables)
These are the properties of a packages. That is you can set values to a variable during development and you can use expressions which will be evaluated at run time. However, you cannot choose to set different values when executing the package.
The scope of a variable is strictly within a single package and never the project.
A variable can consume parameters and never the other way around.
Leave a comment