Search code examples
sql-serverssissql-server-2012ssis-2012

Custom Logging to SQL Server table in SSIS


I have a SSIS package that has three DataFlowTasks.

1st dataflow load data to destination table1
2nd dataflow load data to destination table2
3rd dataflow load data to destination table3

I configured logging by default to SQL Server table (ssiserrorlog) on error. but this only has startdate and enddate details but I want to log the details to SQL Server custom error log table like the below.

enter image description here

How to do this process I am new to SSIS.


Solution

  • A correct solution for the RowCount and Duration has been suggested, however, there are noted datatype issues between using the system::starttime variable to transfer Package or Event starttime custom logs from SSIS to SQL.

    The user will have to create a user variable (ie. user::StartTime) and likely create an expression (depending on what is being used for EndTime) in order to solve this aspect of the problem.

    https://sqljunkieshare.com/2011/12/09/ssis-package-logging-custom-logging-2008-r2-and-2012/