更新DB2 for iSeries表时出错SQL7008 [英] Error SQL7008 while updating a DB2 for iSeries table

查看:819
本文介绍了更新DB2 for iSeries表时出错SQL7008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java Web应用程序,使用Hibernate和DB2 for iSeries ,在更新表时,我得到以下错误: -


在为
iSeries表更新DB2时出错SQL7008


解决方案

从对这个错误消息做一些搜索,我注意到,当您以非事务模式运行插入/更新时,会发生这种情况。 这里的说明。


发生这种情况是因为您尝试更新的
的表不是
journalled,而您的更新正在
在一个事务中运行。


通常,您应该始终提交(如果发生异常,则回滚)您的事务。通常我从来没有将auto commit设置为true,但是在这种情况下,我想了解如果它是真正需要的,如上面的链接所述。您可以将连接中的自动提交设置为 true ,看看是否消失?



< property name =hibernate.connection.autocommitvalue =true/> p>

此外,链接还有一些交易教程管理与休眠。


I have a Java Web application using Hibernate and DB2 for iSeries and during update of a table I get he following error:-

Error SQL7008 while updating a DB2 for iSeries table

解决方案

From doing some googling on this error message I noticed that it happens when you are running an insert/update in a non-transactional mode. The explanation is given here.

This occurs because the table you are trying to update is not being journalled, and your update is being run within a transaction.

Generally, you should always commit (and rollback if an exception occurs) your transactions. Usually I never set auto commit to true but in this case I would like to understand if it's truly needed as mentioned in the link above. Can you set the auto commit to true in your connection to see if this goes away?

<property name="hibernate.connection.autocommit" value="true"/>

Also this link has some tutorials on transaction management with hibernate.

这篇关于更新DB2 for iSeries表时出错SQL7008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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