Copy 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.

Liczba słów w tym wpisie: 236

Sprawdź też

Obsydianowy mędrzec

Systemy zarządzania wiedzą? Ściema jakaś, teraz wszystko jest w guglach, po co mi jakieś dodatkowe …

Siedem tygodni, czyli rzecz o szukaniu pracy w czasach zarazy

Blog mi ostatnio zwolnił do ślimaczego tempa. Trochę dlatego, że postanowiłem sobie zrobić przerwę od …

Zapisz się
Powiadom o
0 komentarzy
Inline Feedbacks
Zobacz wszystkie komentarze
Zapraszam do skomentowania wpisu.x