Showing posts with label flat. Show all posts
Showing posts with label flat. Show all posts

Tuesday, March 27, 2012

error redirect to one file

Hi!

I have several lookups in my data flow task and for each of these I want to redirect error to one file (append data)

I created Flat File connection manager and first lookup goes fine with errors redirected to the file.

However, second error redirect that I am sending to the same file is failing.

Error I get is:

"[Flat File Destination 1 [14851]] Warning: The process cannot access the file because it is being used by another process.”

So my goal is to have one central file where I would redirect all records that fail.

thanks

Take all of the lookup error outputs and combine them with a union all component. Then, from the union all component go into your flat file destination.sql

Monday, March 26, 2012

Error output question

Hello,

I realize I have a question about what constitutes an "error" for an error output.

For example, a flat file source has an error output for "bad rows", that is, when it encounters "unexpected data". What specifically is "unexpected data"? Is this documented somewhere?

Another example would be an OLE DB source that uses a query to retrieve row. This too, has an error output, but I realize I have no clue what would constitute bad data from a table. I mean, data in a table is just data, so what would constitute an error from an OLE DB source? I can't think of one thing. Where are these "rules" documented, if anywhere?

Thanks

"Handling Errors in Data" in Books Online has some great information on this.

Errors can be different for different components. Sources most often suffer from data type conversion issues. The error output adds an ErrorCode and you can call Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData90.GetErrorDescription in a script component to see the actual error message.