sql server 2008 - SSIS: Redirecting both Errors and Truncation issues to file, but conversion errors cause package failure -
i have 2 columns in source flat file, integer column , varchar.
in data flow task, selected source object,and in configure errors section, set both "error" "truncation" columns "redirect" output file intended rejected records.
if rig data 1 row has varchar value longer length of column, row redirected expected rejected flat file. however, when string value encountered in int column (productid), package dies on following error.
[oledest [200]] error: ssis error code dts_e_oledberror. ole db error has occurred. error code: 0x80040e21. ole db record available. source: "microsoft sql server native client 10.0" hresult: 0x80040e21 description: "multiple-step ole db operation generated errors. check each ole db status value, if available. no work done.".
[oledest [200]] error: there error input column "productid" (1084) on input "ole db destination input" (213). column status returned was: "the value not converted because of potential loss of data.".
at first thought need change task force success return return result of increase max error count though thought "handled" errors should considered errors. however, ensured package completed successfully, row varchar value productid still didn't end in error file.
what missing?
update
yes, looks can change definition of file layout include string data types , redirect truncation path work on file source object. catch conversion errors however, think need use data conversion transformation , redirect rows task.
for numeric data types, define columns in flat file source object "sufficiently large" handle sane value, leave subsequenct data conversion task handle type conversion errors.
this sounds preet suggesting...
update 2 when create simple file 2 columns, int , varchar , put char value in int column , run test package redirects rows flat file source object, nopn int columns redirected. not sure why isn't happening in other pkg questioning. maybe related fact package generate using .net code , screwed up.
summary question post:
if redirect rows flat file source, should rows containing integer columns non int values redirected flat file or expect abort package? (as described above, getting inconsistent results , don't know why)
Comments
Post a Comment