Error SQL7008 while updating a DB2 for iSeries table

白昼怎懂夜的黑 提交于 2019-12-14 03:54:23

问题


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


回答1:


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.




回答2:


I found the answer to my question, This occurs As CoolBeans mentioned because the table I was trying to update is not being journalled.

Add this table to Journal, here are the steps

this took care of my problem.



来源:https://stackoverflow.com/questions/6388834/error-sql7008-while-updating-a-db2-for-iseries-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!