Configuring OLEDB Distination to Redirect TRUNCATE Errors
Hi, I am having trouble redirecting TRUNCATE error rows using the oledb destination. Is it possible to accomplish this and if so any help is appreciated. ThanksFrancis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
June 19th, 2011 8:40pm

You are not verbose enough on what is exactly wrong. So I will try to help based on an assumption you setup the error output on the OLEDB source component for the Truncation, but the package fails and no error rows redirected, is that a fair assumption? if yes, see if this post addresses your issue: http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/8ee55ea4-9d1f-4f34-b538-faa4735c8546/Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
June 19th, 2011 10:36pm

You are not verbose enough on what is exactly wrong. So I will try to help based on an assumption you setup the error output on the OLEDB source component for the Truncation, but the package fails and no error rows redirected, is that a fair assumption? if yes, see if this post addresses your issue: http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/8ee55ea4-9d1f-4f34-b538-faa4735c8546/ Arthur My Blog Arthur thanks for the response and sorry about my initail post not being detail enough. Below is a detailed description of my issue although I think I have it resolved as I am getting the expected results - however some explanation is apprecited. I reviewed the package and noticed that I was configuring the error redirect on the "OLEDB Desitination Task" and not on my source "Flat File Source Task". Upon opening the "Flat File Source Editor Error Output page" I realized that it was there I needed to configure Error and Truncation Redirects - I did and not rows that violate column schema definitions are redirected and the package runs successfully. I also noticed that when I had the error redirect configured on the "OLEDB Destination Task" - which Error Output page has the TRUNCATE column GRAYED OUT it will redirect the error row but only when the key column was the violater. For all other columns it would fail the package. Question: I thought it was confusing that the Source is where error redirect is setup - how does the Source know the schema of the destination table to determine which rows are bad? How does the OLEDB redirect error work? ThanksFrancis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
June 20th, 2011 2:39pm

You are not verbose enough on what is exactly wrong. So I will try to help based on an assumption you setup the error output on the OLEDB source component for the Truncation, but the package fails and no error rows redirected, is that a fair assumption? if yes, see if this post addresses your issue: http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/8ee55ea4-9d1f-4f34-b538-faa4735c8546/ Arthur My Blog Arthur thanks for the response and sorry about my initail post not being detail enough. Below is a detailed description of my issue although I think I have it resolved as I am getting the expected results - however some explanation is apprecited. I reviewed the package and noticed that I was configuring the error redirect on the "OLEDB Desitination Task" and not on my source "Flat File Source Task". Upon opening the "Flat File Source Editor Error Output page" I realized that it was there I needed to configure Error and Truncation Redirects - I did and not rows that violate column schema definitions are redirected and the package runs successfully. I also noticed that when I had the error redirect configured on the "OLEDB Destination Task" - which Error Output page has the TRUNCATE column GRAYED OUT it will redirect the error row but only when the key column was the violater. For all other columns it would fail the package. Question: I thought it was confusing that the Source is where error redirect is setup - how does the Source know the schema of the destination table to determine which rows are bad? How does the OLEDB redirect error work? ThanksFrancis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 2:39pm

There are two possible places where you could be experiencing truncation errors - you need to tell us exactly which one so we can help you appropriately. Based on what you've said, I believe you're reading a text file and attempting to read rows from it, then inserting those rows into a database with the OLE DB Destination. Which component - the Flat File Source or the OLE DB Destination - is returning truncation errors? What data types are involved in the column(s) reporting errors? You are correct in your suspicion that the Source has no idea about the metadata of the destination - it does not. But... both your source and destination could throw truncation errors if configured inappropriately. Talk to me now on
June 20th, 2011 3:59pm

There are two possible places where you could be experiencing truncation errors - you need to tell us exactly which one so we can help you appropriately. Based on what you've said, I believe you're reading a text file and attempting to read rows from it, then inserting those rows into a database with the OLE DB Destination. Which component - the Flat File Source or the OLE DB Destination - is returning truncation errors? What data types are involved in the column(s) reporting errors? You are correct in your suspicion that the Source has no idea about the metadata of the destination - it does not. But... both your source and destination could throw truncation errors if configured inappropriately. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 3:59pm

There are two possible places where you could be experiencing truncation errors - you need to tell us exactly which one so we can help you appropriately. Based on what you've said, I believe you're reading a text file and attempting to read rows from it, then inserting those rows into a database with the OLE DB Destination. Which component - the Flat File Source or the OLE DB Destination - is returning truncation errors? What data types are involved in the column(s) reporting errors? You are correct in your suspicion that the Source has no idea about the metadata of the destination - it does not. But... both your source and destination could throw truncation errors if configured inappropriately. Talk to me now on Correct, I am reading from a text file and attempting to INSERT INTO a table using the OLE DB Destination. In case a field from the file violates any column defination on the destination table I want to redirect those rows and continue loading the good records. For example if a field called "unit_desc" is defined as VARCHAR (2) on my table and the has a value in that field larger the VARCHAR(2), I want to kick that out and continue loading.Francis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
June 20th, 2011 4:46pm

There are two possible places where you could be experiencing truncation errors - you need to tell us exactly which one so we can help you appropriately. Based on what you've said, I believe you're reading a text file and attempting to read rows from it, then inserting those rows into a database with the OLE DB Destination. Which component - the Flat File Source or the OLE DB Destination - is returning truncation errors? What data types are involved in the column(s) reporting errors? You are correct in your suspicion that the Source has no idea about the metadata of the destination - it does not. But... both your source and destination could throw truncation errors if configured inappropriately. Talk to me now on Correct, I am reading from a text file and attempting to INSERT INTO a table using the OLE DB Destination. In case a field from the file violates any column defination on the destination table I want to redirect those rows and continue loading the good records. For example if a field called "unit_desc" is defined as VARCHAR (2) on my table and the has a value in that field larger the VARCHAR(2), I want to kick that out and continue loading.Francis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 4:46pm

Just curious if your issue is in that you chose the bulk insert mode AKA Fast Load. You need the simple, "table or view" mode instead, then you get the row-by row processing and the error redirection must start flowing as expected.Arthur My Blog
June 20th, 2011 7:29pm

Just curious if your issue is in that you chose the bulk insert mode AKA Fast Load. You need the simple, "table or view" mode instead, then you get the row-by row processing and the error redirection must start flowing as expected. Arthur My Blog That was the problem and thanks for your help. Works like a charm now!Francis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2011 5:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics