Error while inserting into nvarchar(max) record

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dwh_user
Premium Member
Premium Member
Posts: 14
Joined: Thu Oct 18, 2018 8:08 pm
Location: Sydney

Error while inserting into nvarchar(max) record

Post by dwh_user »

Error while inserting into nvarchar(max) record of PDW through an ODBC stage in Datastage.

The nvarchar(max) records are read as LOBs and treated has LOBs by Datastage. So, the array size had to be made to 1. This is working for most of the records. However when the text length is greater than 2000(approx) it is giving the below error.

0: ODBC function "SQLParamData" reported: SQLSTATE = 22001: Native Error Code = 0: Msg = [IBM (DataDirect OEM)][ODBC SQL Server Wire Protocol driver]String data, right truncated. Error in parameter 1. (CC_OdbcDBStatement::executeInsert, file CC_OdbcDBStatement.cpp, line 731)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The ODBC drivers have a maximum number of columns per row and a maximum number of bytes per row.

These can be tuned by adding MAX_FETCH_COLS and MAX_FETCH_BUFF respectively into the uvodbc.config entry for the DSN. There are limits, of course, which you will find in the documentation.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply