Jan 4, 2017

How to copy variable from one package to another SSIS package

We can easily copy and paste task, transformations, connection manager from one package to another but like this you cannot copy and paste variables from one to another package. If you have to use same variable for another package it may take time to type variable’s name one by one.


One solution for this I am described below, we can copy and paste variable from one package to another package. Suppose we have a package pck1 and we need to copy all variable from package pck1 and paste to package pck2.



To copy above variable we have to open xml code of pck1. How can we open the package in code mode please see the following image.

Copy the variable code shown as below.




Same as open package pck2 in code mode and replace variables attribute with copied code as below.


After replace code and save, package will look like as below.