SSE package OnError Logging

I have an SSIS package with two steps:

1) FTP to the server and upload the file to your local SQL Server 2) Execute SQL Satatement, which runs the stored procedure.

Both of these steps work fine, however I would like to log the success or failure of these steps, so on the system for which this is required, add a grid with the status (success or failure) of each SSIS package that runs for that day.

To do this, I configured an event handler for the FTP phase and added an Execute SQL Task handler. This uses the "SqlStatementSource" property in Property Expressions and an insert statement that inserts system :: variables such as System :: ErrorCode, System :: ErrorDescription.

When I test the expression using the Expression Expression button, everything is fine. But when I try to test the event using the wrong password on the FTP connection, the FTP step fails, but the event handler does not fire even though the event handler type is set to OnError.

Any ideas?

Thanks in advance!

+2


source to share


1 answer


What you did seems to be good, there should be no problem with it.

Make sure you add an error handler at the package level, that is, at the top level.

I did the same thing today, in my case I exported my data to a flat file on local disk and used a variable for FilePath . I used the OnError event handler . To check if it is working fine or not, I changed the FilePath variable to "Z: \" (which doesn't exist on my system).



and I got an error in the OnError event handler like

-1073450982 the component "Flat File Destination" (63) did not complete the pre-execution phase and returned error code 0xC020200E.
-1071636466 Cannot open data file "Z: \ COM_10212009.txt".

Hope it helps.

+3


source







All Articles