Skip to main content

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 the 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 the 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 the above variable, we have to open the 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 replacing code and save, the package will look like as below.