Oracle:OALL8处于不一致状态 [英] Oracle: OALL8 is in an inconsistent state

查看:593
本文介绍了Oracle:OALL8处于不一致状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为升级JRun的一部分,我们正在从1.4 JVM迁移到1.6 JVM。现在我得到一个非常奇怪的oracle db错误:OALL8处于不一致状态。我已经把问题归结为插入完全不使用绑定变量的查询 - 所有内联参数。如果我在没有任何绑定变量的情况下运行查询,则会出现上述错误。只要我用绑定变量替换其中一个硬编码值 - 一切都可以正常工作。

As part of upgrading JRun, we are moving from a 1.4 JVM to a 1.6 JVM. Now I am getting a really strange oracle db error: "OALL8 is in an inconsistent state". I have pinned down the problem to insert queries that do not use bind variables at all - all inline parameters. If I run the query without any bind variables, I get the above error. As soon as I replace one of the hard coded values with a bind variable - everything works without error.

另一个奇怪的是,在执行查询后,它就在事实致力于数据库。我可以从另一个会话连接并查看插入的行。我已经尝试在事务中包装查询并且它似乎成功,因为没有显式事务的查询中的行为没有改变。

The other strange bit is that after executing the query, it is in fact committed to the database. I can connect from another session and see the inserted row. I have tried wrapping the query in a transaction and it seems to succeed as the behavior is unchanged from the query without an explicit transaction.

以下是相关细节:

Java版本:1.6.0_12-b04

虚拟机版本:11.2-b01(HotSpot服务器)

Oracle服务器:10.2 .0.4

Oracle客户端:11.1.0.7.0到ojdbc6.jar

Java Version: 1.6.0_12-b04
Virtual Machine Version: 11.2-b01 (HotSpot Server)
Oracle Server: 10.2.0.4
Oracle Client: 11.1.0.7.0 through ojdbc6.jar

更新:我正在使用cfqueryparam - 它们在oracle世界中被称为绑定变量。虽然这确实解决了当前的问题,但我们有一个相当大的遗留代码库,我们无法通过实际更新查询作为从CF7升级到CF8的一部分。

Update: I am using cfqueryparam - they are called bind variables in the oracle world. While that does solve the immediate problem, we have a rather large legacy code base that we can't realistically go through all of to update the queries as part of upgrading from CF7 to CF8.

即使我已经确定了一个失败的特定情况(并将其封装在mxunit测试中) - 这并不意味着没有其他领域可能存在这个问题。我真的希望有一个解决方案来消除OALL8错误而不是编码。

Even though I have pinned down one specific situation that fails (and encapsulated it in an mxunit test) - that doesn't mean there aren't other areas where this may be an issue. I would really like to have a solution in place that removes the OALL8 error rather than coding around it.

更新2:用我们的DBA他将一个名为CURSOR_SHARING的参数设置为SIMILAR。 Oracle默认为EXACT。发生的事情是当ColdFusion将查询关闭以执行时,Oracle正在将所有文字值转换为绑定变量,这似乎使ColdFusion感到困惑。将设置恢复为EXACT允许文字查询正常工作。

Update 2: After checking with our DBA he had set a parameter called CURSOR_SHARING to SIMILAR. The Oracle default is EXACT. What is happening is when ColdFusion hands the query off to be executed, Oracle is turning all the literal values to bind variables and that appears to be confusing ColdFusion. Turning the setting back to EXACT allows the literal queries to work just fine.

更新3: Oracle最终向我们发出了带外JDBC补丁。它被识别为JDBC错误。最新的驱动程序应该在它们最终更新时包含它。如果你有支持,你也可以通过他们的TAR系统请求补丁。

Update 3: Oracle finally issued us an out-of-band patch for JDBC. It was identified as a JDBC error. The latest drivers should include it when they are finally updated. If you have support you can also request the patch through their TAR system.

推荐答案

那么......使用绑定变量?

So... use bind variables?

你应该使用它们(通过 cfqueryparam )来保证安全,如果它解决了问题,那就更有理由这样做。

You should be using them (via cfqueryparam) for security anyway, and if it solves the problem that's even more reason to do so.



如果您对实际错误的含义感兴趣,Google有很多 of 结果,表明它是JDBC驱动程序的错误,甚至建议补丁可用


If you're interested in what the actual error means, Google has plenty of results, suggesting that it's an error with the JDBC driver, and even suggests a patch is available.



但我没有看到你帖子中的实际问题......?


But I don't see an actual question in your post...?

这篇关于Oracle:OALL8处于不一致状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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