Copy variables between SSIS packages

How to copy-paste multiple variables between SSIS packages.

If you work with SSIS you probably hit this wall many, many times: there’s a package with zillion variables and you need to copy some / all of them to another package.

There is no copy-paste thingy in the UI for a variable so that’s a dead end.

You can try to circumvent the problem by using project level parameters but that opens a separate can of worms. In the worst case scenario you will end up running a couple of packages in parallel, each overwriting some shared parameter’s value. Or something like that.

Copy-paste for SSIS variables would be really desirable, right? Like, let’s say, you’re debugging a badly performing part of a package and you need to re-create some of its variables in a copy. There are various scenarios where you might need to do so. And how about copying SSIS vars between projects? And so on, and so forth.

So… is there a magic wand?

There is! And it is surprisingly simple (though not immediately obvious to everyone). Just open the SSIS package in the „View Code” mode (available in the right-click menu in the Solution Explorer pane) then scroll through the XML spaghetti until you find the „Variables” node, then simply copy some/all variables (each will have its own „Variable” node), finally paste them into the same „Variables” node of the target package, save and Bob’s your uncle!

You are very welcome.

Autor: xpil

Po czterdziestce. Żonaty. Dzieciaty. Komputerowiec. Krwiodawca. Emigrant. Rusofil. Lemofil. Sarkastyczny. Uparty. Mól książkowy. Ateista. Apolityczny. Nie oglądam TV. Uwielbiam matematykę. Walę prosto z mostu. Gram na paru instrumentach. Lubię planszówki. Słucham bluesa, poezji śpiewanej i kapel a'capella. || Kliknij tutaj po więcej szczegółów ||

Dodaj komentarz

Bądź pierwszy!

Powiadom o