Import variables from another package?

  • Hi All,

    I am just getting to grips with SSIS and I can not find an answer for this anywhere.

    Can you create variables in one package and import them into another?

    I have created a set of basic variables that I need for several packages to run. I have then used the package configurations to create an XML file of these settings and I wish to import them into the other packages but I can not see how. I have loaded the XML file via the package configurations so the values are loaded at run-time but do I have to recreate the variables for every package? I hope not..

    If anyone is aware of a way please let me know.

    Thanks in advance

    Elliot

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

  • I think you'll need to get your typing hat on.

    As far as I know there is no way to copy variables from one package to another. Each variable is referenced internally by a system ID which is created when you create the variable. There doesn't seem to be a way to copy and paste from one variables box in one package to another.

    If you haven't created the other packages yet then you could create a copy of the package which contains the variables, remove everything in it you don't want then create several copies of this, renaming each one. This will save you having to manually create all the variables.

  • Thanks for the prompt response.

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

  • Sorry - Is there a quick way to copy the package? If I save the project I then need to go through and change all the other filenames? Is this correct or am I missing a quick fix?

    Thanks

    Elliot

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

  • Save first

    right click the package, select copy

    right click the SSIS Packages folder, select paste

    Right click new package, select rename.. rename package (don't forget the .dtsx extension) and click yes when prompted about the object name

  • many thanks

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

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

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