Truncation warning while extracting data from oracle varchar2(20 char) to sql server varchar(20)

  • Hi, We are extracting data from oracle table to sql server 2005. the data type of varchar columns in oracle is defined as varchar2(xx char). using an OLEDB source to connect to oracle when we try to map varchar column to sql server varchar column getting warning. Warning : truncation may occur in data flow loading from a column with the length of 80 to the length 20.

    why it is showing 4 times of the actual size (varchar2(20 char)). Did any body face the same issue.

    Any help is appreciated.

    Thank You

  • With a little quick reading about Oracle data types (I am not an Oracle guy) I found the following phrase describing the Oracle Varchar2 data type

    Depending on your NLS_CHARACTER_FORMAT (its called something like that) each character can take more than one byte on disk.

    So if each Oracle Varchar2 can store more than one bite per character, then an Oracle Varchar2(20) could overflow a SQL Server Varchar(20). The Oracle Varchar2 seems a bit more like the SQL Server NVarchar, although your numbering up to 80 characters leads me to believe they are not really exactly the same.

    I would suggest you profile the data on your Oracle db, and set your data types and sizes according to the profile rather than the data types.

  • Thanks Daniel, I would profile the data and change data types and sizes according to the profile.

Viewing 3 posts - 1 through 2 (of 2 total)

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