2

I have an SSIS package with a script task that fires various information and warning messages, for example:

Dts.Events.FireWarning(1, taskName, "Common Version API URL not specified", null, 0);

This works fine on my laptop where I have it running in SQL Server 2017. The message gets written to the Execution report just as desired:

enter image description here

However, when I deploy and run the package in our test environment, which is using SQL Server 2016, the execution report does not show any of my messages. Could this be due to some setting that I'm not aware of or is this maybe a feature that is missing in SQL Server 2016?

Hadi
  • 36,233
  • 13
  • 65
  • 124
Andvik
  • 119
  • 1
  • 12
  • Get the package from the server into a new project - check the script task - it may be empty. This is usually due to a mismatch in libraries when deploying scripts. Check out the \DTS\Binn\ISDeploymentWizard.exe for the version you're deploying to. (ie for sql 2016, it's \130\DTS\Binn\ISDeploymentWizard.exe. If this is the issue but you can't get it working, let me know and I'll post a more detailed answer. – Dave Brown Oct 01 '19 at 09:52
  • Thanks @Dave, but in my case the script's Main-method in package exported from the test environment look exactly the same as the one on in my dev environment (also, the script contains other code in addition to the FireWarning statement and that works fine). If I compare the two .dtsx files there are numerous differences, but the C# code seems unaltered throughout the package. (However, I do suffer from an issue that forces me to edit the C# code directly in .dtsx files, but I **think** that is a totally different story.) – Andvik Oct 01 '19 at 13:30

1 Answers1

0

I don't actually have an answer for my question, however, my problem has been solved. The Dts.Events.FireWarning etc. now works as expected, i.e.my messages are included in the execution report in our test (and production) environments. As I have not changed any code I can only assume that something in those environments have changed. I've asked if it has been any update that could explain this but I've not received any satisfying answer.

Andvik
  • 119
  • 1
  • 12