ERRORCODE=-4461, SQLSTATE=42815 in DB2

user1374266 picture user1374266 · Jul 10, 2012 · Viewed 54.1k times · Source

I have exported some data from schema A (table x)to XML and I am reading the XML and inserting the data into schema B(table y). while inserting the data after 20000 records it says

com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][20111][11366][3.63.75] The value of a host variable is too large for its corresponding use.  Host variable=1. ERRORCODE=-4461, SQLSTATE=42815
com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][3.63.75] Batch failure.

The batch was submitted, but at least one exception occurred on an individual member of the batch.

I compared the data types of the corresponding columns in table x and table y they are the same. It is BIGINT for the identity(Auto increment) col and LONG VARCHAR in both source and destination..

Kindly help in resolving this issue.

Answer

viticlick picture viticlick · Nov 4, 2015

I had a similar problem one time. I solved it adding to the XML the queue size. In my case was something like this:

<task>
   <name>Ventas MCC</name>
   <queueSize>100</queueSize>
   <queueNames>trashQueue</queueNames>
   <queryTasks>
     <queryTask>...</queryTask>
   </queryTasks>
</task>

With the queueSize the queries was launched in batch.