问题描述
我正在将 JTOpen JDBC 驱动程序用于 DB2 通用数据库.除了简单的语句之外,我对 SQL 的经验很少.
I'm using the JTOpen JDBC driver for a DB2 Universal database. I have very little experience with SQL beyond simple statements.
从 这个问题,我看到尝试在事务期间在非日志表中插入/更新行"时抛出我遇到的错误(SQL7008)(释义).
From this question, I see that the error I'm getting (SQL7008) is thrown when trying to "insert/update rows in a non-journaled table during a transaction" (paraphrased).
根据项目负责人的说法,我们的 DB 没有日志记录,并且不会很快出现(不要问我为什么,我不是 DBA).但是,我正在开发一个项目,其中几乎需要一次性commit 所有内容(而不是每次调用执行时都自动提交)(不是完全需要,但它会解决未来会有很多问题).
According to the project lead, our DB is not journaled and won't be any time soon (don't ask me why, I'm not the DBA). However, I'm working on a project where being able to commit everything in one go (rather than AutoCommit-ing each time an execute is called) is nearly necessary (not totally required, but it would solve a lot of issues down the road).
有没有办法在不启用 Journalling 的情况下解决错误 SQL7008?
Is there any way to work around erorr SQL7008 without enabling Journalling?
推荐答案
在不启用日志的情况下解决此问题的唯一方法是在连接字符串中禁用 事务隔离,如下所示:
The only way to work around it without enabling journaling is to disable transaction isolation in your connection string as follows:
jdbc:as400://systemname;naming=sql;errors=full;transaction isolation=none;date format=iso
可以在 IBM Toolbox for Java JDBC 属性 文档.
这篇关于SQL7008 错误 - 解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)