SSIS - 2008: Truncation may occur due to retrieving data from database columns : Error

  • Hi,

    I am loading data from Ms access DB to the SQl Server 2008, using SSIS 2008.

    I am getting below warning message while executing the package and eding up loading half of the data nd failing the package.

    Truncation may occur due to retrieving data from database columns

    I have given proper data type lengths, also the incoming data donot have the data beyond the actual lenght, this is verified.

    Source file, MS access.. I heard Imex =1 is a solution, but looks like that works only for Excel.

    What is the solution, stuck here.. Need help asap.

  • The actual error most likely has the column name in it, and that's the one you should investigate.

    What is the length in the source? What is the length in the destination?

    What is the data type in the SSIS data flow?

    At which component do you get this error?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi Koen,

    Thanks for responding..

    Yes I know the column name on which erroris occurring.

    the datatype for this column nd length are matching.. I have tried fixing column length, like increasing as I mentioned earlier nothing worked..

    The error is occurring in the first step at the source oledb step..

  • rangu (6/16/2014)


    Hi Koen,

    Thanks for responding..

    Yes I know the column name on which erroris occurring.

    the datatype for this column nd length are matching.. I have tried fixing column length, like increasing as I mentioned earlier nothing worked..

    The error is occurring in the first step at the source oledb step..

    Where did you increase it? In the SSIS data flow?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Yes, cannot modify in destination..

  • rangu (6/16/2014)


    Yes, cannot modify in destination..

    And you changed this in the advanced editor of the source component?

    And you are sure it is a truncation error, not a code page error? (sometimes both errors are bundled in one error message. I wouldn't know if that is the case here, since you never posted the actual error message)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I am getting below warning message while executing the package and eding up loading half of the data nd failing the package.

    Truncation may occur due to retrieving data from database columns

    So what is the error ?

    Can you please post the error message as it may be a warning message but not always error ?

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • rhythmk (6/16/2014)


    I am getting below warning message while executing the package and eding up loading half of the data nd failing the package.

    Truncation may occur due to retrieving data from database columns

    So what is the error ?

    Can you please post the error message as it may be a warning message but not always error ?

    Nicely spotted.

    It's a warning, not an error.

    The only way you can get rid of this warning message is when the length of the column in the data flow is smaller or equal than the column width of the destination column.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Before Executing the Package:

    [Source FCM File [1]] Warning: Truncation may occur due to retrieving data from database column "Client_Short_Name" with a length of 100 to data flow column "Client_Short_Name" with a length of 60.

    During the Execution of the Package:

    [Source FCM File [1]] Error: There was an error with output column "Client_Short_Name" (7027) on output "OLE DB Source Output" (11). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".

    [Source FCM File [1]] Error: The "output column "Client_Short_Name" (7027)" failed because truncation occurred, and the truncation row disposition on "output column "Client_Short_Name" (7027)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source FCM File" (1) returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

  • Ok, I could figure it out..

    I went to Source OLEDB, Advanced Editor and Input and Output parameters.

    There I have compared the length of the column in External Columns and Output columns.

    External Column has length 100 which is coming from Access is set to 100.

    Output Column was set to 60, strange I never changed that , is it default setting in SSIS?

    I have changed this length to 100, it worked like charm.

    Thanks Keon and rhty for your thoughts..

  • Length 60 is not a default of SSIS.

    The only defaults I know of are 255 for Excel (which uses the same provider as Access) and 50 for text files.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I went to Source OLEDB, Advanced Editor and Input and Output parameters.

    hmm...that's what Koen replied earlier 🙂

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply