SSIS – OnPreExecute and OnPostExecute Fire Multiple Times

If you are trying to use an event handler like OnPreExecute or OnPostExecute in SSIS to log execution information you will notice that each event is being fired multiple times even if you configure the event at package level but you need these events to fire only once!

One quick way to fix this is to add an empty script task at the beginning of the event handler and on the precedence constraint coming out of that task to set:

  • Evaluation Operation = Expression
  • Expression = @[System::SourceName] ==  @[System::PackageName]