Java db2 error SQLCODE = -913 SQLSTATE = 57003 SQLERRMC = schema.table;表,驱动程序= 4.1xxx [英] Java db2 error SQLCODE=-913 SQLSTATE=57003 SQLERRMC=schema.table; table, driver=4.1xxx

查看:1664
本文介绍了Java db2 error SQLCODE = -913 SQLSTATE = 57003 SQLERRMC = schema.table;表,驱动程序= 4.1xxx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个简单的Java应用程序,它基本上执行一个包含4个连接表的 SELECT SQL语句。然后我执行SQL语句并将其保存到 resultSet 中。当我循环浏览 resultSet 时,在200K +的记录中,我收到以下错误消息:


SQLCODE = -913 SQLSTATE = 57003 SQLERRMC = schema.table;表,驱动程序= 4.1xxx


根据我迄今为止所读的内容,这意味着它的死锁错误。是否有可能发生在这样一个小的结果集(300K)和select语句上?

解决方案

发生死锁当两个或多个事务处于锁定周期等待彼此时,并且锁定超时不会中断该周期。默认情况下,在表或索引扫描期间执行行锁定时,DB2会在确定该行是否符合查询条件之前锁定每一行。有可能您的表或索引扫描花费的时间太长,还有其他挂起的事务。



这是一个关于DB2锁的精彩文档。 http://www.ibm.com/developerworks/data/library/ techarticle / dm-0509schuetz / 还有一些关于如何解决锁定问题的建议。


I wrote a simple Java application that basically execute an SELECT SQL statement comprising of 4 joined tables. I then execute the SQL statement and save it to a resultSet. When I am looping through the resultSet, on the 200K+ record out of 300K+, I am getting this error message:

SQLCODE=-913 SQLSTATE=57003 SQLERRMC=schema.table; table, driver=4.1xxx

Based on what I have read so far, this means its a deadlock error. Is it possible for this to occur on such a small resultset (300K), and on a select statement?

解决方案

A deadlock occurs when two or more transactions are in a cycle of lock wait for one another, and a lock timeout does not break the cycle. By default, when row locking is performed during a table or index scan, DB2 locks each row before determining whether the row qualifies for the query. Chances are that your table or index scan is taking too long and there are other pending transactions.

Here is a wonderful document about locks for DB2. http://www.ibm.com/developerworks/data/library/techarticle/dm-0509schuetz/ there is also some suggestions on how to solve locking issues.

这篇关于Java db2 error SQLCODE = -913 SQLSTATE = 57003 SQLERRMC = schema.table;表,驱动程序= 4.1xxx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆