Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS:Unicode data is odd byte size for a column Should be even byte size

I am running an SSIS package that pulls data from one SQL server to other SQL Server. The source and destination table has same schema. One of the column is of nvarchar(max) datatype. When I'm trying to insert the data - it is giving me following error for the nvarchar(max) type column-

Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unicode data is odd byte size for column 13. Should be even byte size.".

Can someone help me to resolve this issue?

like image 769
Rameshwar Pawale Avatar asked Dec 17 '25 13:12

Rameshwar Pawale


1 Answers

Try adding a Derived Column with the following expression and map it to the destination column

(DT_WSTR,4000)[column name]

Else, check the following article it contains useful information:

  • SSIS – UNICODE DATA IS ODD BYTE SIZE FOR COLUMN 4. SHOULD BE EVEN BYTE SIZE.
like image 158
Hadi Avatar answered Dec 20 '25 07:12

Hadi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!