I recently helped with a customer issue where they had a long running stored procedure which output status messages periodically using PRINT statements. They wanted to capture these statements and output them into the SSIS log. Unfortunately, the Execute SQL Task doesn't support this (it's something we're considering for the future), but it's fairly easy to do through a script task.
Our stored procedure:
Our script:
The print statements return the messages as InfoMessage events, which we catch with our handler and turn into SSIS information events.
When we run the package, we can see the message from the stored procedure in our progress window...
We're looking into adding this functionality to the Execute SQL Task as well, but hopefully this is an acceptable alternative until then.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.