Using variables in multiple packages

  • I have a SSIS Solution built in Visual Studio Community 2019 using SSDT. The solution contains about 15 packages. I am using 5 variables (created in the first package) that I would like to use in all of the other packages. Is there a way to make a variable usable in other packages within the same solution?

  • No. Only parameters can be shared, and only within a project (not across a solution).

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Okay, thanks.

  • Just to elaborate, if you set up the other packages to run within a master package, you can then pass the variables that way.  If you're using SQL Server 2012 or higher, it's easy to do.  I pass many variables that have been determined by the master package to the child packages.  The master child package setup is considered a best practice approach.

  • RonKyle wrote:

    Just to elaborate, if you set up the other packages to run within a master package, you can then pass the variables that way.  If you're using SQL Server 2012 or higher, it's easy to do.  I pass many variables that have been determined by the master package to the child packages.  The master child package setup is considered a best practice approach.

    You can pass (master) variables to (child) parameters, but you cannot pass variables to variables.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Agreed.  Thanks for clarifying.  My use of the terminology was imprecise.  I'll correct the answer later.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply