How do you get the SQL Svr error code/desc?
When SSIS packages work, they are great. But when rows cannot be inserted into the destination, I'd like to get the SQL Server error code and desc to include in a text file where I can also re-direct the row.
Currently, I only have the ErrorCode that SSIS inserts for you. But seeing:
-1071610801 - An error has occurred while sending this row to
destination data source.
When I enable logging, I can create a text file that contains a log of debug output and lines like this when I force a duplicate:
Violation of PRIMARY KEY constraint 'PK_BidCommodities'.
Cannot insert duplicate key in object 'dbo.BidCommodities'.
I get this line for each row of data that failed...however logging will not show the data row so is not helpful to fix the data.