本文介绍了DB2中的ERRORCODE = -4461,SQLSTATE = 42815的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将一些数据从模式A(表x)导出到 XML ,我正在阅读 XML 将数据插入模式B(表y)。而在20000条记录之后插入数据说

  com.ibm.db2.jcc.am.SqlSyntaxErrorException:[jcc] [t4 ] [11366] [3.63.75]主机变量的值对于其相应的使用而言太大。主机变量= 1。 ERRORCODE = -4461,SQLSTATE = 42815 
com.ibm.db2.jcc.am.BatchUpdateException:[jcc] [t4] [102] [10040] [3.63.75]批次失败。

批处理已提交,但批次中的每个成员至少发生一个异常。 p>

我比较了表x和表y中相应列的数据类型,它们是相同的。来源和目的地的身份(自动增量)列和LONG VARCHAR是BIGINT。



请帮助解决这个问题。

解决方案

我有一次类似的问题。我解决了它添加到XML的队列大小。在我的情况下是这样的:

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

使用queueSize查询是批量启动的。


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.

解决方案

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.

这篇关于DB2中的ERRORCODE = -4461,SQLSTATE = 42815的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 08:55