How to confgiure error logging at Source level in a Data Flow Task of SSIS
How to confgiure error logging at Source level in a Data Flow Task of SSIS Sample script used in the example. create table test_data (col1 int, col2 varchar(100)) insert into test_data values (1, '00 0'); insert into test_data values (2, '02'); OLE DB Source SQL Command with following query select * from test_data where col2=0; this qyery fails Destination is a flat file. During execution following error is reported. OLE DB Source  Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E07. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E07 Description: "Conversion failed when converting the varchar value '00 0' to data type int.". I am getting above error when I run the package.I know the query is not correct but I am not intended to change the source query, this is sample derived from my application. In order to Log this error to a LOG file by specifying a location, what I should do? I Tried using the Error Output but that handles the errors only on the data coming from Source but not with the Query.
You can use Event Handlers for error logging. Click on the Event Handler tab, and choose the applicable component and the OnError event, then you can do whatever you want with the error. There are also extra System variables that hold the error description, time, etc that you can access with expressions. Good luck!