Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERRORCODE=-4461, SQLSTATE=42815 in DB2

Tags:

java

sql

db2

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.

like image 674
user1374266 Avatar asked Jul 10 '12 10:07

user1374266


1 Answers

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.

like image 97
viticlick Avatar answered Oct 11 '22 05:10

viticlick