locked
Custom Log Message for Execute SQL task RRS feed

  • Question

  • I have setup an SSIS package that executes multiple Execute SQL task .  I am aware of logging options that SSIS provides.

    But what I want to do is store the output of each "Execute SQL task" in log table. Something like this - "Query has executed successfully with n number of rows. "

    How do I achieve this?

    Monday, May 11, 2020 7:36 PM

All replies

  • Monday, May 11, 2020 7:44 PM
  • This one asks to create seperate ETL package. How can I achieve this within a single ETL package?
    Monday, May 11, 2020 8:38 PM
  • Hi AmitSSRS,

    Please try to create log message of Execute SQL Task in Script Task.

    Hope the following links will be helpful: 

      Logging in the Script Task

      Custom Messages for Logging

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, May 12, 2020 7:22 AM
  • Hi,

    May I know if you have anything to update?

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 15, 2020 10:11 AM
  • I looked the solution you have provided but It doesnt help much. I have execute sql task- about 100 of them running within a package. I dont want to create variables for each. In ssissyslog table, I need to include a log saying " Query executed . 436666 rows. " something like that.
    Wednesday, May 20, 2020 7:21 PM
  • Hi AmitSSRS,

    1.We can use Row Count Transformation in Data Flow Task to count the rows.

    2.Or we can use SqlStatement "select @@RowCount" in Execute SQL Task .

    Please refer to Row Count Transformation in SSIS and RowCount for Execute SQL Task.

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, May 21, 2020 1:25 AM