0
votes

I am trying to pull data from IBM db2 into a SQL table via SSIS.

However, the table (source) contains a special character in the column, like below;

"?Ǫ. note pads wearing thin"

As a result, my package fails with the following error;

[OLE DB Source [33]] Error: There was an error with OLE DB Source.Outputs[OLE DB Source Output].Columns[VTTEXT] on OLE DB Source.Outputs[OLE DB Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".

The data is being loaded into a VARCHAR column within SQL, but the error seems specific to my data source.

How can I get around it?

1
Try to change the VARCHAR column to NVARCHARAmira Bedhiafi
Look at the data definition in DB2. SELECT * FROM ABC01.sysibm.systables AS X WHERE X.TBNAME = 'MyTable' That will pull back the metadata that defines your table. What is the data type, COLTYPE, for NAME = 'VTTEXT' You'll also want to identify the LENGTH property to ensure you have a match between the length in DB2 vs SQL Server. Given the column name, I expect this will be a large object type. Finally, inspect the data in DB2 in a mainframe/as400 screen. Does it show the same as what you pasted into the question? There might be codepage issues at play here as well. Is DB2 on zOS or LUW?billinkc

1 Answers

0
votes

When an nvarchar column can store any Unicode data the varchar column is restricted to an 8-bit codepage. Codepage incompatabilities are frequent issues, so Unicode is the cure for codepage problems.

ALTER TABLE yourtable
MODIFY thecolumn NVARCHAR(255);