I am using SSIS 2012 - project deployment model, utilizing the out of the box SSISDB logging.
However, I was wondering how to log custom messages to the SSISDB, i.e. "hello world" when the package start or when a certain event is raised. Is this possible? Or do I have to fallback to a custom log table, which seems to defeat the advantage of the SSISDB logging.
Thanks!
Of course it is. What message would you like to log? http://msdn.microsoft.com/en-us/library/ms136054.aspx
This is an example from a Script Task (Control Flow)
bool fireAgain = false;
Dts.Events.FireInformation(0, "Test", "I am the description", string.Empty, 0, ref fireAgain);
This is an example from a Script Component (Data Flow)
bool fireAgain = false;
ComponentMetaData.FireInformation(0, "Test too", "I am data flow description", string.Empty, 0, ref fireAgain);
You can then look in your reports or write custom queries against catalog.operation_messages
in SSISDB. When we were loading our data warehouse, if I found employee ids that the data didn't support, I'd fire off OnInformation events with the words Research in the title and then parse out the bits I needed (employee id and the date).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With