Davide Mauri Blog

Experiences with SQL Server

Logging With SSIS: Beware of Parent Package Variable configuration!

In my previous post I said that "logging begins BEFORE validation and BEFORE package configuration". After talking with Mr. Kirk Haselden (who has been very kind and helped me to better understand how SSIS really works. Thanks a lot Kirk!) I found a clue and a workaround.

The problem, basically, is related to the fact that the configuration "Parent Package Variable" behaves differently from all other configurations. In fact, for the Parent Package Variable configuration, events are fired in the following way:

Logging starts
Package is validated
Parent Package Variable Configurations are loaded
Expression are applied
Package is run

which is a different from all other configuration where the configurationĀ is the first event. So, if you need to make the logging connection manager configurable at run time you MUST avoid using Parent Package Variables and you should use the Enviroment Variables instead.